|
From: Richard F. <fa...@be...> - 2014-03-07 15:40:45
|
On 3/7/2014 4:56 AM, andre maute wrote: > > adding gcd:subres made it worse. Well, did the other gcd choke sooner? > I let it run for 5 minutes (> 3Ghz machine) > and cancelled after it allocated over 9 gigabytes. the spmod algorithm should be much better on this example, which has lots of variables. But at least on my system, the ratsimp() worked in a few seconds with spmod. > Did you use gcd:subres when it worked for you with GCL? No, spmod, the default. RJF > Andre > > I believe that SBCL has problems running under windows, but maybe it has been fixed? I don't know if this might be a symptom. See below. Just to be informative about the error message, here is where it occurs. In ratsimp, Maxima computes g, the greatest common divisor (GCD) of the numerator and denominator of a ratio of two polynomials n/d. It then reduces the fraction to (n divided by g) / (d divided by g). Of course this works only if the polynomial g actually divides n and divides d, which it must if it is a correct gcd. And of course the degree in all variables of g must be <= that in n or d. How could these errors happen where g does not divide n or d, then? 1. If there is a bug in the gcd algorithm. 2. The context in which the gcd runs is complicated, e.g. by algebraic numbers or variables. Say there are variables x, y, related by y^3= x^2-1 . At least I am suspicious of that -- in such cases -- spmod may be wrong but subres might work. 3. If there is a subtle bug in the lisp system (SBCL?) running on your operating system which I gather is windows/ mingw. And this is what I might happen with you. I use windows and when I start up SBCL I get a warning ... "This is SBCL 1.0.13, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!"" So I generally use GCL. RJF |