Old environment: 32-bit gentoo on AMD Athlon XP
New environment: 64-bit gentoo on AMD64 X2
In the old environment, gmpy.mpz() works correctly. In the new environment it produces incorrect results for with integer values near 2**32, i.e. 4294967296.
Specifically for values from 2**32 - 2 to 2**32 + 9, gmpy.mpz( ) subtracts 2**32 from the value and produces results of -2 to +9.
Integer values below 2**32-2 and above 2**32+9 are processed correctly.
Using longs, rather than ints, produces correct results.
Logged In: YES
user_id=30510
Originator: YES
File Added: test_gmpy_int_vs_long.py
test program
test program output
Logged In: YES
user_id=30510
Originator: YES
File Added: test_gmpy_int_vs_long.out