Friday, May 7, 2010

python and rounding

From my Python interpreter (version 2.6.5) where I was playing with calculator:
>>> price + 0.2342341
22.234234099999998
>>> round(_,3)
22.234000000000002
Why do I always get the stuff the wrong way?

No comments:

Post a Comment