infinite loop on gcd()



Well, the algorithm may be mathematically correct but the fact is, subres
often fails to produce a result even when you wait for hours, whereas spmod
pops up the result in seconds or, perhaps, fails with a memory error within
some reasonable amount of time.

Having said that, I'm happy to accept the consensus, if there's one, that
subres represents the "lesser of two evils", so long as spmod remains there
for cases that subres cannot deal with!


Viktor



 

-----Original Message-----
From: Richard Fateman [mailto:fateman at cs] 
Sent: Tuesday, May 10, 2005 5:57 PM
To: Viktor T. Toth; maxima
Subject: Re: [Maxima] infinite loop on gcd()

1. I don't believe there is a software algorithm bug.
2. Commercial macsyma gave up (illegal mem ref.) probably because
it ran out of stack or memory. (A "system" bug?)
3. Subres works better  / faster much of the time.
4. spmod has its own regimes of bad performance, and I think
that there are a number of reports of bugs in it, typically
manifested by "polynomial quotient not exact" messages.

(What this means is someone computed p=gcd(r,s)  and then
expected to produce a polynomial by exactly dividing r by p.
But it didn't divide.)


RJF


Viktor T. Toth wrote:

>I pretty much got used to switching gcd to spmod for large calculations.
>I've been meaning to ask, why does gcd default to subres (with all the
bugs)
>instead of the apparently far more reliable spmod algorithm?
>
>
>Viktor
>
>  
>