isfinite
isfinite, function
def pure isfinite(n: number): boolean
def pure isfinite(n: f64): boolean
Returns true when n is a finite numeric value. It returns false for both
NaN and Infinity.
Examples
table T = with
[| as Label, as Value |]
[| "finite", 2 |]
[| "infinite", 1e30 |]
T.Square = T.Value * T.Value
show table "Finite check" with
T.Label
isfinite(T.Square) as "IsFinite"
This outputs the following table:
| Label | IsFinite |
|---|---|
| finite | true |
| infinite | false |
Remarks
Both overloads are evaluated at runtime, not in const expressions.