<div dir="ltr">either way, we're not gonna add e :) </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 20, 2019 at 8:30 AM Yitzchak Gale <<a href="mailto:gale@sefer.org">gale@sefer.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Lennart's question "Is it really worth it?" is the most important one.<br>
And no, probably it isn't.<br>
<br>
But Chessai is correct that this is a weird asymmetry in the Floating<br>
class. My own experience is that I user neither e nor pi very much,<br>
but neither one more than the other.<br>
<br>
Branch cuts of inverse trig functions are not relevant. The report<br>
doesn't explicitly state this, but it's clear that these functions are<br>
expected to return the standard ranges of values as in other<br>
programming languages. You can be quite certain that acos (-1) is pi<br>
in Haskell. And in fact, we have (at least on my computer)<br>
<br>
Prelude> acos (-1) == pi<br>
True<br>
<br>
So there isn't any more or less reason to have e than pi as a separate<br>
class member.<br>
<br>
On Sun, Feb 17, 2019 at 10:15 PM Lennart Augustsson<br>
<<a href="mailto:lennart@augustsson.net" target="_blank">lennart@augustsson.net</a>> wrote:<br>
><br>
> 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.<br>
> Also, e has a simple definition (exp 1), whereas pi is somewhat more involved.<br>
><br>
> The logp1 and expm1 functions where added for good numerical reasons. The same would not be true for e.<br>
><br>
> On Sat, Feb 16, 2019 at 21:14 chessai . <<a href="mailto:chessai1996@gmail.com" target="_blank">chessai1996@gmail.com</a>> wrote:<br>
>><br>
>> We have the 'pi' constant in the floating typeclass and some trigonometric functions, as well as things like exp/log/expm1/log1p.<br>
>><br>
>> Why not provide an 'e' constant?<br>
>><br>
>> A default implementation could just be 'exp 1'.<br>
>> _______________________________________________<br>
>> Libraries mailing list<br>
>> <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
><br>
> _______________________________________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>