[GiNaC-devel] patch for integral::series.
Chris Dams
C.Dams at science.ru.nl
Wed Feb 2 16:04:08 CET 2005
Dear developers,
We, of course, do not want zero as a coefficient in a power series.
However, my integral::series can give such a result. Here is a patch.
Best wishes,
Chris
-------------- next part --------------
Index: ginac/pseries.cpp
===================================================================
RCS file: /home/cvs/GiNaC/ginac/pseries.cpp,v
retrieving revision 1.83
diff -c -r1.83 pseries.cpp
*** ginac/pseries.cpp 29 Oct 2004 11:11:39 -0000 1.83
--- ginac/pseries.cpp 2 Feb 2005 14:55:19 -0000
***************
*** 1100,1111 ****
fexpansion.reserve(fseries.nops());
for (size_t i=0; i<fseries.nops(); ++i) {
ex currcoeff = ex_to<pseries>(fseries).coeffop(i);
! fexpansion.push_back(expair(
! currcoeff == Order(_ex1)
! ? currcoeff
! : integral(x, a.subs(r), b.subs(r), currcoeff),
! ex_to<pseries>(fseries).exponop(i)
! ));
}
// Expanding lower boundary
--- 1100,1111 ----
fexpansion.reserve(fseries.nops());
for (size_t i=0; i<fseries.nops(); ++i) {
ex currcoeff = ex_to<pseries>(fseries).coeffop(i);
! currcoeff=(currcoeff == Order(_ex1))
! ? currcoeff
! : integral(x, a.subs(r), b.subs(r), currcoeff);
! if(currcoeff!=0)
! fexpansion.push_back(
! expair(currcoeff,ex_to<pseries>(fseries).exponop(i)));
}
// Expanding lower boundary
More information about the GiNaC-devel
mailing list