isnan

isnan, function

def const pure isnan(n: number): boolean

Returns true when n is a NaN (not-a-number) value.

Example

table T = extend.range(2)
T.X = if T.N == 1 then 0 / 0 else 1

show table "NaN check" with
  T.N
  isnan(T.X) as "IsNaN"

This outputs the following table:

N IsNaN
1 true
2 false
User Contributed Notes
0 notes + add a note