[SciPy-user] Polylogarithms

David M. Cooke cookedm at physics.mcmaster.ca
Fri Jun 16 01:17:32 CDT 2006


On Thu, Jun 15, 2006 at 10:38:20PM -0700, Michael McNeil Forbes wrote:
> Hi,
> 
> Is anyone aware of good python algorithms for computing polylogarithms?
> (The principle branch of the following sum analytically continued for
> larger x).
> 
> Li[s](x) = Sum(x^n/n^s,n=1..infinity)
> 
> Maple offers this as polylog(s,x).  There are a few special cases (dilogs
> for example with s=2) floating around on the internet and in the GNU
> scientific library (the Fermi-Dirac functions) but I have not been able to
> find a good algorithm for general s and x (non-integer s).

It's not going to help you for general s, but the Cephes library has
it for integer s: http://www.moshier.net/#Cephes
(And no, I don't know why we don't have it scipy.special. I guess I
should work on ticket #15.)

Here's an implementation of Lerch Phi (polylog(s,x) = x LerchPhi(x, s, 1)):
http://www.mpi-hd.mpg.de/personalhomes/ulj/jentschura/Source/
It doesn't say what licence it's under, but you can contact the authors.

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca



More information about the SciPy-user mailing list