MTM
quorem
polynomial quotient and remainder
Calling Sequence
Parameters
Description
Examples
q, r := quorem(A, B)
q, r := quorem(A, B, x)
A
-
expression or array
B
q
variable
r
x
(optional) variable
The quorem(A,B,x) function computes the element-wise quotient and remainder of A and B. Each expression in A and B is interpreted as a polynomial of x.
If the optional argument x is omitted, then x is equal to findsym(A,1) if findsym(A,1) is not empty. Otherwise, x is equal to findsym(B,1) if findsym(B,1) is not empty. Otherwise, each expression in A and B must evaluate to an integer. In this last case, the quorem(A,B) function computes the element-wise integer quotient and remainder of A and B.
If A is a scalar, then A is divided by each element of B.
If B is a scalar, then each element of A is divided by B.
When both and A and B are non-scalar, they must be the same size.
with⁡MTM:
A≔Matrix⁡2,3,fill=108⁢x⁢y⁢z2+y3:
B≔Matrix⁡2,3,fill=27⁢x⁢y:
quorem⁡A,B
4⁢z24⁢z24⁢z24⁢z24⁢z24⁢z2
q,r≔quorem⁡x3−10⁢x2+31⁢x−30,x2−1,x3−12⁢x2+41⁢x−42,x2+2⁢x+1:
11
2⁢x2−10⁢x+12−2⁢x−2
q,r≔quorem⁡56,23|45,24,2,7|5,0
q,r≔2893∞,002undefined
2893∞
002undefined
q,r≔quorem⁡x2+y,y2+x,x:
−y2+x
y4+y
q,r≔quorem⁡x2+y,y2+x,y:
0
x2+y
See Also
MTM[findsym]
MTM[ldivide]
MTM[Mod]
MTM[rdivide]
rem
Download Help Document