Skip to content

Fix underflow in IsPowerOfTwo - #39

Open
estensen wants to merge 1 commit into
protolambda:masterfrom
estensen:estensen/underflow
Open

Fix underflow in IsPowerOfTwo#39
estensen wants to merge 1 commit into
protolambda:masterfrom
estensen:estensen/underflow

Conversation

@estensen

Copy link
Copy Markdown

For v = 0 the v-1 value will underflow to 18446744073709551615
Then 0000...0000 & 1111...1111 == 0

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

Successfully merging this pull request may close these issues.

1 participant