Add 'e' to Floating typeclass

Lennart Augustsson lennart at augustsson.net
Sun Feb 17 20:15:08 UTC 2019


Is it really worth it?  How frequent are uses of e, except used like exp?
On the other hand, pi has more frequent standalone use cases.
Also, e has a simple definition (exp 1), whereas pi is somewhat more
involved.

The logp1 and expm1 functions where added for good numerical reasons.  The
same would not be true for e.

On Sat, Feb 16, 2019 at 21:14 chessai . <chessai1996 at gmail.com> wrote:

> We have the 'pi' constant in the floating typeclass and some trigonometric
> functions, as well as things like exp/log/expm1/log1p.
>
> Why not provide an 'e' constant?
>
> A default implementation could just be 'exp 1'.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190217/68416f25/attachment.html>


More information about the Libraries mailing list