math.is_nan()

Determines whether a floating point value is NaN (Not a Number). See floating point classifications for more information.

Format

BOOL
math.is_nan(FLOAT x)

Examples

1
2
3
4
5
6
7
declare local var.f FLOAT;

set var.f = 1;
set var.f /= 0;
if (math.is_nan(var.f)) {
  log "division by zero";
}