gcd takes as arguments two polynomials with
coefficients in ℤ/pℤ (p must be prime).
gcd returns the GCD of these polynomials
computed in ℤ/pℤ[x] (see also
2.25.7 for polynomials with non modular coefficients).
Input :
^
2+5)%13,(5*x^
2+2*x-3)%13)Output :
Input :
^
2+2*x+1,x^
2-1)) mod 5)Output :
Note the difference with a gcd computation in ℤ[X] followed by a reduction modulo 5, input:
^
2+2*x+1,x^
2-1) mod 5Output :