--Copyright The Numerical Algorithms Group Limited 1996.

a := rootOf(a**2+a+1)
p := y*z**2 + a*z*x**2 + a*a*x*y**2
-- following used to run forever, now returns 1 factor
factor(p,[a])
b:=rootOf(b**2+1)
-- following used to run forever, now returns 2 factors
factor(x**2*y**2+u**2*v**2,[b])
