float features
1.0.0A portability library for IEEE float features not covered by the CL standard.
About FloatFeatures
This is a wrapper library for IEEE floating point features not present in the Common Lisp standard.
Implementation Support
The following implementations are currently partially or entirely supported:
 abcl
 allegro
 ccl
 clasp
 cmucl
 ecl
 mezzano
 mkcl
 sbcl
 lispworks
System Information
Definition Index

FLOATFEATURES
 ORG.SHIRAKUMO.FLOATFEATURES
No documentation provided.
EXTERNAL CONSTANT DOUBLEFLOATNAN
A positive quiet NaN value with zerocleared payload for doublefloats. This value should NOT be used for comparison with a float value for the pupose of testing NaN because NaN has unused bits (called payload) which are explicitly allowed to store additional information. Comparing this value with other NaN representations via = will fail. To test if a number is a NaN, use FLOATNANP. It is supported on implementations which support BITSDOUBLEFLOAT. Defaults to MOSTPOSITIVEDOUBLEFLOAT on unsupported implementations.

EXTERNAL CONSTANT DOUBLEFLOATNEGATIVEINFINITY
The negative infinity for doublefloats. Supported on: * ABCL * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTNEGATIVEDOUBLEFLOAT on unsupported implementations.

EXTERNAL CONSTANT DOUBLEFLOATPOSITIVEINFINITY
The positive infinity for doublefloats. Supported on: * ABCL * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTPOSITIVEDOUBLEFLOAT on unsupported implementations.

EXTERNAL CONSTANT LONGFLOATNEGATIVEINFINITY
The negative infinity for longfloats. Supported on: * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTNEGATIVELONGFLOAT on unsupported implementations.

EXTERNAL CONSTANT LONGFLOATPOSITIVEINFINITY
The positive infinity for longfloats. Supported on: * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTPOSITIVELONGFLOAT on unsupported implementations.

EXTERNAL CONSTANT SHORTFLOATNAN
A positive quiet NaN value with zerocleared payload for shortfloats. This value should NOT be used for comparison with a float value for the pupose of testing NaN because NaN has unused bits (called payload) which are explicitly allowed to store additional information. Comparing this value with other NaN representations via = will fail. To test if a number is a NaN, use FLOATNANP. It is supported on implementations which support BITSSHORTFLOAT. Defaults to MOSTPOSITIVESHORTFLOAT on unsupported implementations.

EXTERNAL CONSTANT SHORTFLOATNEGATIVEINFINITY
The negative infinity for shortfloats. Supported on: * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTNEGATIVESHORTFLOAT on unsupported implementations.

EXTERNAL CONSTANT SHORTFLOATPOSITIVEINFINITY
The positive infinity for shortfloats. Supported on: * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTPOSITIVESHORTFLOAT on unsupported implementations.

EXTERNAL CONSTANT SINGLEFLOATNAN
A positive quiet NaN value with zerocleared payload for singlefloats. This value should NOT be used for comparison with a float value for the pupose of testing NaN because NaN has unused bits (called payload) which are explicitly allowed to store additional information. Comparing this value with other NaN representations via = will fail. To test if a number is a NaN, use FLOATNANP. It is supported on implementations which support BITSSINGLEFLOAT. Defaults to MOSTPOSITIVESINGLEFLOAT on unsupported implementations.

EXTERNAL CONSTANT SINGLEFLOATNEGATIVEINFINITY
The negative infinity for singlefloats. Supported on: * ABCL * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTNEGATIVESINGLEFLOAT on unsupported implementations.

EXTERNAL CONSTANT SINGLEFLOATPOSITIVEINFINITY
The positive infinity for singlefloats. Supported on: * ABCL * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * MKCL * SBCL Defaults to MOSTPOSITIVESINGLEFLOAT on unsupported implementations.

EXTERNAL SYMBOLMACRO LONGFLOATNAN
A positive quiet NaN value with zerocleared payload for longfloats. This value should NOT be used for comparison with a float value for the pupose of testing NaN because NaN has unused bits (called payload) which are explicitly allowed to store additional information. Comparing this value with other NaN representations via = will fail. To test if a number is a NaN, use FLOATNANP. It is supported on implementations which support BITSLONGFLOAT. Defaults to MOSTPOSITIVELONGFLOAT on unsupported implementations.

EXTERNAL FUNCTION BITSDOUBLEFLOAT
 BITS
Encodes the (unsignedbyte 64) bit representation into a native doublefloat. Supported on: * ABCL * ALLEGRO * CCL * CLASP * CMUCL * LISPWORKS * MEZZANO * SBCL Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION BITSLONGFLOAT
 BITS
Encodes the (unsignedbyte 128) bit representation into a native longfloat. Supported on: Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION BITSSHORTFLOAT
 BITS
Encodes the (unsignedbyte 16) bit representation into a native shortfloat. Supported on: * MEZZANO Supported (with 32bit shortfloat = singlefloat) on: * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS (64bit only. on 32bit lw, shortfloat is not 16 or 32 bits) * SBCL Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION BITSSINGLEFLOAT
 BITS
Encodes the (unsignedbyte 32) bit representation into a native singlefloat. Supported on: * ABCL * ALLEGRO * CCL * CLASP * CMUCL * LISPWORKS * MEZZANO * SBCL Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION DOUBLEFLOATBITS
 FLOAT
Returns the bit representation of the doublefloat as an (unsignedbyte 64). Supported on: * ABCL * ALLEGRO * CCL * CLASP * CMUCL * LISPWORKS * MEZZANO * SBCL Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION FLOATINFINITYP
 FLOAT
Returns T if the given float is an infinity, NIL otherwise. Supported on: * ABCL * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * SBCL Defaults to comparing against the individual constants on unsupported implementations.

EXTERNAL FUNCTION FLOATNANP
 FLOAT
Returns T if the given float is in notanumber state, NIL otherwise. Supported on: * ABCL * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS * MEZZANO * SBCL Defaults to returning NIL on unsupported implementations.

EXTERNAL FUNCTION LONGFLOATBITS
 FLOAT
Returns the bit representation of the longfloat as an (unsignedbyte 128). Supported on: Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION SHORTFLOATBITS
 FLOAT
Returns the bit representation of the shortfloat as an (unsignedbyte 16). Supported on: * MEZZANO Supported (with 32bit shortfloat = singlefloat) on: * ALLEGRO * CCL * CMUCL * ECL * LISPWORKS (64bit only. on 32bit lw, shortfloat is not 16 or 32 bits) * SBCL On platforms with 32bit shortfloat, low bits of significand are dropped without rounding, and out of range exponents are converted to infinities. All values returned by bitsshortfloat should convert back to the same bits. Defaults to signalling an error on unsupported implementations.

EXTERNAL FUNCTION SINGLEFLOATBITS
 FLOAT
Returns the bit representation of the singlefloat as an (unsignedbyte 32). Supported on: * ABCL * ALLEGRO * CCL * CLASP * CMUCL * LISPWORKS * MEZZANO * SBCL Defaults to signalling an error on unsupported implementations.

EXTERNAL MACRO WITHFLOATTRAPSMASKED
 TRAPS
 &BODY
 BODY
Attempts to mask the given floating point traps. Masking a floating point trap causes the given floating point exception to not signal a condition in the lisp world, and instead lets the operation return a float that is either a NaN or an infinity. The following traps are recognised: :underflow :overflow :inexact :invalid :dividebyzero :denormalizedoperand The traps argument may be either a list of the above trap identifiers, or T to signify all maskable traps. Note that not all implementations will signal conditions on all of the above floating point traps anyway, and some implementations may only support masking some of the above traps. Supported on: * ABCL (:overflow :underflow) * CCL (:overflow :underflow :inexact :invalid :dividebyzero) * CLISP (:underflow) * CMUCL T * ECL (:underflow :overflow :inexact :invalid :dividebyzero) * MEZZANO T * SBCL T Defaults to a progn on unsupported implementations and ignores unsupported traps.

EXTERNAL MACRO WITHROUNDINGMODE
 MODE
 &BODY
 BODY
Temporarily set rounding mode when execute body. The following modes are recognised: :nearest Round to nearest, ties to even :positive Round toward positive infinity :negative Round toward negative infinity :zero Round toward zero Note that many compilers would by default try to fold floating point expressions into constants before the rounding mode can take effect. It is advisory to check disassembled functions to see if that is the case when the result is not expected. Supported on: * CCL * CMUCL * MEZZANO * SBCL Signals an error on unsupported implementations.