IS_NAN

All functions > MATH > IS_NAN

Checks if a value is NaN (Not a Number).

Syntax

IS_NAN(number: T) → BOOLEAN
sql

Type Parameters:

  • T: Any numeric type (TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL)

Arguments

ParameterTypeRequiredDescription
numberTYesThe value to check

Returns

BOOLEAN - TRUE if NaN, FALSE otherwise

Notes

  • Returns TRUE only for NaN values
  • Returns FALSE for finite numbers, zero, and infinities
  • Returns NULL if input is NULL
  • NaN results from invalid operations like SQRT(-1) or 0.0/0.0
  • NaN is not equal to anything, including itself
  • Useful for detecting invalid calculation results

Examples

Last update at: 2025/10/13 10:23:46