-
Notifications
You must be signed in to change notification settings - Fork 10
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
Factorization cliff-edge? #29
Comments
The machine crashed 3 hours later, so I don't get to discover if it would have completed. :( I'll focus on other inputs that use smaller numbers for now. If there is no bug here - if 24+ hours is a realistic time to expect for these factorizations - I'll need to find a different approach to have a chance at finding those larger values. |
Unfortunately this module doesn't have state of the art factoring. The ECM is pretty good, but tuned more for smaller numbers than GMP-ECM. ECM really struggles past 60 or so digits unless there is a small factor. The Quadratic Sieve is great to have but certainly isn't close to state of the art (the code is over 15 years old now). An improved version could perhaps work on this size (I mean, either SIMPQS 2.0 or new code that might practically make it into this module -- yafu's QS definitely works at this size). We only run our QS for numbers between 30 digits and 300 bits (90-ish digits). Running this number I get lots of small attempts then it goes into the loop doing obnoxious amounts of ECM. ECM for a semiprime this size has a miniscule chance of succeeding (this is quite a bit larger than the ECM record, so I would basically give it zero chance), but we're really out of options in this module and we still aren't sure if maybe there is a small-ish factor (20-30 digits) that will let us succeed.
I'd recommend YAFU for these sorts of numbers. With a bit of infrastructure it can be called from Perl. |
I tested with Pari/GP 2.14.0. It successfully factored after 5 hours 48 minutes. |
SIMPQS 2.0 factored successfully in 9.5 hours. |
FWIW I tried this today with the code from #48, after applying the patch below as a naive extrapolation of appropriate configuration parameters. This was on a loaded machine (load average 6):
.. which I think would probably beat your time for PARI had the machine been unloaded. So (depending on the difference between our computers) I believe a less naive extension of the config values would likely support extending the range of sizes that
|
This may well be expected, but reporting it just in case - what's worst case time expected to be for factorizing something just under 100 digits?
I'm running my code [1] on a slightly harder case than before, involving slightly higher numbers (by a few digits). However it appears to have got stuck on one number for over 20h so far, when previous runs tended to stall for at most a few minutes.
I attached to the process to get the current stack trace, below. Assuming mpz_t is storing numbers in an obvious way, 64 bits per limb, I believe the number it is factorizing is: 363277160032028232403370760029415771263823736047870707805583581797268868441456882284309326109905669 (about 3.6e98).
[1] Using the injecting branch, I'm running
./oul -x32e104 -g1000000 92 6
with perl-5.34.0, MPU-0.73, MPUG-0.52, configured with:The text was updated successfully, but these errors were encountered: