BSD-3-Clause licensed by ARATA Mizuki
Maintained by [email protected]
This version can be pinned in stack with:fp-ieee-0.1.0.7@sha256:1f7c570b4f514ba19c4af74bc01c9e1492c71c51e0f6d8cbd319225f2fcf7962,10646

Module documentation for 0.1.0.7

  • Numeric
    • Numeric.Floating
      • Numeric.Floating.IEEE
        • Numeric.Floating.IEEE.Internal
        • Numeric.Floating.IEEE.NaN
Used by 1 package in nightly-2026-09-29(full list with versions):

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 via C FFI, or GHC 9.8’s FMA primitives.

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.

Changes

Changelog for fp-ieee

Version 0.1.0.7 (2026-09-28)

  • Fix bugs with Float128.
  • Fix nextTowardZeroHalf.
  • Fix correctness issue with the generic FMA.
  • Fix remainder when the result is zero.
  • Fix doubleToHalf on the F16C configuration.
  • Make use of RISC-V instructions. Some features need rva22u64 or rva23u64 package flags.
  • Support GHC 10.0.

Version 0.1.0.6 (2025-12-29)

  • Support GHC 9.14.

Version 0.1.0.5 (2024-12-15)

  • Support GHC 9.10/9.12.

Version 0.1.0.4 (2024-02-18)

  • Documentation chanegs.

Version 0.1.0.3 (2023-11-18)

  • Allow ghc-bignum 1.3.
  • Fix IntegerInternals.roundingMode#.
  • Fix assertion in augmentedMultiplication.
  • Use FMA primitives on GHC 9.8.

Version 0.1.0.2 (2021-11-30)

  • Allow ghc-bignum 1.2.
  • Documentation changes.

Version 0.1.0.1 (2021-01-02)

Fix some packaging issues.

Version 0.1.0 (2020-12-27)

Initial release.