Open
Description
I propose the following strategy for factor(integer):
- do trial division by all primes up to say 1000. This can be done efficiently by a single gcd with the product of all those primes.
- use GMP-ECM, starting from say B1=100, and increasing B1 by sqrt(B1) at each step, until one reaches the _recommended_B1_list value which corresponds to 1/3 of the size of the number to be factored. Thus for a 90-digit input, one will stop at B1=250000.
- try GMP-ECM P-1 and P+1 with respectively 9B1 and 3B1 where B1 is the last value tried for ECM. The corresponding cost of those runs will be approximately the same as the last ECM curve, thus this will not slow down the average computation, and might find a few factors.
- run MPQS or GNFS. You might want to issue a warning to the user (if called from toplevel) at that time.
Apply
- Add an spkg to Sage for Msieve factoring program #5310
- fastify factorization of inferior integers with flint #5945
- Move integer factorization functions to a separate file #10623
- attachment: trac_1145_integer_factorization.patch
Component: factorization
Issue created by migration from https://trac.sagemath.org/ticket/1145