Menu

#13 mpz problem in gmpy-1.02

open
nobody
None
5
2007-12-29
2007-12-29
No

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.

Discussion

  • David Relson

    David Relson - 2007-12-29

    Logged In: YES
    user_id=30510
    Originator: YES

    File Added: test_gmpy_int_vs_long.py

     
  • David Relson

    David Relson - 2007-12-29

    test program

     
  • David Relson

    David Relson - 2007-12-29

    test program output

     
  • David Relson

    David Relson - 2007-12-29

    Logged In: YES
    user_id=30510
    Originator: YES

    File Added: test_gmpy_int_vs_long.out

     

Log in to post a comment.