Library: Floating point number support (OMFLOAT)
Import : omfloat.xmd
Returns: A value of true when x is NaN; otherwise, a value of false.
export external switch function is-nan value float x
is-nan to test a floating point number to determine if it is not a number (NaN). This function returns a switch value of true ("x" is NaN) or false.
is-nan provides the only reliable means of determining whether a variable contains a NaN value.
The following "contrived" sample uses
is-nan to check for a value that is not a number (NaN). When such a value is found, the message "Error, result is not a number." is displayed.