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

Fix getBit error. #6

Merged
merged 1 commit into from
Jun 6, 2018
Merged

Fix getBit error. #6

merged 1 commit into from
Jun 6, 2018

Conversation

ndokmai
Copy link
Contributor

@ndokmai ndokmai commented Jun 6, 2018

I made the following changes:

  • There seems to be a linking error with missing libpthread on Ubuntu 18.04 so I link libpthread in Makefile.in.
  • getBit is reverted to the previous version with a slightly more elegant implementation.
  • Instead of calling getBit(x, 65) and assigning it to xi, which is an off-by-one error, 0 is deliberately assigned to xi. (This, however, appears to be exhibiting the same behaviour as if you call getBit(x, 65) because apparently 1lu<<-1 == 0. But I think it's a good idea to keep this explicit.)
  • fss-test.cpp is modified to make sure that it is correct with a=2.

@frankw2 frankw2 merged commit c280387 into frankw2:master Jun 6, 2018
@frankw2 frankw2 mentioned this pull request Jun 6, 2018
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.

2 participants