Bug in multivariate GCD



Andre Maute recently forwarded an LCM issue to the list.  It turns out that
ratfac:true makes it run much faster, which is good.

Unfortunately, with ratfac:false, not only does it run slower, but it also
gives an incorrect result! I have tried this will all the GCD algorithms --
I suspect the problem is in the common driver.

factor(gcd(
    (a2+a1+1)^2 * (d+b2-1) * (l2+1)^2 * (l2-a2-a1)^2 * (l2-b2-1) *
(l2-d+(-2)*a2-a1-1) * (l2-d-2*a2-a1),
    (a2+a1+1)^2 * (d+b2-1) * (l2+1)^2 *
                                  (l2-d-2*a2-a1)
   )),ratfac:false;

    (a2+a1+1)^2 *                 (l2+1)^2 *
                                      (l2-d-2*a2-a1)   <<<< wrong

factor(gcd(
    (a2+a1+1)^2 * (d+b2-1) * (l2+1)^2 * (l2-a2-a1)^2 * (l2-b2-1) *
(l2-d+(-2)*a2-a1-1) * (l2-d-2*a2-a1),
    (a2+a1+1)^2 * (d+b2-1) * (l2+1)^2 *
                                  (l2-d-2*a2-a1)
   )),ratfac:false;

    (a2+a1+1)^2 * (d+b2-1) * (l2+1)^2 *
                                  (l2-d-2*a2-a1)   <<<< correct

Tested in Maxima 5.23.2 GCL 2.6.8

I have reported this as bug
3411622<https://sourceforge.net/tracker/?func=detail&aid=3411622&group_id=4933&atid=104933>;
at
sourceforge.

         -s