-
Notifications
You must be signed in to change notification settings - Fork 31
Add modular exponentiation and modular inverse, closes #45 #65
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
3d5b522
Add modular exponentiation
dlesnoff daec81c
Add modular inverse to complete modular exponentiation
dlesnoff 7235a40
Fix indentation and docstring for modular inverse
dlesnoff 63979d6
Test if integer is invertible modulo composite modulus
dlesnoff 11c08ea
Changed to if..elif..else construct and add tests for zero
dlesnoff 14bbd54
Merge branch 'master' into devel
narimiran 9f8811d
Optimize loop checks in powmod
dlesnoff 2eb864c
Update docstring of invmod
dlesnoff c20bcf6
Add runnableExamples and some recommandations
dlesnoff 4428d18
Rename variables invmod
dlesnoff 6e9ddd1
Add tests for negative integers for invmod
dlesnoff 010845b
Apply suggestions from code review
dlesnoff 1a0dc03
Avoid a function call if exponent is negative
dlesnoff ceb2f35
Remove ternary operators
dlesnoff 60c6a6d
Fix <0 comparison test
dlesnoff 2412bce
Add modular exponentiation
dlesnoff 189b061
Rebase tests
dlesnoff e3a3823
Fix indentation and docstring for modular inverse
dlesnoff e52effc
Test if integer is invertible modulo composite modulus
dlesnoff 8cced8a
Changed to if..elif..else construct and add tests for zero
dlesnoff 4bbfa5b
Optimize loop checks in powmod
dlesnoff 6bff716
Update docstring of invmod
dlesnoff 961466f
Add runnableExamples and some recommandations
dlesnoff a07a52a
Apply suggestions from code review
dlesnoff 8371690
Avoid a function call if exponent is negative
dlesnoff cc1ba71
Remove ternary operators
dlesnoff c4a4710
Fix <0 comparison test
dlesnoff da464b1
remove a merge conflict
dlesnoff 4d4871d
Merge original branch with rebased local branch
dlesnoff c057c6e
Remove modexp example
dlesnoff 65c5766
Add more tests for invmod
dlesnoff fa0f002
Merge branch 'master' into devel
dlesnoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.