subres vs spmod



Some years ago we found bugs in subres, so  we changed the default for 
gcd from subres to spmod. Here is an example where subres is better than 
spmod:

 (%i567) p : z^3-2*sqrt(sqrt(3)*%i-37)*z^2-56*z+16*sqrt(sqrt(3)*%i-37);
 (%o567) z^3-2*sqrt(sqrt(3)*%i-37)*z^2-56*z+16*sqrt(sqrt(3)*%i-37)

(%i568) (algebraic : true, load(hypergeometric))$

Wrong! p has a double root:

 (%i569) gcd(p,diff(p,z),z), gcd : spmod;
 (%o569) 1

Correct:

 (%i594) gcd(p,diff(p,z),z), gcd : subres;
 (%o594) 7*z+sqrt(sqrt(3)*%i-37)*(sqrt(3)*%i-5)

Verify:

(%i595) solve(%,z);
(%o595) [z=-(sqrt(sqrt(3)*%i-37)*(sqrt(3)*%i-5))/7]

(%i597) expand(float(%));
(%o597) [z=4.310800997988466*%i+1.607173059834678]

(%i598) solve(p,z);
(%o598) 
[z=((-(sqrt(3)*%i)/2-1/2)*(sqrt(3)*%i-37)^(1/6)*(8*sqrt(3)*%i-8)^(1/3))/3+(((sqrt(3)*%i)/2-1/2)*(4*sqrt(3)*%i+20))/(3*(sqrt(3)*%i-37)^(1/6)*(8*sqrt(3)*%i-8)^(1/3))+(2*sqrt(sqrt(3)*%i-37))/3,z=(((sqrt(3)*%i)/2-1/2)*(sqrt(3)*%i-37)^(1/6)*(8*sqrt(3)*%i-8)^(1/3))/3+((-(sqrt(3)*%i)/2-1/2)*(4*sqrt(3)*%i+20))/(3*(sqrt(3)*%i-37)^(1/6)*(8*sqrt(3)*%i-8)^(1/3))+(2*sqrt(sqrt(3)*%i-37))/3,z=((sqrt(3)*%i-37)^(1/6)*(8*sqrt(3)*%i-8)^(1/3))/3+(4*sqrt(3)*%i+20)/(3*(sqrt(3)*%i-37)^(1/6)*(8*sqrt(3)*%i-8)^(1/3))+(2*sqrt(sqrt(3)*%i-37))/3]

(%i599) map(lambda([s], nfloat(rhs(s),[],25)),%);
(%o599) 
[4.310800997988466918092507b0*%i+1.607173059834678277266274b0,3.547253197089032487662952b0*%i-2.929676644999984014789875b0,4.310800997988466918092507b0*%i+1.607173059834678277266274b0]

The first and last entries are apparently the same. Maybe solve should 
only two solutions. With
the nested square root, I wasn't sure that gcd(p,diff(p,z),z), gcd : 
subres would be correct.

--Barton