IsNaN()

Syntax

Result.f(.d) = IsNaN(Value.f(.d))
Description
Returns nonzero if the given value 'Not a Number'. This value is the result of some invalid calculations. It can also be generated using the NaN() function.

Parameters

Value.f or Value.d The value to check for NaN.

Return value

Returns nonzero if the input value is not a number and zero otherwise.

Remarks

NaN is a special value. Testing for it should not be done using normal comparisons because there are actually many different values for NaN and whether or not NaN is considered equal with itself in comparisons depends on the hardware.

This function handles and returns float or double values.

Example

  Result = IsNAN(NaN())       ; NaN
  Result = IsNAN(Sqr(-1))     ; NaN
  Result = IsNAN(1234.5)      ; a normal number
  Result = IsNAN(Infinity())  ; infinity is not NaN

See Also

NaN(), IsInfinity()

Supported OS

All

<- IsInfinity() - Math Index - Log() ->