[Haskell-cafe] Little errors in number calculations

Abby Henríquez Tejera paradoja at gmail.com
Sat Nov 14 16:00:42 EST 2009


I've seen that in GHC sometimes there are little errors in some basic
number calculations:

*Prelude> 123.35503 * 10.0

*Prelude> properFraction 123.35503

whereas in Hugs no such errors seem to occur (that I have found, at

*Hugs> 123.35503 * 10.0


*Hugs> properFraction 123.35503

I understand that error may (and will) happen in floating point, but
it surprises me that they do so easily, and, above all, the difference
between GHC and Hugs. Does someone know why does this difference

(Thanks in advance, by the way :) ).

More information about the Haskell-Cafe mailing list