Skip to main content

Module poly_div

Module poly_div 

Source
Expand description

Contains poly_div::poly_div_rem() for computing polynomial division. In most cases, you will instead use this functionality through crate::pid::EuclideanRing::euclidean_div_rem().

Enums§

PolyDivRemReducedErrorunstable-enable
Possible errors that might be returned by poly_div_rem_finite_reduced().

Functions§

fast_poly_div_rem
Computes the polynomial division of lhs by rhs, i.e. lhs = q * rhs + r with deg(r) < deg(rhs), i.e. is functionally equivalent to poly_div_rem().
poly_checked_div_finite_reducedunstable-enable
Checks whether rhs | lhs and returns a quotient if one exists, assuming that the base ring is reduced. If it is not, the function may fail with a nilpotent element of the base ring.
poly_div_remunstable-enable
Computes the polynomial division of lhs by rhs, i.e. lhs = q * rhs + r with deg(r) < deg(rhs).
poly_div_rem_domainunstable-enable
Computes (q, r, a) such that a * lhs = q * rhs + r and deg(r) < deg(rhs). The chosen factor a is in the base ring and is the smallest possible w.r.t. divisibility.
poly_div_rem_finite_reducedunstable-enable
Given polynomials f, g over a finite and reduced ring R, tries to compute the polynomial division of f by g, i.e. values q, r in R[X] with f = q g + r and deg(r) < deg(g).