A bug with Sum (as in Monoid)

Brent Yorgey byorgey at gmail.com
Wed Nov 6 21:57:39 UTC 2019


How is that worse than the fact that addition is already not associative
for floating point types?  At least +0 is really the identity up to (==).

On Wed, Nov 6, 2019, 3:49 PM Dannyu NDos <ndospark320 at gmail.com> wrote:

> Sum has bug with floating points. Current definition states +0 as the
> identity element, while the actual identity is -0 since +0 + -0 = +0.
> _______________________________________________
> 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/20191106/aa572a9e/attachment.html>


More information about the Libraries mailing list