[GiNaC-list] Bug with evalm()?
Chris.Dams at mi.infn.it
Mon Feb 12 10:01:14 CET 2007
Dear Alexei and others,
On Fri, 9 Feb 2007, Sheplyakov Alexei wrote:
> ex test = sin(x).series(x, 5).evalm();
> throws an exception. I'd say this is good, because it urges users
> to fix their sloppy code. But this behaviour is inconsistent with one
> of other eval* methods which are no-op if operation in question is
> meaningless. Unfortunately this change is not suitable for GiNaC 1.3
> due to the A[PB]I breakage.
What about the following code?
m = exp(x), 0,
ex f = m*m;
f = f.series(x,2);
f = evalm(f);
I'd say that it would be best to make .map() also work with power series
and to make it apply the map function to the coefficients of the power
series. In that case I would also like to have pseries::eval check for
zero coefficients and not store these. Any objections againts this idea?
More information about the GiNaC-list