Skip to content
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

Some operations don't disregard out of range bits... #5

Open
tyler opened this issue Mar 4, 2011 · 0 comments
Open

Some operations don't disregard out of range bits... #5

tyler opened this issue Mar 4, 2011 · 0 comments

Comments

@tyler
Copy link
Owner

tyler commented Mar 4, 2011

a = Bitset.new(7)
b = ~Bitset.new(7)
a.hamming(b) #=> 64

The problem is that internally the representation is always some number of 64-bit integers, and so unless we explicitly mask out the bits that exist above the actual content bits, it's easy for them to affect operations.

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

1 participant