Tag: uint64
-
Unexpected uint64 behaviour 0xFFFF’FFFF’FFFF’FFFF – 1 = 0?
28 Consider the following brief numpy session showcasing uint64 data type import numpy as np a = np.zeros(1,np.uint64) a # array([0], dtype=uint64) a[0] -= 1 a # array([18446744073709551615], dtype=uint64) # this is 0xffff ffff ffff ffff, as expected a[0] -= 1 a # array([0], dtype=uint64) # what the heck? I’m utterly confused by this last…