[GiNaC-list] Problem about series

Richard B. Kreckel kreckel at in.terlu.de
Sun Apr 21 19:59:04 CEST 2019


Feng Feng,

On 13.04.19 07:06, Feng Feng wrote:
> I am sorry for that I didn't make it clear.
> 
> the test program shows that s1 output is Order(ep^(-1)),
> there is no other term in the output, so s1 output indicates
> that there is no ep^(-2) in expr, I am not sure I interpret  the 
> s1 output correctly or not? 

I'm sure you interpret it correctly. There is indeed a bug in GiNaC.

A reduced example of the same problem is this:

        symbol x("x"), ep("ε");
        ex expr = x * (tgamma(ep) / ep - sin(ep) / ep);

        cout << expr.series(ep, -2) << endl;
        // good:  Order(ε^(-2))

        cout << expr.series(ep, -1) << endl;
        // D'oh:  Order(ε^(-1))

        cout << expr.series(ep, 0) << endl;
        // good:  (x)*ε^(-2)+(-Euler*x)*ε^(-1)+Order(1)

It seems it was broken by commit db81420a61 in 2004.

Best,
  -richy.


More information about the GiNaC-list mailing list