Further to the topic of Vepstas regions, defined for positive R as V(R) = the set of complex z for which f(z)=z^2/(z-1) has magnitude less than R. Linas Vepstas, in his software package ANANT for arbitrary precision number theoretical calculations, implements a method of calculating the polylogarithm of complex order s of complex argument z. He defines a complex data type cpx which is simply a pair of pointers to two arbitrary precision real values, ie the real and imaginary parts of a complex number. The routine to calculate polylog(s,z) is cpx_polylog in the mp_polylog.c module of ANANT.
Looking at the code for that module, one sees that, after some preliminary qualification of the argument, the evaluation for z in the unit circle (or on its boundary) comes down to a very neat algorithm. Here, to start things off, is a picture of the boundary of the V(1.225) region (1.225 is approximately square root of 1.5).
If z is in V(1.225), then polylog(s,z) is evaluated directly using an algorithm due to Peter Borwein, which I’ll call the PB algorithm. Otherwise, if z is in the unit circle U but not in V(1.225), a “duplication formula” for polylog is used to transform the calculation of polylog(s,z) to that of a linear combination of polylog(s,-z) and polylog(s,z^2). Suppose that z is complex, in U-V(1.225). Then z has positive real part at least 0.6, and so -z has negative real part, so lies in V(1.225) and polylog(s,-z) is readily calculated with the PB algorithm. Moreover, z^2 is at twice the phase angle of z, so swings up (or down) from the real axis. If z^2 now lies in V(1.225), then the PB algorithm can be used to calculate polylog(s,z^2), and the duplication formula can be used to obtain polylog(s,z) as a linear combination.
Otherwise, suppose that z^2 lies in U but not in V(1.225). Then use the duplication formula again, to express polylog(s,z^2) as a linear combination of polylogs of -z^2 and z^4. The phase angle of z^4 will be twice that of z^2. And so on. Eventually, one gets z^(2^n) which lies in V(1.225), and can complete the calculation. The whole process is a very nice illustration of how recursive coding can simplify a programming task conceptually.
Perhaps in another post I’ll discuss how polylog(s,z) is calculated for z outside the unit circle.
I guess I’d better say something here about the situation of real z between about 0.6 and 1.0. For z less than 1.0, successive applications of the duplication formula will produce z^2, z^4, etc tending towards the origin, so eventually get some z^(2^n) within V(1.225). For z equal to 1, the function polylog(s,1) is identical to the Riemann zeta function, so one can use some other code to calculate Riemann zeta.
Some references so you can follow up on this yourself:
Vepstas paper: Available at the URl http://arxiv.org/abs/math/0702243
ANANT code: Can be downloaded from https://launchpad.net/anant
Best wishes,
Ken Roberts
21-Apr-2014
