-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
incorrect isprime results for large numbers #3036
Comments
This doesn't seem to be a matter of witness choices so something is up with the algorithm itself. Good catch. |
The |
One of the intermediate multiplications is overflowing. |
One fix is to do the multiplications with |
Hmm. I'd like to see if I can avoid that. Resorting to 128-bit multiply might be slow. |
Decided that it was more important to fix the broken isprime behavior than to have the absolute fastest possible powermod algorithm. We can always improve it at some point in the future if it becomes a bottleneck for someone. |
The text was updated successfully, but these errors were encountered: