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=b⁢q+r.
The calls Rem⁡a,b,xmodp and Quo⁡a,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 evala⁡Rem⁡a,b,x and evala⁡Quo⁡a,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+5⁢x3+6:
b≔x2+2⁢x+7:
r≔Rem⁡a,b,x,qmod13
r≔5⁢x+6
q
x2+3⁢x
Expand⁡a−b⁢q−rmod13
0
c≔x2−x+3:
d≔x−RootOf⁡_Z2−3:
evala⁡Quo⁡c,d,x
RootOf⁡_Z2−3+x−1
evala⁡Rem⁡c,d,x
−RootOf⁡_Z2−3+6
See Also
Divide
evala
mod
Powmod
quo
rem
RootOf
Download Help Document