-
Notifications
You must be signed in to change notification settings - Fork 48
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
Integer::extended_gcd should not permit unsigned value. #40
Comments
May be we can require |
Yeah, we do require |
Alternatively, it's possible to support Edit: because assert_eq!(
gcd,
(x * a + y * b) % (a * b),
); |
@aj-r interesting, thanks! I'm open to "fixing" unsigned with that kind of implementation, as long as we're careful to document the difference -- and ideally how to reconstruct what the signed result would have been. |
Maybe we could then drop |
This code fails to get the y value, with the error 'attempt to subtract with overflow'.
The text was updated successfully, but these errors were encountered: