the expand() thing.
Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Tue Sep 19 16:12:44 CEST 2000
On Mon, 18 Sep 2000, I wrote:
> Consider this:
> > expand((-1+5*x-5*x^4-10*x^2+x^5+10*x^3)*(1-4*x+x^4+6*x^2-4*x^3)*
> (-1+7*x-35*x^4-21*x^2+21*x^5-7*x^6+35*x^3+x^7)*
> (1-8*x+70*x^4+28*x^2+x^8-56*x^5+28*x^6-56*x^3-8*x^7)*
> (1-6*x+15*x^4+15*x^2-6*x^5+x^6-20*x^3)*(-1+x)^36*
> (-1+9*x+x^9-126*x^4-36*x^2-9*x^8+126*x^5-84*x^6+84*x^3+36*x^7)^2*
> (1-2*x+x^2));
> Out of virtual memory.
Hint: expanding the mul object successively step by step makes it fly.
Is it really a good idea to expand all children first and then do some
gymnastics with them? Or am I missing some point?
(It just comes into my mind that the issue is also of interest for some
algorithms in class matrix. It throws some new light on a number of
empirically inserted additional .expand()s which turned out to be
absolutely necessary to be efficient. I guess I can remove all these once
this is resolved.)
Cheers
-richy.
--
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
More information about the GiNaC-devel
mailing list