New submission from Mark Dickinson <dicki...@gmail.com>: 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. ---------- assignee: mark.dickinson keywords: easy messages: 93635 nosy: mark.dickinson priority: high severity: normal stage: needs patch status: open title: round(x) gives wrong result for large odd integers type: behavior versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7070> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com