fp-ieee: IEEE 754-2019 compliant operations

[ bsd3, library, math, numeric ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
pure-hs

Disable FFI

Disabled
sse4_1

Use SSE4.1 instructions on x86

Disabled
fma3

Use FMA3 instructions on x86. On GHC 9.8 or later, this flag enables use of FMA primitives.

Disabled
f16c

Use F16C instructions on x86

Disabled
float128

Support Float128 via float128 package

Disabled
half

Support Half (float16) via half package

Disabled
Automatic Flags
NameDescriptionDefault
integer-gmp

Use integer-gmp package on GHC 8.x

Enabled
ghc-bignum

Use ghc-bignum package on GHC 9.x

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4
Change log ChangeLog.md
Dependencies base (>=4.12 && <4.21), ghc-bignum (>=1.0 && <1.4), integer-gmp (>=1.0 && <1.1), integer-logarithms (>=1 && <1.1) [details]
License BSD-3-Clause
Copyright 2020-2024 ARATA Mizuki
Author ARATA Mizuki
Maintainer minorinoki@gmail.com
Revised Revision 1 made by aratamizuki at 2024-06-02T02:17:55Z
Category Numeric, Math
Home page https://github.com/minoki/haskell-floating-point#readme
Bug tracker https://github.com/minoki/haskell-floating-point/issues
Source repo head: git clone https://github.com/minoki/haskell-floating-point(fp-ieee)
Uploaded by aratamizuki at 2024-02-18T03:50:32Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 667 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for fp-ieee-0.1.0.4

[back to package description]

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.