# float features

1.0.0

A portability library for IEEE float features not covered by the CL standard.

## About Float-Features

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

Version: 1.0.0
Dependencies:

- documentation-utils

Author: Nicolas Hafner
License: zlib
Homepage: https://github.com/Shinmera/float-features

## Definition Index

- ### FLOAT-FEATURES

  - ORG.SHIRAKUMO.FLOAT-FEATURES
  No documentation provided.
  - EXTERNAL CONSTANT

    #### DOUBLE-FLOAT-NEGATIVE-INFINITY

    Source

        The negative infinity for double-floats.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-NEGATIVE-DOUBLE-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### DOUBLE-FLOAT-POSITIVE-INFINITY

    Source

        The positive infinity for double-floats.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-POSITIVE-DOUBLE-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### LONG-FLOAT-NEGATIVE-INFINITY

    Source

        The negative infinity for long-floats.

        Supported on:
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-NEGATIVE-LONG-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### LONG-FLOAT-POSITIVE-INFINITY

    Source

        The positive infinity for long-floats.

        Supported on:
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-POSITIVE-LONG-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### SHORT-FLOAT-NEGATIVE-INFINITY

    Source

        The negative infinity for short-floats.

        Supported on:
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-NEGATIVE-SHORT-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### SHORT-FLOAT-POSITIVE-INFINITY

    Source

        The positive infinity for short-floats.

        Supported on:
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-POSITIVE-SHORT-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### SINGLE-FLOAT-NEGATIVE-INFINITY

    Source

        The negative infinity for single-floats.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-NEGATIVE-SINGLE-FLOAT on unsupported implementations.

  - EXTERNAL CONSTANT

    #### SINGLE-FLOAT-POSITIVE-INFINITY

    Source

        The positive infinity for single-floats.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * MKCL
        * SBCL

        Defaults to MOST-POSITIVE-SINGLE-FLOAT on unsupported implementations.

  - EXTERNAL FUNCTION

    #### BITS-DOUBLE-FLOAT

    - BITS
    Source

        Encodes the (unsigned-byte 64) bit representation into a native double-float.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CLASP
        * CMUCL
        * LISPWORKS
        * MEZZANO
        * SBCL

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### BITS-LONG-FLOAT

    - BITS
    Source

        Encodes the (unsigned-byte 128) bit representation into a native long-float.

        Supported on:

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### BITS-SHORT-FLOAT

    - BITS
    Source

        Encodes the (unsigned-byte 16) bit representation into a native short-float.

        Supported on:
        * MEZZANO

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### BITS-SINGLE-FLOAT

    - BITS
    Source

        Encodes the (unsigned-byte 32) bit representation into a native single-float.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CLASP
        * CMUCL
        * LISPWORKS
        * MEZZANO
        * SBCL

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### DOUBLE-FLOAT-BITS

    - FLOAT
    Source

        Returns the bit representation of the double-float as an (unsigned-byte 64).

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CLASP
        * CMUCL
        * LISPWORKS
        * MEZZANO
        * SBCL

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### FLOAT-INFINITY-P

    - FLOAT
    Source

        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

    #### FLOAT-NAN-P

    - FLOAT
    Source

        Returns T if the given float is in not-a-number state, NIL otherwise.

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CMUCL
        * ECL
        * LISPWORKS
        * MEZZANO
        * SBCL

        Defaults to returning NIL on unsupported implementations.

  - EXTERNAL FUNCTION

    #### LONG-FLOAT-BITS

    - FLOAT
    Source

        Returns the bit representation of the long-float as an (unsigned-byte 128).

        Supported on:

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### SHORT-FLOAT-BITS

    - FLOAT
    Source

        Returns the bit representation of the short-float as an (unsigned-byte 16).

        Supported on:
        * MEZZANO

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL FUNCTION

    #### SINGLE-FLOAT-BITS

    - FLOAT
    Source

        Returns the bit representation of the single-float as an (unsigned-byte 32).

        Supported on:
        * ABCL
        * ALLEGRO
        * CCL
        * CLASP
        * CMUCL
        * LISPWORKS
        * MEZZANO
        * SBCL

        Defaults to signalling an error on unsupported implementations.

  - EXTERNAL MACRO

    #### WITH-FLOAT-TRAPS-MASKED

    - TRAPS
    - &BODY
    - BODY
    Source

        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
          :divide-by-zero
          :denormalized-operand

        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 :divide-by-zero)
        * CLISP (:underflow)
        * CMUCL T
        * ECL (:underflow :overflow :inexact :invalid :divide-by-zero)
        * MEZZANO T
        * SBCL T

        Defaults to a progn on unsupported implementations and ignores
        unsupported traps.