diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/ghc-prim/changelog.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libraries/ghc-prim/changelog.md b/libraries/ghc-prim/changelog.md index 1cf411c029..39e5face03 100644 --- a/libraries/ghc-prim/changelog.md +++ b/libraries/ghc-prim/changelog.md @@ -23,6 +23,24 @@ - `copyAddrToAddrNonOverlapping#` - `setAddrRange#` +- New primops for fused multiply-add operations. These primops combine a + multiplication and an addition, compiling to a single instruction when + the `-mfma` flag is enabled and the architecture supports it. + + The new primops are `fmaddFloat#, fmsubFloat#, fnmaddFloat#, fnmsubFloat# :: Float# -> Float# -> Float# -> Float#` + and `fmaddDouble#, fmsubDouble#, fnmaddDouble#, fnmsubDouble# :: Double# -> Double# -> Double# -> Double#`. + + These implement the following operations, while performing one single + rounding at the end, leading to a more accurate result: + + - `fmaddFloat# x y z`, `fmaddDouble# x y z` compute `x * y + z`. + - `fmsubFloat# x y z`, `fmsubDouble# x y z` compute `x * y - z`. + - `fnmaddFloat# x y z`, `fnmaddDouble# x y z` compute `- x * y + z`. + - `fnmsubFloat# x y z`, `fnmsubDouble# x y z` compute `- x * y - z`. + + Warning: on unsupported architectures, the software emulation provided by + the fallback to the C standard library is not guaranteed to be IEEE-compliant. + ## 0.10.0 - Shipped with GHC 9.6.1 |