series and expansion.
Chris Dams
chrisd at sci.kun.nl
Tue May 18 12:25:11 CEST 2004
Dear developers,
Some time ago I sent a patch to prevent .series() to revert to .expand()
internally. This was because in the case that one has
polynomial^some_large_integer the expansion will be hopeless. However, I
keep running into this kind of problems. To determine the real_ldegree in
mul::pseries, still expansion is used with potentially the same problems.
I think there are two possible solutions to this problem.
(1) Tell your users (me included) that they should not be substituting
polynomials into each others when they should have used power series from
the start.
(2) Create (or ask me to create) a patch that solves this particular case
and hope that there will not be ten other instances where .series() is
going to crash a program.
(3) Forbid any occurance of .expand() in any method or function that may
be called from .series(). Create a new method to determine the leading
behaviour of any expression. Let .series() use this and let .series() work
by calculating power series of subexpressions and combining these into the
power series for the entire expression.
I am in favour of (3). The only reason not to use (3) would be if someone
in this mailing list could come up with an example where (3) clearly is
horribly inefficient.
What do other people think?
Best,
Chris Dams
More information about the GiNaC-devel
mailing list