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
ParameterTypeRequiredDescription
numberTYesThe 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 BOOLEANf2 BOOLEANf3 BOOLEANf4 BOOLEAN
FalseFalseTrueFalse

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19