Power in ℤ/pℤ and in ℤ/pℤ[x]: ^

### 5.34.9 Power in ℤ/pℤ and in ℤ/pℤ[x]: ^

The ^ operator raises modular numbers and polynomials to powers in ℤ/pℤ. (See also Section 5.8.2.) For polynomial expressions, use the normal command to simplify. Xcas uses the binary power algorithm to compute this.

#### Examples.

- Input:
  (5%13)^2
  Output:

  ⎛ ⎝ | −1 | ⎞ ⎠ | %13

- Input:
  normal(((2*x+1)%13)^5)
  Output:

  ⎛ ⎝ | 6%13 | ⎞ ⎠ | x5+ | ⎛ ⎝ | 2%13 | ⎞ ⎠ | x4+ | ⎛ ⎝ | 2%13 | ⎞ ⎠ | x3+ | ⎛ ⎝ | 1%13 | ⎞ ⎠ | x2+ | ⎛ ⎝ | ⎛ ⎝ | −3 | ⎞ ⎠ | %13 | ⎞ ⎠ | x+1%13

  because 10=−3 (mod 13), 40=1 (mod 13), 80=2 (mod 13), 32=6 (mod 13).