quorem - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MTM

  

quorem

  

polynomial quotient and remainder

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

q, r := quorem(A, B)

q, r := quorem(A, B, x)

Parameters

A

-

expression or array

B

-

expression or array

q

-

variable

r

-

variable

x

-

(optional) variable

Description

• 

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.

Examples

withMTM:

AMatrix2,3,fill=108xyz2+y3:

BMatrix2,3,fill=27xy:

quoremA,B

4z24z24z24z24z24z2

(1)

q,rquoremx310x2+31x30,x21,x312x2+41x42,x2+2x+1:

q

11

(2)

r

2x210x+122x2

(3)

q,rquorem56,23|45,24,2,7|5,0

q,r2893,002undefined

(4)

q

2893

(5)

r

002undefined

(6)

q,rquoremx2+y,y2+x,x:

q

y2+x

(7)

r

y4+y

(8)

q,rquoremx2+y,y2+x,y:

q

0

(9)

r

x2+y

(10)

See Also

MTM[findsym]

MTM[ldivide]

MTM[Mod]

MTM[rdivide]

rem