rem
remainder of polynomials
quo
quotient of polynomials
Calling Sequence
Parameters
Description
Examples
rem(a, b, x)
rem(a, b, x, 'q')
quo(a, b, x)
quo(a, b, x, 'r')
a, b
-
polynomials in x
x
name
'q', 'r'
(optional) unevaluated names
The rem function returns the remainder of a divided by b. The quo function returns the quotient of a divided by b. The remainder r and quotient q satisfy: a=b⁢q+r where degree⁡r,x<degree⁡b,x.
If a fourth argument is included in the calling sequence for rem or quo, it will be assigned the quotient q or remainder r, respectively.
divide⁡x3+x+1,x2+x+1
false
quo⁡x3+x+1,x2+x+1,x
x−1
r1≔rem⁡x3+x+1,x2+x+1,x,q1
r1≔x+2
q1
a≔x2+x+1⁢q1+r1
a≔x2+x+1⁢x−1+x+2
simplify⁡a
x3+x+1
q2≔quo⁡x4−3⁢x+2,x2−x−1,x,r2
q2≔x2+x+2
r2
4
q2+r2x2−x−1
x2+x+2+4x2−x−1
simplify⁡
x4−3⁢x+2x2−x−1
See Also
divide
frem
iquo
irem
prem
Quo
Rem
sprem
Download Help Document