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 BigInt::modpow behavior for negative base #114

Merged
merged 4 commits into from
Oct 9, 2019

Conversation

youknowone
Copy link
Contributor

For signed base, the sign was calculated in wrong way when exp is even

@youknowone youknowone force-pushed the fix-modpow-negative branch from 694f371 to bfbaa45 Compare October 9, 2019 09:03
@cuviper cuviper force-pushed the fix-modpow-negative branch from bfbaa45 to d46db10 Compare October 9, 2019 21:02
@cuviper
Copy link
Member

cuviper commented Oct 9, 2019

Thanks again! I rebased this to pick up #113, and I added a little more to the testing.

bors r+

bors bot added a commit that referenced this pull request Oct 9, 2019
114: Fix BigInt::modpow behavior for negative base r=cuviper a=youknowone

For signed base, the sign was calculated in wrong way when exp is even

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Josh Stone <cuviper@gmail.com>
@bors
Copy link
Contributor

bors bot commented Oct 9, 2019

Canceled

@cuviper
Copy link
Member

cuviper commented Oct 9, 2019

bors r+

bors bot added a commit that referenced this pull request Oct 9, 2019
114: Fix BigInt::modpow behavior for negative base r=cuviper a=youknowone

For signed base, the sign was calculated in wrong way when exp is even

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Josh Stone <cuviper@gmail.com>
@bors
Copy link
Contributor

bors bot commented Oct 9, 2019

Build succeeded

@bors bors bot merged commit 2b6f888 into rust-num:master Oct 9, 2019
@youknowone youknowone deleted the fix-modpow-negative branch October 14, 2019 02:00
@youknowone
Copy link
Contributor Author

@cuviper Is there a plan to release a new version with this patch?

@cuviper cuviper mentioned this pull request Jan 1, 2020
@cuviper
Copy link
Member

cuviper commented Jan 1, 2020

Sorry about that -- it's now released in 0.2.4.

@youknowone
Copy link
Contributor Author

Thanks for the notice!

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