[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: gmpy moving to code.google.com
From: "Daniel Nogradi" <nogradi () gmail ! com>
Date: 2007-02-28 20:22:03
Message-ID: 5f56302b0702281222ped0834aqe19481907bf96b61 () mail ! gmail ! com
[Download RAW message or body]
> Could you please tell me, on that 64-bit build, what happens with:
>
> >>> import gmpy, sys, operator
> >>> sys.maxint
> ???
> >>> gmpy.mpz(sys.maxint)
> ???
> >>> operator.index(gmpy.mpz(sys.maxint))
> ???
> >>> sys.maxint+1
> ???
> >>> gmpy.mpz(sys.maxint+1)
> ???
> >>> operator.index(gmpy.mpz(sys.maxint)+1)
> ???
>
> i.e., what are the values correspondiing to the ??? occurrences when
> you actually do that...?
Here it goes (python 2.5 - 64bit):
>>> import gmpy, sys, operator
>>> sys.maxint
9223372036854775807
>>> gmpy.mpz(sys.maxint)
mpz(-1)
>>> operator.index(gmpy.mpz(sys.maxint))
-1
>>> sys.maxint+1
9223372036854775808L
>>> gmpy.mpz(sys.maxint+1)
mpz(9223372036854775808L)
>>> operator.index(gmpy.mpz(sys.maxint)+1)
0
I don't pretent to fully understand what's going on, but
gmpy.mpz(sys.maxint)==gmpy.mpz(-1) is more than suspicious :)
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic