AngouriMath
Navigation
TryFactorize(PeterO.Numbers.EInteger)
Method (no overloads)
Summary
The prime factorisation of n , the primes in increasing order, empty for an
n below 2, or null where a factor is neither proven prime nor split.
Remarks
This was trial division over long , and for every n past 2^63 it threw
OverflowException , though the first division finds a factor like 2 or 7 at any size: phi(7^30) threw from Simplify . Its loop ran while the square of the divisor was at most the running totient,
not what was left to factor, so2^62 took 1.5e9 divisions after the first had divided every 2 out;
and past 3037000499 that square wrapped negative, so the largest prime below 2^63 never finished. Now trial
division in EInteger to TrialDivisionLimit, bounded by what is left, then
IsPrime(PeterO.Numbers.EInteger), Miller–Rabin and Lucas–Lehmer, for the rest, and Pollard's rho to split a
rest that is composite. https://github.com/asc-community/AngouriMath/issues/2342
not what was left to factor, so
and past 3037000499 that square wrapped negative, so the largest prime below 2^63 never finished. Now trial
division in EInteger to TrialDivisionLimit, bounded by what is left, then
IsPrime(PeterO.Numbers.EInteger), Miller–Rabin and Lucas–Lehmer, for the rest, and Pollard's rho to split a
rest that is composite. https://github.com/asc-community/AngouriMath/issues/2342
Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 5629 pages online