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

Implement Euclidean division and modulo #146

Closed
betaveros opened this issue Apr 16, 2020 · 1 comment · Fixed by #245
Closed

Implement Euclidean division and modulo #146

betaveros opened this issue Apr 16, 2020 · 1 comment · Fixed by #245

Comments

@betaveros
Copy link

I see we have floor division and the corresponding modulo operations via the Integer trait. However methods for the subtly different Euclidean division and modulo operations were added to the core Rust primitives in RFC 2169 and it might be good to have them on BigInt for consistency. (If I have missed the implementation, please let me know. I am fairly new to Rust.)

@cuviper
Copy link
Member

cuviper commented Apr 16, 2020

I'm open to it. It would be nice to sort out a common trait for this first (rust-num/num-traits#159), then num-bigint can implement that.

bors bot added a commit that referenced this issue Aug 22, 2023
245: Implement Euclid division and remainder r=cuviper a=jaybosamiya

Now that a common trait for this has been sorted out (rust-num/num-traits#159 implemented and merged in rust-num/num-traits#195), we can now close #146 by implementing the trait for `BigInt`s. This commit does just that.

Co-authored-by: Jay Bosamiya <[email protected]>
Co-authored-by: Josh Stone <[email protected]>
@bors bors bot closed this as completed in 27e4acf Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants