gives the remainder from dividing p by q, treated as polynomials in x.
Details and Options
- The degree of the result in x is guaranteed to be smaller than the degree of q.
- Unlike PolynomialMod, PolynomialRemainder performs divisions in generating its results.
- With the option Modulus->n, the remainder is computed modulo n.
Examplesopen allclose all
Basic Examples (1)
Find the remainder after dividing one polynomial by another:
The resulting polynomial will have coefficients that are rational expressions of input coefficients:
PolynomialRemainder also works for rational functions:
Euclid's algorithm for the greatest common divisor:
Divide by the leading coefficient:
Properties & Relations (3)
Possible Issues (1)
The variable assumed for the polynomials matters: