9 May
2007
9 May
'07
2:35 p.m.
Gentlemen, I came across a small problem, when calculating series expansions. The following code hangs, when attempting to compute the expansion: #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { symbol x("x"); ex e1 = pow(2,x)*( 1/x*(-(1+x)/(1-x)) + (1+x)/x/(1-x)); cout << e1 << endl; cout << e1.expand() << endl; cout << e1.series(x,1) << endl; } I tried it with GiNaC 1.3.7 as well as 1.3.1 and 1.3.0. e1 is actually a complicated zero, and the correct answer should we O(x). Best wishes, Stefan