Instant properties: isnan

The instant property isnan verifies the Not a Number (NAN) status of a float operand.

Declaration

bool float.isnan

Discussion

The read access to this property results in a boolean value false or true depending on whether the operand in context of which the property is evaluated does contain a valid floating point value or an invalid (Not a Number) value. Such invalid value can result from mathematical operations performed with incorrect arguments like the calculation of square root with a negative value. Please note, this property is read-only. The write access to this property is not allowed. For example:

var float v1 = math_sqrt( -1 ); // v1 = NAN var bool b1 = v1.isnan; // b1 = true

See also the built-in function float_nan().