The ^ operator raises modular numbers and polynomials to powers in ℤ/pℤ. (See also Section 7.3.2.) For polynomial expressions, use the normal command to simplify. Xcas uses the binary power algorithm to compute this.
(5%13)^2 |
|
normal(((2*x+1)%13)^5) |
|
because 10≡ −3 (mod 13 ), 40≡ 1(mod 13 ), 80≡ 2(mod 13 ), 32≡ 6(mod 13 ).