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
Parameter | Type | Required | Description |
---|---|---|---|
number | T | Yes | The 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