#2276 gcd incorrect with ratfac:false

open
nobody
7
2012-11-18
2011-09-19
No

With ratfac:false, GCD gives an incorrect result in a certain case! 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

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks