This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients paontis, r.david.murray
Date 2010-09-17.14:27:58
SpamBayes Score 0.00024230902
Marked as misclassified No
Message-id <1284733680.56.0.00451300067875.issue9885@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-09-17 14:28:00r.david.murraysetrecipients: + r.david.murray, paontis
2010-09-17 14:28:00r.david.murraysetmessageid: <1284733680.56.0.00451300067875.issue9885@psf.upfronthosting.co.za>
2010-09-17 14:27:58r.david.murraylinkissue9885 messages
2010-09-17 14:27:58r.david.murraycreate