[GiNaC-devel] series() errors with divide by zero

J Sage jlhsage at gmail.com
Sun Jun 26 04:52:38 CEST 2011


Hi,

There is an error in ginac when taking a series of a function at
a singular point, for instance in ginsh,

> series(sqrt(x),x,3);
power::eval(): division by zero

from ginac-1.6 file power.cpp line 408.

I instrumented power.cpp with some printf functions and found
the offending dispatch to be in line 665:

         coeff = deriv.subs(r, subs_options::no_pattern);

while evaluating the third term in the expansion, presumably with
a 1/x factor.  I'm new to ginac so its taking me a while to learn the
code -- next step is to try and get it running in gdb -- so I'd appreciate
any input from the list about how ginac is handling and/or is
supposed to handle this kind of error.  Other software, like maxima,
handles the problem fine:

(%o6)                      maxima(sqrt(x), x, 0, 3)
(%i7) taylor(sqrt(x),x,0,3);

Thanks in advance,

John

*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20110625/569c5911/attachment.htm>


More information about the GiNaC-devel mailing list