[ANN] fp-ieee v0.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] fp-ieee v0.1

ARATA Mizuki
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] fp-ieee v0.1

Carter Schonwald
This is really cool! 

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

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. 

On Mon, Dec 28, 2020 at 7:06 AM ARATA Mizuki <[hidden email]> 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.

_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] fp-ieee v0.1

ARATA Mizuki


> 2020/12/29 0:14、Carter Schonwald <[hidden email]>のメール:
>
> 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 <[hidden email]> 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.

_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] fp-ieee v0.1

Carter Schonwald
huh,
do you mean you're using round ties to odd (if so please elaborate! i feel like there must be an interesting insight or observation)
OR that youve a software implementation of roundties to odd? I feel like i'm missing 

happy new year!
-Carter

On Thu, Dec 31, 2020 at 4:08 AM ARATA Mizuki <[hidden email]> wrote:


> 2020/12/29 0:14、Carter Schonwald <[hidden email]>のメール:
>
> 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 <[hidden email]> 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.


_______________________________________________
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.