By Claude:
With algebraic : true, gcd signals quotient by zero for some arguments that contain radicals of a variable, like sqrt(z) and sqrt(sqrt(z)+1):
(%i1) display2d : false$
(%i2) algebraic : true$
(%i3) r : sqrt(sqrt(z)+1)$
(%i4) h : r*z^2+sqrt(z)$
(%i5) gcd(expand(h*r), expand(h*(z^2-sqrt(z)+1)));
`quotient' by `zero'
-- an error. To debug this try: debugmode(true);
gcd should return a result for any two expressions. The settings gcd : subres, gcd : red, gcd : ez and gcd : mod give the same error.
linsolve runs into the same error internally and then returns a solution that does not satisfy the equations:
(%i6) eqs : [(r*z+1)*x + (z^2+sqrt(z))*y = z+1, (z+1)*x + (r*z+1)*(z^2+sqrt(z))*y = 1]$
(%i7) sol : linsolve(eqs, [x, y])$
(%i8) float(subst(z = 2, subst(sol, map(lhs, eqs) - map(rhs, eqs))));
(%o8) [10.418634615153174,7.609382590462796]
Both numbers should be 0.0 up to rounding. For other systems linsolve signals the error instead, and nested radicals are not needed for that:
(%i9) eqs : [(z^2+sqrt(z))*x + (sqrt(z+1)+sqrt(z))*y = z^2*sqrt(z+1)+1, (z^2*sqrt(z+1)+1)*x + (z^2+sqrt(z))*(sqrt(z+1)+sqrt(z))*y = 1]$
(%i10) sol : linsolve(eqs, [x, y])$
`quotient' by `zero'
-- an error. To debug this try: debugmode(true);