Name
IsInf -- check for infinity (V9.0)
Synopsis
result = IsInf(x)
Function
Checks if x is an infinity value (positive or negative). Positive and negative infinity values are generated when dividing 1/-1 by zero in floating point.

Hollywood also has a predefined constant named #INF that contains the infinity value but the preferred way of checking against infinity is using IsInf().

Inputs
x
value to check
Results
result
True if x is an infinity value, False otherwise
Example
a=RawDiv(1,0)
Print(IsInf(a))
This will print "1" to the screen because the division 1/0 will yield an infinity value. 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