Issue 4310: Comparison of two ints returns wrong result (original) (raw)

The attached program returns a false result on one of my computers with a Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz processor. Is seems the comparison of two int does not perform correctly. I have python 2.5.2 and 2.6.27-7-generic kernel.

The lines of interest are 89-71:

print type(f_p),type(largest),f_p,largest if f_p > largest: print 'foo' largest = f_p

When running this code:

python id_11-2.py | grep 70600

<type 'int'> <type 'int'> 70600674 51267216

python id_11-2.py | grep foo #doesn't return anything

When I run the same code on another machine the end result of the program is 70600674, whereas my current machine the end result is 51267216.