pgcd(): detect relatively prime polynomials properly...
authorAlexei Sheplyakov <alexei.sheplyakov@gmail.com>
Tue, 23 Feb 2010 10:01:23 +0000 (12:01 +0200)
committerJens Vollinga <jensv@nikhef.nl>
Wed, 24 Feb 2010 21:30:12 +0000 (22:30 +0100)
commit630e59f66af9fcebb56a442f3aef433b0cc1c0e0
tree214af0975ccd96f9a20e5d10ed6be3889b385717
parentce67a917331907288c6702b05e191722f4f0441b
pgcd(): detect relatively prime polynomials properly...

... so pgcd() doesn't loop forever any more. Division test does not handle
relatively prime polynomials (because C = 1 divides any polynomial). So we
should stop interpolation (and return gcd of contents) if we got relatively
prime images (we should do that for efficiency reasons too).

Thanks to Jörg Arndt for a bug report.
(cherry picked from commit 6afbb9793e359cf388462c471ea256a6662b0cd4)
check/Makefile.am
check/pgcd_relatively_prime_bug.cpp [new file with mode: 0644]
ginac/polynomial/pgcd.cpp