IntegerFactorizationPackage I¶
intfact.spad line 310 [edit on github]
This Package contains basic methods for integer factorization. The factor operation employs trial division up to 10, 000. It then tests to see if n
is a perfect power before using Pollards rho method. Because Pollards method may fail, the result of factor may contain composite factors. We should also employ Lenstra's
elliptic curve method.
- BasicMethod: I -> Factored I
BasicMethod(n)
returns the factorization of integern
by trial division
- factor: I -> Factored I
factor(n)
returns the full factorization of integern
- PollardSmallFactor: I -> Union(I, failed)
PollardSmallFactor(n)
returns a factor ofn
or “failed” if no one is found
- squareFree: I -> Factored I
squareFree(n)
returns the square free factorization of integern