IS_NAN
All functions > MATH > IS_NAN
Returns TRUE if a value is NaN (Not a Number).
Signatures
Returns: TRUE if NaN, FALSE otherwise
IS_NAN(number: T) → BOOLEAN sql
| Parameter | Type | Required | Description |
|---|---|---|---|
number | T | Yes | The value to check |
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
FeatureQL
SELECT
f1 := IS_NAN(42.5), -- Regular number is not NaN
f2 := IS_NAN(INFINITY()), -- Infinity is not NaN
f3 := IS_NAN(NAN()), -- NaN value
f4 := IS_NAN(0.0) -- Zero is not NaN
;Result
| f1 BOOLEAN | f2 BOOLEAN | f3 BOOLEAN | f4 BOOLEAN |
|---|---|---|---|
| False | False | True | False |
On this page