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=bq+r where degreer,x<degreeb,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.
dividex3+x+1,x2+x+1
false
quox3+x+1,x2+x+1,x
x−1
r1≔remx3+x+1,x2+x+1,x,q1
r1≔x+2
q1
a≔x2+x+1q1+r1
a≔x2+x+1x−1+x+2
simplifya
x3+x+1
q2≔quox4−3x+2,x2−x−1,x,r2
q2≔x2+x+2
r2
4
q2+r2x2−x−1
x2+x+2+4x2−x−1
simplify
x4−3x+2x2−x−1
See Also
divide
frem
iquo
irem
prem
Quo
Rem
sprem
Download Help Document