infinite loop on gcd()



Hello all,

Sorry, but this is the smallest expression that I found actually on which
Maxima gcd() function have infinite loop.

To find it I wrote this batch file:

ttyoff:true;
f1:w1;

f2:w5-w3;

f3:w1*w5-w2*w4+w1*w3;

f4:w1^2*w5-w1*w2*w4+w2^2*w3-2*w1^2*w3;

f5:w2^2*w5-w1^2*w5-w1*w2*w4-w2^2*w3+2*w1^2*w3;

g1:p6*w1*w2*w5^3-p7*w1^2*w5^3-p6*w2^2*w4*w5^2+2*p7*w1*w2*w4*w5^2-p6*w1^2*w4*w5^2+p4*w1*w2*w3*w5
^2+p7*w1^2*w3*w5^2-pE*w1*w2^2*w5^2-pD*w1^2*w2*w5^2+pE*w1^3*w5^2-p7*w2^2*w4^2*w5-p4*w1*w2*w4^2*w
5+p6*w2^2*w3*w4*w5-2*p4*w2^2*w3*w4*w5-3*p7*w1*w2*w3*w4*w5+p6*w1^2*w3*w4*w5+p4*w1^2*w3*w4*w5+pE*
w2^3*w4*w5+2*pD*w1*w2^2*w4*w5+pC*w1^2*w2*w4*w5-p6*w1*w2*w3^2*w5+p4*w1*w2*w3^2*w5+2*p7*w1^2*w3^2
*w5-pD*w1^2*w2*w3*w5-pE*w1^3*w3*w5-pC*w1^3*w3*w5+p6*w2^2*w4^3+p4*w2^2*w4^3+2*p7*w2^2*w3*w4^2-2*
p6*w1*w2*w3*w4^2+p2*w1*w2*w3*w4^2-pD*w2^3*w4^2-pE*w1*w2^2*w4^2-pC*w1*w2^2*w4^2-p6*w2^2*w3^2*w4+
p4*w2^2*w3^2*w4-p2*w2^2*w3^2*w4-p7*w1*w2*w3^2*w4+p1*w1*w2*w3^2*w4+p6*w1^2*w3^2*w4-p4*w1^2*w3^2*
w4-p2*w1^2*w3^2*w4-pE*w2^3*w3*w4+pC*w2^3*w3*w4+pD*w1*w2^2*w3*w4+2*pE*w1^2*w2*w3*w4-pA*w1^2*w2*w
3*w4+p6*w1*w2*w3^3-p4*w1*w2*w3^3+p2*w1*w2*w3^3-p7*w1^2*w3^3-p1*w1^2*w3^3+pE*w1*w2^2*w3^2-pC*w1*
w2^2*w3^2-pE*w1^3*w3^2+pC*w1^3*w3^2+pA*w1^3*w3^2;

ttyoff:false;
showtime:true;
:lisp (room)
gcd(g1,fullratsimp(f1*f2));
gcd(g1,fullratsimp(f1*f3));
gcd(g1,fullratsimp(f1*f4));
gcd(g1,fullratsimp(f1*f5));
gcd(g1,fullratsimp(f2*f3));
gcd(g1,fullratsimp(f2*f4));
gcd(g1,fullratsimp(f2*f5));
gcd(g1,fullratsimp(f3*f4));
gcd(g1,fullratsimp(f3*f5));
gcd(g1,fullratsimp(f4*f5));
gcd(g1,fullratsimp(f1*f2*f3));
gcd(g1,fullratsimp(f1*f2*f4));
gcd(g1,fullratsimp(f1*f2*f5));
gcd(g1,fullratsimp(f1*f3*f4));
gcd(g1,fullratsimp(f1*f3*f5));
gcd(g1,fullratsimp(f1*f4*f5));
gcd(g1,fullratsimp(f2*f3*f4));
gcd(g1,fullratsimp(f2*f3*f5));
gcd(g1,fullratsimp(f2*f4*f5));
gcd(g1,fullratsimp(f3*f4*f5));
gcd(g1,fullratsimp(f1*f2*f3*f4));
gcd(g1,fullratsimp(f1*f2*f3*f5));
gcd(g1,fullratsimp(f1*f2*f4*f5));
gcd(g1,fullratsimp(f1*f3*f4*f5));
gcd(g1,fullratsimp(f2*f3*f4*f5));
:lisp (room)

The last gcd call has an infinite loop.

I will tries to find a smaller g1 expression if I can in the first step.
If I can't, maybe I will write a "random polynomials generator"

Laurent