Skip to main content

Module arithmetic

Module arithmetic 

Source
Expand description

Traits for arithmetic on UnsignedPolynomials.

Modules§

canonicalize_unit
Implementations of CanonicalizeUnit and CanonicalizeUnitAssign, which bring a polynomial into canonical unit form.
compose_power_of_x
Implementations of ComposePowerOfX and ComposePowerOfXAssign, for substituting a power of the variable into a polynomial.
content
Implementations of Content, PrimitivePart, PrimitivePartAssign, and ContentAndPrimitivePart, which compute the GCD of a polynomial’s coefficients and the polynomial divided by it.
deflate_power_of_x
Implementations of DeflatePowerOfX and DeflatePowerOfXAssign, for undoing the substitution of a power of the variable into a polynomial.
div_power_of_x
Implementations of DivPowerOfX and DivPowerOfXAssign, for dividing a polynomial by a power of its variable and discarding the remainder.
evaluate
Implementations of ModEvaluate and ModPowerOf2Evaluate, which evaluate a polynomial at a value modulo a value or a power of 2.
exponent_gcd
An implementation of ExponentGcd, the greatest common divisor of the exponents at which a polynomial has nonzero coefficients.
height
An implementation of Height, the largest of a polynomial’s coefficients.
is_unit
An implementation of IsUnit, a trait for determining whether a number is a unit of its ring.
mod_add
Implementations of ModAdd and ModAddAssign, for adding two polynomials modulo a value.
mod_add_truncated
Implementations of ModAddTruncated and ModAddTruncatedAssign, for adding two polynomials modulo a value and keeping only their low coefficients.
mod_derivative
Implementations of ModDerivative and ModDerivativeAssign, for differentiating a polynomial modulo a number.
mod_integral
Implementations of ModIntegral and ModIntegralAssign, for integrating a polynomial modulo a value.
mod_is_reduced
An implementation of ModIsReduced, which checks whether every coefficient of a polynomial is less than a given modulus.
mod_make_monic
Implementations of ModMakeMonic and ModMakeMonicAssign, which make a polynomial monic modulo a value.
mod_mul
Implementations of ModMul and ModMulAssign, for multiplying two polynomials modulo a value.
mod_mul_truncated
Implementations of ModMulTruncated and ModMulTruncatedAssign, for multiplying two polynomials modulo a value and keeping the low coefficients of the product.
mod_neg
Implementations of ModNeg and ModNegAssign, which negate a polynomial modulo a number.
mod_nth_derivative
Implementations of ModNthDerivative and ModNthDerivativeAssign, for differentiating a polynomial any number of times modulo a number.
mod_op
Implementations of Mod, ModAssign, Rem and RemAssign, which reduce every coefficient of a polynomial modulo a number.
mod_pow
Implementations of ModPow and ModPowAssign, for raising a polynomial to a power modulo a number.
mod_pow_truncated
Implementations of ModPowTruncated and ModPowTruncatedAssign, for raising a polynomial to a power modulo a number and keeping only the low coefficients.
mod_power_of_2
Implementations of ModPowerOf2 and ModPowerOf2Assign, which reduce every coefficient of a polynomial modulo a power of 2.
mod_power_of_2_add
Implementations of ModPowerOf2Add and ModPowerOf2AddAssign, for adding two polynomials modulo $2^k$.
mod_power_of_2_add_truncated
Implementations of ModPowerOf2AddTruncated and ModPowerOf2AddTruncatedAssign, for adding two polynomials modulo $2^k$ and keeping only their low coefficients.
mod_power_of_2_derivative
Implementations of ModPowerOf2Derivative and ModPowerOf2DerivativeAssign, for differentiating a polynomial modulo a power of 2.
mod_power_of_2_integral
Implementations of ModPowerOf2Integral and ModPowerOf2IntegralAssign, for integrating a polynomial modulo $2^k$.
mod_power_of_2_is_reduced
An implementation of ModPowerOf2IsReduced, which checks whether every coefficient of a polynomial is less than a given power of 2.
mod_power_of_2_mul
Implementations of ModPowerOf2Mul and ModPowerOf2MulAssign, for multiplying two polynomials modulo $2^k$.
mod_power_of_2_mul_truncated
Implementations of ModPowerOf2MulTruncated and ModPowerOf2MulTruncatedAssign, for multiplying two polynomials modulo $2^k$ and keeping the low coefficients of the product.
mod_power_of_2_neg
Implementations of ModPowerOf2Neg and ModPowerOf2NegAssign, which negate a polynomial modulo a power of 2.
mod_power_of_2_nth_derivative
Implementations of ModPowerOf2NthDerivative and ModPowerOf2NthDerivativeAssign, for differentiating a polynomial any number of times modulo a power of 2.
mod_power_of_2_pow
Implementations of ModPowerOf2Pow and ModPowerOf2PowAssign, for raising a polynomial to a power modulo a power of 2.
mod_power_of_2_pow_truncated
Implementations of ModPowerOf2PowTruncated and ModPowerOf2PowTruncatedAssign, for raising a polynomial to a power modulo a power of 2 and keeping only the low coefficients.
mod_power_of_2_shl
Implementations of ModPowerOf2Shl and ModPowerOf2ShlAssign, for left-shifting a polynomial modulo a power of 2.
mod_power_of_2_square
Implementations of ModPowerOf2Square and ModPowerOf2SquareAssign, for squaring a polynomial modulo $2^k$.
mod_power_of_2_square_truncated
Implementations of ModPowerOf2SquareTruncated and ModPowerOf2SquareTruncatedAssign, for squaring a polynomial modulo $2^k$ and keeping the low coefficients of the square.
mod_power_of_2_sub
Implementations of ModPowerOf2Sub and ModPowerOf2SubAssign, for subtracting one polynomial from another modulo $2^k$.
mod_power_of_2_sub_truncated
Implementations of ModPowerOf2SubTruncated and ModPowerOf2SubTruncatedAssign, for subtracting one polynomial from another modulo $2^k$ and keeping only their low coefficients.
mod_shl
Implementations of ModShl and ModShlAssign, for left-shifting a polynomial modulo a number.
mod_square
Implementations of ModSquare and ModSquareAssign, for squaring a polynomial modulo a value.
mod_square_truncated
Implementations of ModSquareTruncated and ModSquareTruncatedAssign, for squaring a polynomial modulo a value and keeping the low coefficients of the square.
mod_sub
Implementations of ModSub and ModSubAssign, for subtracting one polynomial from another modulo a value.
mod_sub_truncated
Implementations of ModSubTruncated and ModSubTruncatedAssign, for subtracting one polynomial from another modulo a value and keeping only their low coefficients.
mul_power_of_x
Implementations of MulPowerOfX and MulPowerOfXAssign, for multiplying a polynomial by a power of its variable.