signed to unsigned

Dave Angel d at davea.name
Fri Feb 17 20:37:52 CET 2012


On 02/17/2012 02:22 PM, Brad Tilley wrote:
>>>>> 0xffffffff&  -327681234
>> 3967286062
> Very nice! Thanks for that example. Unsigned long longs:
>
> 0xffffffffffffffff&  -9151314442815602945
> 9295429630893948671L
Or more generally, use modulo

-13452324 % 2^64

-- 

DaveA




More information about the Python-list mailing list