29 Mar
2002
29 Mar
'02
7:09 a.m.
Richard Fateman wrote:
It is not necessary to have two .sorts in there. I took out the first one, and it was just as fast. Why should this help?
I tried this:
Symbols x,y,z; Local q=(1+x+y+z)^20*(1+(1+z+x+y)^20)-(1+x+z+y)^20*(1+(1+z+x+y)^20); Print; .end
and it took about twice as long as the longest time. (190 seconds)
I also tried Local q=(1+x+y+z)^40 and that takes about .98 seconds Local q=(1+x+y+z)^40- (1+x+z+y)^40 and that takes about 1.7 seconds.
What is going on?
Taking the power is much faster simply because you do *not* apply the chinese powering algorithm as a simple cost analysis shows for any multivariate polynomial. Just make the 40* multiplication loop.