Hi all,

Just in case anyone has an opinion.  We just merged:

    https://github.com/numpy/numpy/pull/23713/files

That PR makes comparisons like `uint64(2**62) == int64(2**62+1)` exact.

It may seem confusing, why it isn't before.  The reason is that NumPy
promotes `uint64` and `int64` to `float64` which loses precision.

That promotion is odd; the PR changes it only in the context of
comparisons by making sure we don't promote and adding a specific
`uint64` and `int64` comparison (which also solves `uint64` and
`int8`).  Comparisons are probably special enough, since there is no
opportunity to see the intermediate float.

(There should be a larger opportunity for optimizing the comparison.)

Cheers,

Sebastian


_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to