6.32.10 Calcul de an mod p ou de A(x)n mod¶(x),p:
powmod powermod
-
Pour calculer dans [0;p−1]
an mod p on utilise la commande powmod
ou powermod avec comme argument a,n,p.
- Pour calculer A(x)n mod¶(x),p avec en réponse un polynôme
à coefficients dans ℤ, on utilise la commande powmod
ou powermod avec comme argument A(x),n,p,P(x).
On tape :
powmod(5,2,13)
On obtient :
12
On tape :
powmod(5,2,12)
On obtient :
1
On tape :
powmod(x+1,17,5,x^
4+x+1)
On obtient :
-x^
3-x^
2