-
Notifications
You must be signed in to change notification settings - Fork 26
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
probably_prime
is skipping lots of primes, including primes below 2⁶⁴
#51
Comments
The algorithm is based on the implementation in |
Looks like it works fine in Go: https://go.dev/play/p/IfJc2JqaCjL |
Thanks for checking, that is not good. |
Changes based on reviewing the lastest version of golang math/big Closes #51
@darconeous I have a fix, at least for the primes you posted in #54 |
In my initial testing, this seems to be performing much, much better. The output now looks equivalent to OpenSSL's |
Changes based on reviewing the lastest version of golang math/big Closes #51
Thanks a lot for reporting and testing! |
Changes based on reviewing the lastest version of golang math/big Closes #51
From the documentation for
probably_prime
:I have found counterexamples which show this assertion to be false:
All 5 of these prime numbers are lower than 2⁶⁴, yet none cause
probably_prime
to return true.The text was updated successfully, but these errors were encountered: