Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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']
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
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
No branches or pull requests
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: