[Haskell-cafe] Why 'round' does not just round numbers ?

ajb at spamcop.net ajb at spamcop.net
Mon Oct 27 21:40:01 EDT 2008

G'day all.

Henning Thielemann suggested:

> In measured data the .5-case should be very rare - a "null set"?  
> However I assume that .5 happens more often in practice - because of  
> prior rounding, which was shown to be bad practice in this thread.

The usual case in floating point is usually not 0.5, but some power of
0.5 just beyond the precision of the mantissa.  And this is actually
one of the most common cases in rounding, due to the fact that we use
binary arithmetic.

Andrew Bromage

More information about the Haskell-Cafe mailing list