AngouriMath

Navigation

IntegerPolynomial


← Back to list of classes

Description

Summary

A polynomial in one variable over the integers, stored densely.

Remarks

A second polynomial representation next to MultivariatePolynomial, and
deliberately so. That one is sparse, packs eight exponents into a ulong and
carries coefficients over Q, which is what a multivariate greatest common
divisor wants. Factoring wants the opposite of all three: one variable, dense
coefficient access by degree, and coefficients over Z, because every bound the
algorithm relies on — Mignotte's on the size of a factor, the modulus a Hensel lift
has to reach — is a statement about integers. Sharing one type between the two would
mean paying a dictionary lookup per coefficient in the inner loop of the lift and
re-deriving a denominator that is known to be one.
Trailing zero coefficients are never stored, so Degree is
coefficients.Length - 1 and the zero polynomial is the empty array with degree
-1. Coefficients are ordered lowest power first, which is the order the rest of
Functions/Algebra/Polynomials already uses.

Members

























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