Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2004-03-19.14:23:05.000> created_at = <Date 2004-03-19.13:20:25.000> labels = ['interpreter-core', 'invalid'] title = 'Math Division Problem?' updated_at = <Date 2004-03-19.14:23:05.000> user = 'https://bugs.python.org/grasp81'
bugs.python.org fields:
activity = <Date 2004-03-19.14:23:05.000> actor = 'sjoerd' assignee = 'none' closed = True closed_date = None closer = None components = ['Interpreter Core'] creation = <Date 2004-03-19.13:20:25.000> creator = 'grasp81' dependencies = [] files = [] hgrepos = [] issue_num = 919498 keywords = [] message_count = 2.0 messages = ['20270', '20271'] nosy_count = 2.0 nosy_names = ['sjoerd', 'grasp81'] pr_nums = [] priority = 'normal' resolution = 'not a bug' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue919498' versions = ['Python 2.3']
Using Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
A mere real division resulted in this: >>> 7.0/3 2.3333333333333335
Mind the trailing '5'. Did I miss my University classes too much? ;)
Amazingly, >>> 4.0/3 1.3333333333333333 - works OK.
Logged In: YES user_id=43607
This is not a bug.
Binary floating point cannot represent decimal fractions exactly, so some rounding always occurs (even in Python 1.5.2).
What changed is that Python 2.0 shows more precision than before in certain circumstances (repr() and the interactive prompt).
You can use str() or print to get the old, rounded output:
>>> print 0.1+0.1 0.2 >>>
Follow the link for more information:
http://www.python.org/doc/2.2.1/tut/node14.html
Activity
grasp81 commented on Mar 19, 2004
Using
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC
v.1200 32 bit (Intel)] on win32
Mind the trailing '5'. Did I miss my University classes too
much? ;)
sjoerdmullender commented on Mar 19, 2004
Logged In: YES
user_id=43607
This is not a bug.
Binary floating point cannot represent decimal fractions exactly,
so some rounding always occurs (even in Python 1.5.2).
What changed is that Python 2.0 shows more precision than before
in certain circumstances (repr() and the interactive prompt).
You can use str() or print to get the old, rounded output:
Follow the link for more information:
http://www.python.org/doc/2.2.1/tut/node14.html