[GiNaC-devel] Bug fixes for polylogs

Stefan Weinzierl stefanw at thep.physik.uni-mainz.de
Sun Jan 12 10:10:39 CET 2014


Hi,

attached is a patch, which fixes several bugs in the file 
inifcns_nstdsums.cpp.
The bugs have been reported to me by Christoph Meyer and Andreas von 
Manteuffel.

In detail, the bugs and its fixes are:

- The method Li_projection of the classical polylogs calls the 
cln-function log(1-x).
   We better avoid calling this function with x=1.

- The method mLi_numeric calls G_numeric, G_numeric expects the signs of 
the imaginary parts
   to be set correctly, so we do this.

- In the methods G3_evalf and G3_eval the user supplied signs of the 
imaginary parts are only relevant
   for x real and positive. A negative sign in the case of x real and 
negative is irrelevant (there is no
   branch cut) and led to wrong results. This is now avoided.

- The method S_num within the Nielsen polylogs can lead to an infinite 
recursion if the argument is close to the sixth root of unity or
   its conjugate. In more detail, the region abs(value)<=1 && 
abs(value)>0.95 && abs(1-value)<=1 && abs(1-value)>0.95
   used to be mapped infinitely times onto itself. This is now avoided.
   This however reveals the next problem: The numerical convergence in this 
region is very slow.
   Within the Nielsen polylogs there is no transformation available to 
improve the convergence.
   However we can use the (1-x)/(1+x) transformation within the harmonic 
polylogs.
   In order to avoid another infinite recursion I have inserted a few 
hold()'s in the method H_evalf, otherwise we would fall back
   immediately again to Nielsen polylogs. The hold()'s should have been 
there anyway.

Not included in this patch are workarounds for bugs caused by first 
comparing a complex floating number against +/-1, and in the case of 
equality
using the operator < later on. This is logically correct and better fixed 
in cln.


  Best wishes,

    Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polylog.patch
Type: text/x-diff
Size: 4929 bytes
Desc: 
URL: <http://www.cebix.net/pipermail/ginac-devel/attachments/20140112/a0d98bc4/attachment.bin>


More information about the GiNaC-devel mailing list