Commit b57f2441 authored by Peter Bruin's avatar Peter Bruin

fix test for coprimality

parent 35d4affa
......@@ -24,7 +24,7 @@ order_mod(GEN x, GEN f) {
unsigned long k;
pari_sp av = avma;
if(!gequal1(ggcd(x, f)))
if(degpol(RgX_gcd(x, f)) != 0)
pari_err(e_MISC, "%Ps not invertible modulo %Ps", x, f);
for(k = 1; !gequal1(gpowgs(gmodulo(x, f), k)); k++);
avma = av;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment