### 5.33.2 Euclidean remainder: Rem

Rem is the inert form of rem.
Rem returns the euclidean remainder between two polynomials without evaluation. It is used in conjunction with mod in Maple syntax mode to compute the euclidean remainder of the division of two polynomials with coefficients in ℤ/pℤ.
Input in Xcas mode :

Rem((x`^`3+x`^`2+1) mod 13,(2*x`^`2+4) mod 13)

Output :

rem((x`^`3+x`^`2+1)%13,(2*x`^`2+4)%13)

you need to eval(ans()) to get :

(-2%13)*x+-1%13

Input in Maple mode :

Rem(x`^`3+x`^`2+1,2*x`^`2+4) mod 13

Output :

(-2)*x-1

Input in Maple mode :

Rem(x`^`2+2*x,x`^`2+6*x+5) mod 5

Output :

1*x