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 a bug in the gcd implementation #4

Merged
merged 1 commit into from Feb 17, 2019
Merged

Fix a bug in the gcd implementation #4

merged 1 commit into from Feb 17, 2019

Conversation

ecnerwala
Copy link
Contributor

The gcd implementation requires that a be odd throughout the loop of the binary gcd implementation, but this wasn't enforced (we only made either a or b odd). This fixes the implementation.

For some context, see https://codeforces.com/blog/entry/64203?#comment-480745.

The gcd implementation requires that `a` be odd throughout the loop of the binary gcd implementation, but this wasn't enforced (we only made either `a` or `b` odd). This fixes the implementation. 

For some context, see https://codeforces.com/blog/entry/64203?#comment-480745.
@ecnerwala ecnerwala changed the title Fix a bug in the gcd implementation. Fix a bug in the gcd implementation Jan 2, 2019
@983 983 merged commit d66b5b2 into 983:master Feb 17, 2019
@ecnerwala ecnerwala deleted the patch-1 branch November 24, 2020 08:38
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.

None yet

2 participants