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 number theory functions #1

Closed
vks opened this issue Mar 20, 2021 · 3 comments
Closed

Implement number theory functions #1

vks opened this issue Mar 20, 2021 · 3 comments
Assignees

Comments

@vks
Copy link

vks commented Mar 20, 2021

It would be nice to implement some number theory functions such as the extended GCD, the modular inverse and the modular power. See https://github.com/vks/discrete-log/blob/master/src/main.rs for a generic implementation that could probably be implemented more efficiently inside this crate.

@tczajka tczajka self-assigned this Mar 20, 2021
@tczajka
Copy link
Owner

tczajka commented Mar 28, 2021

  • Modular arithmetic: addition, subtraction, multiplication.
  • Modular inverse, division.
  • Modular exponentiation.
  • Modular exponentiation to signed powers.
  • GCD
  • Extended GCD

@tczajka
Copy link
Owner

tczajka commented Mar 28, 2021

There is now direct support for modular arithmetic with the ModuloRing type.

@tczajka
Copy link
Owner

tczajka commented Sep 17, 2022

All these functions are now implemented.

@tczajka tczajka closed this as completed Sep 17, 2022
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 a pull request may close this issue.

2 participants