8000 Cannot reliably compare uint64 values to integers? · Issue #5746 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Cannot reliably compare uint64 values to integers? #5746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nasailja opened this issue Apr 4, 2015 · 3 comments
Closed

Cannot reliably compare uint64 values to integers? #5746

nasailja opened this issue Apr 4, 2015 · 3 comments

Comments

@nasailja
Copy link
nasailja commented Apr 4, 2015

According to this program any value between ...cde0 and ...cdef is equal to uint64 value of ...cdef which was a big surprise

import numpy
a = numpy.uint64(0x1234567890abcdef)
if a == 0x1234567890abcde0:
    print("BUG!")

Seems like uint64 is converted to float even when it is compared against standard integers which was another big surprise for me.

@jaimefrio
Copy link
Member

Probably related to #5612.

@nasailja
Copy link
Author
nasailja commented Apr 4, 2015

Looks more like a bug in uint64: #5745

@seberg
Copy link
Member
seberg commented Nov 19, 2022

Closing as duplicate of gh-22624

@seberg seberg closed this as completed Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0