[Python-bugs-list] [Bug #122113] Mathematic operations fail on maximum negative integer

noreply@sourceforge.net noreply@sourceforge.net
Fri, 10 Nov 2000 02:43:08 -0800


Bug #122113, was updated on 2000-Nov-10 02:43
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Mathematic operations fail on maximum negative integer

Details: Python documentation states -2147483648 is the largest maximum negative integer value. When attempting mathematical comparisons on this value an overflow error is encountered. The following line will fail:
    if -2147483648 < 50:
        print 'broken'

However assigning this value to a variable and using the variable in the comparison will succeed as will the following:
    maximum = -2147483648
    int(maximum)
This was originally found in 1.5.2 but I have tested it in 2.0 and the problem is still present.

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=122113&group_id=5470