AngouriMath

Navigation

← Back to list of members

Factor​(AngouriMath.​Functions.​PrimeFieldPolynomial)

 Method (no overloads)

Summary

The monic irreducible factors of a monic square-free polynomial over
F_p, in a deterministic order — by degree, then by coefficient from the
leading one down. Their product is the input.

Remarks

Answers null where it declines, which is every case it is not
contracted for rather than only the expensive ones, since a caller that hands
over the wrong shape wants to hear so:
the modulus is composite, or above MaxPrime;the degree is above MaxDegree; the polynomial is not monic — which includes the zero polynomial. A non-monic
one is the caller's to normalise, because the unit it drops belongs in whatever
the caller is reassembling;
the polynomial is not square-free. Berlekamp counts the distinct irreducible factors, so on a repeated one it would return a product short of the
input, and that is a wrong answer rather than a partial one. Square-free
decomposition comes first, and is the caller's.
The constant polynomial 1 is monic and square-free, and its factorisation is the
empty product — so an empty list, not null.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online