IsNaN()

语法

Result.f = IsNaN(Value.f)
概要
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.

参数

Value.f The value to check for NaN.

返回值

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 can handle float and double values.

示例

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

参阅

NaN(), IsInfinity()

已支持操作系统

所有

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