Message116669
Please read
http://docs.python.org/tutorial/floatingpoint.html
Although your case isn't directly covered there, the root cause is the same. Floating point can't exactly represent 10.3.
Note that in Python2.7 and 3.x, the repr will be shortened to 10.3, so if you'd tried this there you would never have noticed the underlying issue.
If you need exact decimal arithmetic, use the Decimal module. |
|
Date |
User |
Action |
Args |
2010-09-17 14:28:00 | r.david.murray | set | recipients:
+ r.david.murray, paontis |
2010-09-17 14:28:00 | r.david.murray | set | messageid: <1284733680.56.0.00451300067875.issue9885@psf.upfronthosting.co.za> |
2010-09-17 14:27:58 | r.david.murray | link | issue9885 messages |
2010-09-17 14:27:58 | r.david.murray | create | |
|