Barton Willis
-
2023-08-02
- summary: submod bug when algebraic is true --> spmod bug when algebraic is true
Here is a bug that manifests when gcd = spmod
and algebraic = true.
Define p
and dp
(%i1) p : gfactor(-((z-1)*(2*z-%i-2)^2));
(%o1) -(z-1)*(2*z-%i-2)^2
(%i2) dp : gfactor(diff(p,z));
(dp) -(2*z-%i-2)*(6*z-%i-6)
Both are OK
(%i3) block([gcd : subres, algebraic : false], gcd(p,dp));
(%o3) 2*z-%i-2
(%i4) block([gcd : subres, algebraic : true], gcd(p,dp));
(%o4) 2*z-%i-2
Wrong for gcd = spmod
and algebraic = true
(%i5) block([gcd : spmod, algebraic : true], gcd(p,dp));
(%o5) 1
But OK for gcd = spmod
and algebraic = false
(%i6) block([gcd : spmod, algebraic : false], gcd(p,dp));
(%o6) 2*z-%i-2