[Haskell-beginners] High precision doubles

ajb at spamcop.net ajb at spamcop.net
Fri Jun 26 03:00:48 EDT 2009


G'day all.

Quoting Rafael Gustavo da Cunha Pereira Pinto <RafaelGCPP.Linux at gmail.com>:

> I am reading this and still don't understand what is the question. You
> should never operate two floating point numbers expecting to result zero.
> Period.

WARNING: Advanced material follows.

A 32-bit integer fits losslessly in the mantissa of a Double.  Any of
the basic integer operations which work correctly on 32-bit integers
must also work correctly when that integer is stored in a Double.  You
are allowed to assume this.

Cheers,
Andrew Bromage


More information about the Beginners mailing list