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 nobody
Recipients
Date 2001-03-04.17:28:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Python's float type is double precision.
Look at the position where the numbers are rounded. 


Result on Python 2.0 (or 2.1 alpha 2)

>>> 0.8
0.80000000000000004
>>> print 0.80000000000000004
0.8
>>> print 0.8000000000004
0.8
>>> print 0.7999999999999
0.8
>>> print 0.7999999999995
0.8
>>> print 0.7999999999994
0.799999999999



Result on Jython 2.0

>>> 0.8
0.8
>>> print 0.80000000000000004
0.8
>>> print 0.8000000000004
0.8000000000004
>>> print 0.7999999999999
0.7999999999999
>>> print 0.7999999999995
0.7999999999995
>>> print 0.7999999999994
0.7999999999994

History
Date User Action Args
2007-08-23 13:53:26adminlinkissue405849 messages
2007-08-23 13:53:26admincreate