You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
assignee='https://github.com/mdickinson'closed_at=<Date2009-11-09.17:46:04.788>created_at=<Date2009-10-06.08:38:44.487>labels= ['easy', 'type-bug']
title='round(x) gives wrong result for large odd integers'updated_at=<Date2009-11-09.17:46:04.787>user='https://github.com/mdickinson'
The single-argument form of the builtin round function can give
incorrect results for large integers.
>>> x =5e15+1
>>> x ==int(x)
True
>>> x ==round(x) # expect True here
False
>>> x
5000000000000001.0
>>> round(x)
5000000000000002.0
>>> int(x)
5000000000000001
This is already fixed in trunk (and in 3.x); the fix needs to be
backported to release26-maint.
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: