[PATCH] small improvements of gcd and collect_common_factors
Hello! collect_common_factors does not work with powers, e.g. (in ginsh)
collect_common_factors((a*x+a*y)^2); (a*x+a*y)^2
I don't like such a behaviour, so I made the patch. With that patch, the above code actually works:
collect_common_factors((a*x+a*y)^2); a^2*(y+x)^2
To guarantee mathematical correctness, this transformation is applied to polynomial expressions only:
collect_common_factors((a*x+a*y)^n); (a*x+a*y)^n
Apart from collect_common_factors hack, this patch somewhat improves worst-case performance of gcd and sr_gcd. Best regards, Alexei -- ROOT: an octopus made by nailing extra legs onto a cat.
Hi Alexei, your patches have been put into CVS. Thanks a lot !! Regards, Jens
On Fri, Jul 08, 2005 at 12:38:28PM +0200, Jens Vollinga wrote:
your patches have been put into CVS.
I've just noticed that *.install files from debian directory are missing (that's my fault, I've forgotten to put these files to right place before diff'ing). Could you please apply the following patch? diff -Nru debian/ginac-tools.install debian.correct/ginac-tools.install --- debian/ginac-tools.install 1970-01-01 03:00:00.000000000 +0300 +++ debian.correct/ginac-tools.install 2005-07-08 15:02:05.000000000 +0400 @@ -0,0 +1,5 @@ +debian/tmp/usr/bin/ginsh +debian/tmp/usr/bin/viewgar +debian/tmp/usr/share/man/man1/ginsh* +debian/tmp/usr/share/man/man1/viewgar* +debian/ginac.xpm usr/share/pixmaps diff -Nru debian/libginac1.3.install debian.correct/libginac1.3.install --- debian/libginac1.3.install 1970-01-01 03:00:00.000000000 +0300 +++ debian.correct/libginac1.3.install 2005-07-08 15:01:51.000000000 +0400 @@ -0,0 +1 @@ +debian/tmp/usr/lib/libginac*.so.* diff -Nru debian/libginac-dev.install debian.correct/libginac-dev.install --- debian/libginac-dev.install 1970-01-01 03:00:00.000000000 +0300 +++ debian.correct/libginac-dev.install 2005-07-08 15:01:38.000000000 +0400 @@ -0,0 +1,9 @@ +debian/tmp/usr/lib/libginac.la +debian/tmp/usr/lib/libginac.a +debian/tmp/usr/lib/libginac.so +debian/tmp/usr/include/ginac/* +debian/tmp/usr/bin/ginac-config +debian/tmp/usr/share/aclocal/ginac.m4 +debian/tmp/usr/lib/pkgconfig/ginac.pc +debian/tmp/usr/share/info/ginac* +debian/tmp/usr/share/man/man1/ginac-config* Thanks, Alexei.
Hello Alexei, On Fri, Jul 08, 2005 at 03:23:01PM +0400, Sheplyakov Alexei wrote:
I've just noticed that *.install files from debian directory are missing (that's my fault, I've forgotten to put these files to right place before diff'ing). Could you please apply the following patch?
yup, now there are in, too. Thanks. Regards, Jens
participants (2)
-
Jens Vollinga
-
varg@theor.jinr.ru