isfinite

isfinite, function

def const pure isfinite(n: number): boolean
def const pure isfinite(n: double): boolean

Returns true when n is a finite numeric value. It returns false for both NaN and Infinity.

Examples

table T = extend.range(3)

T.Label = if T.N == 1 then "finite" else if T.N == 2 then "infinite" else "nan"
T.X = if T.N == 1 then 1 else if T.N == 2 then 2e38 * 2e38 else 0 / 0

show table "Finite check" with
  T.Label
  isfinite(T.X) as "IsFinite"

This outputs the following table:

Label IsFinite
finite true
infinite false
nan false

See also

User Contributed Notes
0 notes + add a note