Previous Up Next

11.8.6  Euclidean remainder

The rem command finds the remainder of the Euclidean division of two polynomials (see also Section 11.2.3).

Example

rem((x^3+x^2+1)%13,(2*x^2+4)%13)
     
⎛
⎝
⎛
⎝
−2⎞
⎠
%13⎞
⎠
x+⎛
⎝
−1⎞
⎠
%13
          

Indeed, x3+x2+1=(2x2+4)·x+1/2+5x−4/4 and −3· 4=−6· 2≡ 1(mod 13 ).


Previous Up Next