next up previous contents index
suivant: PGCD dans Z/pZ[x] : monter: Le calcul modulaire dans précédent: Inverse dans Z/pZ :   Table des matières   Index


Transformer un entier en sa fraction modulo p : fracmod

fracmod a deux arguments, un entier n (ou une expression entière) et un nombre entier p.
fracmod renvoie une fraction a/b vérifiant -sqrt(n)/2<a<=sqrt(n)/2 et 0<=b<sqrt(n)/2 et tel que n%p*b%p=a%p ou n%p=a%p/b%p.
On tape :
fracmod(3,13)
On obtient :
-1/4
En effet : 3* -4 = - 12 = 1 ( mod 13) donc 3 = - 1/4%13. On tape :
fracmod(13,121)
On obtient :
-4/9
En effet : 13× -9 = - 117 = 4 ( mod 121) donc 13 = - 4/9%13.

Documentation de giac écrite par Renée De Graeve