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

Add Miller-Rabin probable prime test #638

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

chiphogg
Copy link
Collaborator

This can mark a number as either "probably prime", or "definitely composite". The first parameter is the base, and the second is the number to test.

See: https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test#Strong_probable_primes

Future PRs will build up the Strong Lucas test which complements this, and then form the Baillie-PSW test by composing the two.

Helps #506.

This can mark a number as either "probably prime", or "definitely
composite".  The first parameter is the base, and the second is the
number to test.

Future PRs will build up the Strong Lucas test which complements this,
and then form the Baillie-PSW test by composing the two.

Helps mpusz#506.
@chiphogg chiphogg requested a review from mpusz November 14, 2024 00:58
@mpusz mpusz merged commit 7e1baf6 into mpusz:master Nov 14, 2024
74 of 76 checks passed
@chiphogg chiphogg deleted the chiphogg/miller-rabin#509 branch November 14, 2024 13:21
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.

2 participants