This function checks if the provided value is infinite.
This should be used to verify results of calculations where it is possible to have an illegal value.
Note: Besides the functions that return infinite in case of an error, it is also possible to get infinite using normal operators, if either a result is too large, or e.g. by dividing with 0.
Note: This function works with DOUBLE, but can also work with FLOAT as described in the Floating-point math introductory section.
V : DOUBLE
Value to check.
True if the value if +Infinity or - Infinity, False otherwise.
FUNCTION isInf : BOOL;
v : DOUBLE;
a : DOUBLE;
b : DOUBLE;
a := 2.0;
WHILE NOT isInf(v := a) DO
b := a;
a := a * 2.0;
DebugMsg(message := " b = " + doubleToStr(v := b));