Rem
inert rem function
Quo
inert quo function
Calling Sequence
Parameters
Description
Examples
Rem(a, b, x)
Rem(a, b, x, 'q')
Quo(a, b, x)
Quo(a, b, x, 'r')
x
-
name (variable)
a, b
polynomials in x
q, r
unevaluated name
The Rem and Quo functions are placeholders for representing the remainder and quotient respectively of a divided by b where a and b are polynomials in the variable x over a field. They are used in conjunction with either mod or evala as described below which define the coefficient domain.
Functionality: Rem returns the remainder r and if the fourth argument q is present then the quotient is assigned to q. Quo returns the quotient q and if the fourth argument r is present then the remainder is assigned to r. The remainder r and quotient q satisfy: a=bq+r.
The calls Rema,b,xmodp and Quoa,b,xmodp compute the remainder and quotient respectively of a divided by b modulo p, a prime integer. The coefficients of a and b must be rational expressions over the rationals or over a finite field specified by RootOf expressions. In particular, if the coefficients are integers then the computation is done over the field of integers modulo p.
The calls evalaRema,b,x and evalaQuoa,b,x compute the remainder and quotient respectively of a and b, where the coefficients of a and b are multivariate polynomials with coefficients in an algebraic number (or function) field.
a≔x4+5x3+6:
b≔x2+2x+7:
r≔Rema,b,x,qmod13
r≔5x+6
q
x2+3x
Expanda−bq−rmod13
0
c≔x2−x+3:
d≔x−RootOf_Z2−3:
evalaQuoc,d,x
RootOf_Z2−3+x−1
evalaRemc,d,x
−RootOf_Z2−3+6
See Also
Divide
evala
mod
Powmod
quo
rem
RootOf
Download Help Document