Status: Started
Owner: fredrik.johansson
Labels: Type-Enhancement Priority-Medium

New issue 1289 by fredrik.johansson: Improvements to integer factorization
http://code.google.com/p/sympy/issues/detail?id=1289

The patch improves factorint and related functions:

* factorint returns a dict instead of a sorted list, which allows for
iterating over just the factors and ignoring exponents (I think maybe the
function primefactors could be removed with this change). However, this
could be changed back if others don't like it. Function arguments were also
changed a bit.

* factorint can now efficiently factor huge numbers with many small
factors, e.g. factorial(10000) or 3**10000. Removed trial(), because it is
not necessary with this improvement.

* factorint is now able to detect perfect powers, e.g. 19 *
nextprime(10**10)**50. The helper function perfect_power tests for perfect
powers. Also improved efficiency of multiplicity()

* More efficient use is made of the Pollard rho and P-1 algorithms. This
means in some cases, large nontrivial factors can be found that previously
couldn't be found, or sometimes they may be found slightly faster.

* Improved integer_nthroot, and made it fall back to mpmath's internal
square root function when n == 2

Attachments:
        0001-Improvements-to-integer-factorization.patch  30.3 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to