@hackage fp-ieee0.1.0

fp-ieee: IEEE 754 operations for floating-point types

This library provides IEEE 754-compliant operations, including

  • fusedMultiplyAdd.
  • correctly-rounding versions of fromInteger.
  • realFloatToFrac, which correctly handles signed zeros, infinities, and NaNs (unlike realToFrac).

Some operations (e.g. fusedMultiplyAdd) can make use of the native instruction in the architecture.

For non-native targets, "Pure Haskell" mode is supported via a package flag.

Most operations require only RealFloat constraint, but RealFloatNaN is needed by some operations that access the sign and payload of NaNs.

  • Installation

  • Dependencies (6)

  • Dependents (1)

    @hackage/rounded-hw
  • Package Flags

      f16c
       (off by default)

      Use F16C instructions on x86

      float128
       (off by default)

      Support Float128 via float128 package

      fma3
       (off by default)

      Use FMA3 instructions on x86

      ghc-bignum
       (on by default)

      Use ghc-bignum package

      half
       (off by default)

      Support Half (float16) via half package

      integer-gmp
       (on by default)

      Use integer-gmp package

      pure-hs
       (off by default)

      Disable FFI

      sse4_1
       (off by default)

      Use SSE4.1 instructions on x86