[Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 22 00:12:25 CET 2010


Steven D'Aprano wrote:

> Then they're in for a terrible, terrible disappointment. Rounding issues 
> don't go away because you're using Decimal instead of float,

No, but what I mean is that they prefer to be surprised in
unsurprising ways, so to speak.

Everyone knows that floating point numbers have limited
precision. What really surprises people is when *binary*
floating point numbers behave differently from the decimal
ones they're used to.

-- 
Greg


More information about the Python-Dev mailing list