The module provides factoring methods.
It uses methods of find module to find a factor and classes of util module to track the factorization process.
Factor the given integer n.
By default, use several methods internally.
Optional argument 'method' can be:
(In fact, its initial letter suffice to specify.)
Factor the given integer n by elliptic curve method.
(see ecm of ecm module.)
Factor the given integer n by multi-polynomial quadratic sieve method.
(see mpqsfind of mpqs module.)
Factor the given integer n by Pollard's p-1 method.
The method may fail unless n has an appropriate factor for the method.
(see pmom of find module.)
Factor the given integer n by rho method.
But the method is a probabilistic method, possibly fails in factorizations.
(see rhomethod of find module.)
Factor the given integer n by trial division.
options for the trial sequence can be either:
If none of the options above are given, prime factor is
searched from 2 to the square root of the given integer.
(see trialDivision of find module.)