[Python-bugs-list] [ python-Bugs-405849 ] print (float) of Python 2.0
nobody
nobody@sourceforge.net
Sun, 04 Mar 2001 09:28:38 -0800
Bugs #405849, was updated on 2001-03-04 09:28
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405849&group_id=5470
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Nobody/Anonymous
Assigned to: Nobody/Anonymous
Summary: print (float) of Python 2.0
Initial Comment:
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
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405849&group_id=5470