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

Improving the efficiency of the 'mod_inv' method within the 'mathsHelper' class. Currently, it uses a brute-force approach to find the modular inverse, which may not be optimal for large values of 'm'. Instead, we can utilize the Extended Euclidean Algorithm to compute the modular inverse more efficiently. #794

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oxBinaryBrain
Copy link

@oxBinaryBrain oxBinaryBrain commented Feb 28, 2024

replaced the previous brute-force approach with the Extended Euclidean Algorithm to compute the modular inverse efficiently.
The function returns the modular inverse of a mod m if it exists, or None otherwise.

@oxBinaryBrain oxBinaryBrain changed the title Create python-package.yml Improving the efficiency of the 'mod_inv' method within the 'mathsHelper' class. Currently, it uses a brute-force approach to find the modular inverse, which may not be optimal for large values of 'm'. Instead, we can utilize the Extended Euclidean Algorithm to compute the modular inverse more efficiently. Mar 26, 2024
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

1 participant