-
-
Notifications
You must be signed in to change notification settings - Fork 503
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 option to use pari for small_roots #39243
base: develop
Are you sure you want to change the base?
Conversation
Hmm, it seems that the pari |
Actually this would be a breaking change: previously
Maybe rename the new that is, if the Another alternative I can think of is Worst case (if default to pari isn't better in all cases) you can try to do something such as (pseudocode) t = Timer(5, lambda: warning("looks like small_roots() is taking a long time, try using algorithm='pari'?")
B = B.LLL()
t.cancel() then the user still get notification to possibly change, but only if it's slow. |
Documentation preview for this PR (built with commit 1b57621; changes) is ready! 🎉 |
I'll fix the Also, as the example suggests, pari is not only faster than Sage, but also stronger, but it errors sometimes. I don't think there's an objective "better", but maybe we should catch the |
If sage is likely to return |
Use
pari.zncoppersmith
as an alternative Coppersmith implementation forsmall_roots
.I decided to make pari the default because in my testings (in many practical cases, not really "edge cases") it outperforms Sage's default ("basic") implementation, both in speed and strength - see the added test for example.