[Numpy-discussion] Float128 integer comparison
Matthew Brett
matthew.brett at gmail.com
Sat Oct 15 14:12:41 EDT 2011
Hi,
Continuing the exploration of float128 - can anyone explain this behavior?
>>> np.float64(9223372036854775808.0) == 9223372036854775808L
True
>>> np.float128(9223372036854775808.0) == 9223372036854775808L
False
>>> int(np.float128(9223372036854775808.0)) == 9223372036854775808L
True
>>> np.round(np.float128(9223372036854775808.0)) == np.float128(9223372036854775808.0)
True
Thanks for any pointers,
Best,
Matthew
More information about the NumPy-Discussion
mailing list