[GiNaC-devel] series expansion

Jens Vollinga vollinga at physik.uni-wuppertal.de
Wed Apr 26 17:53:34 CEST 2006


Hi,

in order to avoid doubled effort I'd like to make an announcement:
I am currently working on a better series expansion mechanism using 
recurrence relations.

Attached is a patch that shows the principal idea (cf. TAOCP or papers 
from A.C.Norman). This code is very veeeery poorly written and it won't 
go into CVS. It's even very buggy ... Don't mess with the argument of sqrt!

So, it is just a show case (PIV, 3GHz):

doing series( sqrt( (1-x)/(1+x) ), x, N) takes

N=50:
old: 54s
new: 0.2s

N=100:
old: 32m3s (and 360MB of RAM ...!)
new: 1.4s

In the end, the recurrence relations should be determined automatically 
by GiNaC for any (nice) function or operation together with an on-demand 
calculation of arbitrary expansion coefficients (cf. Norman 1975).

BTW, has anybody thought about ways to do Puiseux series? If one doesn't 
care about the strange and obscure functions but concentrates on a 
practical solution for "simple" functions like exp(sqrt(x)) for example, 
it seems to me that the only thing needed would be an additional number 
kept with every pseries that represents the denominator of non-integer 
exponents (like 2 in the case of exp(sqrt(x))). Of course, this reduces 
the performance for the small(?) benefit of rarely(?) used Puiseux 
expansions.

Regards,
Jens




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example.patch
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20060426/48ca4d9f/attachment.ksh>


More information about the GiNaC-devel mailing list