IsInfinity()

语法

Result.f = IsInfinity(Value.f)
概要
Returns nonzero if the given value represents positive or negative infinity.

参数

Value.f The value to check for infinity.

返回值

Returns nonzero if the input value represents positive or negative infinity and zero otherwise.

Remarks

Checking for the infinity values should not be done using normal comparison, because it depends on the hardware implementation whether infinity is considered equal to itself or not. The value of positive infinity can be generated with the Infinity() function.

This function can handle float and double values.

示例

  Result = IsInfinity(Infinity())  ; infinity
  Result = IsInfinity(Log(0))      ; -infinity
  Result = IsInfinity(1234.5)      ; a finite number
  Result = IsInfinity(NaN())       ; NaN is not the same as infinity

参阅

Infinity(), IsNaN()

已支持操作系统

所有

<- IntQ() - Math Index - IsNaN() ->