Name
IsFinite -- check for finiteness (V9.0)
Synopsis
result = IsFinite(x)
Function
Checks if x is a finite value. A finite value is defined as any floating point value that is neither NaN nor infinity.

See IsNan for details.

See IsInf for details.

Inputs
x
value to check
Results
result
True if x is a finite value, False otherwise
Example
a=RawDiv(1,0)  ; infinity, non-finite
b=RawDiv(0,0)  ; NaN, non-finite
c=RawDiv(5,2)  ; 2.5, finite
Print(IsFinite(a), IsFinite(b), IsFinite(c))
This will print "0 0 1" to the screen because the first two values are non-finite whereas the last value is finite. Note that we need to use RawDiv() here because the division operator as well as Div() will not allow a division by zero.

Show TOC