When I run:
import numpy as np
print(hex(int(np.float128(2**64-1))))
print(hex(int(np.float128(2**65-1))))
I get:
0xffffffffffffffff
0x20000000000000000
2**64-1 is correctly returned. However, 2**65-1 is not correctly returned. I should have 112 significant bits (mantissa), so this shouldn't be a problem. But it is.
Any idea what's going on here?