-
Notifications
You must be signed in to change notification settings - Fork 1
Factorization algorithm
David Hofer edited this page Apr 20, 2016
·
3 revisions
The algorithm for factoring a number n as I've implemented it goes something like the following.
-
Trial division. Using a precomputed number of primes (currently all those less than 1 million), test if any divide
n. If so, add them as factors, dividenby them, and continue -
Perfect power test. Details here: https://github.com/dkhofer/primes/wiki/Finding-perfect-powers
-
Pollard's Rho algorithm.
-
Brute force