Next: , Up: Floats   [Contents][Index]


2.1.2.1 IEEE Special Values

CMUCL supports the IEEE infinity and NaN special values. These non-numeric values will only be generated when trapping is disabled for some floating point exception (see float-traps), so users of the default configuration need not concern themselves with special values.

Constant: extensions:short-float-positive-infinity
Constant: extensions:short-float-negative-infinity
Constant: extensions:single-float-positive-infinity
Constant: extensions:single-float-negative-infinity
Constant: extensions:double-float-positive-infinity
Constant: extensions:double-float-negative-infinity
Constant: extensions:long-float-positive-infinity
Constant: extensions:long-float-negative-infinity

The values of these constants are the IEEE positive and negative infinity objects for each float format.

Function: extensions:float-infinity-p x

This function returns true if x is an IEEE float infinity (of either sign.) x must be a float.

Function: extensions:float-nan-p x
Function: extensions:float-signaling-nan-p x
Function: extensions:float-trapping-nan-p x

float-nan-p returns true if x is an IEEE NaN (Not A Number) object. float-signaling-nan-p returns true only if x is a trapping NaN. With either function, x must be a float. float-trapping-nan-p is the former name of float-signaling-nan-p and is deprecated.


Next: Negative Zero, Up: Floats   [Contents][Index]