[Haskell-cafe] [ANN] fp-ieee v0.1

ARATA Mizuki minorinoki at gmail.com
Thu Dec 31 09:08:07 UTC 2020



> 2020/12/29 0:14、Carter Schonwald <carter.schonwald at gmail.com>のメール:
> 
> This is really cool! 

Thanks.

> 
> Is the fall back strategy to do Kahn style compensated arithmetic.  Similar to in Edward Kmett’s compensated library on hackage?

Yes.  My code combines it with "round-to-odd" technique.

> 
> I like how you have both styles of NaN semantics for min and max, with the default being NaN poisoning but also providing the NaN avoiding one some software needs to do. 

It's one of the new things in IEEE 754-"2019" :)

> 
> On Mon, Dec 28, 2020 at 7:06 AM ARATA Mizuki <minorinoki at gmail.com> wrote:
> Hi all,
> 
> I'd like to announce the first release of fp-ieee.
> 
> https://hackage.haskell.org/package/fp-ieee
> 
> This library aims to provide IEEE 754-2019 compliant operations, including
> 
> * fusedMultiplyAdd
> 
> * correctly-rounding versions of fromInteger (GHC's fromInteger for Float and Double do not round correctly; see https://gitlab.haskell.org/ghc/ghc/-/issues/17231)
> 
> * realFloatToFrac: an alternative of realToFrac with well-defined semantics.
> 
> Other notes:
> 
> * Most of the functions are generic, and any RealFloat instance can be used. However, manipulation of NaN's sign and payload requires an additional constraint (RealFloatNaN, provided by this library).
> 
> * Access to floating-point environment is not provided. If you want to control rounding direction, look at my another library: https://hackage.haskell.org/package/rounded-hw
> 
> * Decimal-specific operations (like quantize, quantum) are not provided, and the preferred exponent is not honored.
> 
> * Use of FFI can be disabled via a package flag (maybe useful when using non-native targets).
> 
> 
> Mizuki
> 
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



More information about the Haskell-Cafe mailing list