IS_NAN()

All functions > MATH > IS_NAN()

Returns TRUE if a floating-point value is NaN (Not a Number).

Signatures

NaN check

Returns: TRUE if NaN, FALSE otherwise

IS_NAN(number: T) → BOOLEAN
sql
ParameterTypeRequiredDescription
numberTYesFloating-point value to check

With:

  • T : Floating-point type (FLOAT, DOUBLE)

Signature notes:

  • Returns TRUE only for NaN values
  • Returns FALSE for finite numbers and infinities
  • Returns NULL if the input is NULL
  • Only defined for FLOAT and DOUBLE
  • NaN results from invalid operations like SQRT(-1.0) or 0.0 / 0.0

Examples

FeatureQL
SELECT
    f1 := IS_NAN(42.5E0), -- Regular number
    f2 := IS_NAN(INFINITY()), -- Infinity is not NaN
    f3 := IS_NAN(NAN()), -- NaN
    f4 := IS_NAN(0.0E0) -- Zero
;
Result
f1 BOOLEANf2 BOOLEANf3 BOOLEANf4 BOOLEAN
falsefalsetruefalse

Last update at: 2026/05/26 17:22:09