[GiNaC-list] Problem about series

Feng Feng fengfeng at mail.itp.ac.cn
Mon Apr 8 01:00:22 CEST 2019


Hi, I got a problem  about the series function,
I used the following test code(see below or the attached file),
the s1 output only gives Order(ep^(-1)), while s2 output indicates that
there is a 1/ep^2 term, so the s1 is not correct or I used the series in a wrong way?


Thanks a lot!


#include <ginac/ginac.h>


using namespace GiNaC;
using namespace std;


int main(int argn, char** args) {
    symbol x1("x1"),x2("x2"),x3("x3"),x4("x4");
    symbol ep("ep");
    ex expr = -2*pow(x1,-1 + ep)*(exp(3*ep*Euler)*pow(ep,-1)*pow(x2,-3*ep)*
      pow(1 + x3 + x4 + x3*x4,-3*ep)*
      pow(1 + x2 + x3 + x2*x3 + x4 + x2*x4 + x3*x4 + x2*x3*x4,-2 + 4*ep)*tgamma(3*ep) -
     exp(3*ep*Euler)*pow(ep,-1)*pow(x2,-3*ep)*pow(1 + x3 + x4 + x3*x4,-3*ep)*
      pow(1 + x2 + x3 + x1*x3 + x2*x3 + x4 + x2*x4 + x3*x4 + x1*x3*x4 + x2*x3*x4,
       -2 + 4*ep)*tgamma(3*ep));
    
    auto s1 = expr.series(ep,-1);
    cout << s1.normal() << endl;
    
    auto s2 = expr.series(ep,0);
    cout << s2.normal() << endl;
    
    return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20190408/03525965/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.cpp
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20190408/03525965/attachment.ksh>


More information about the GiNaC-list mailing list