This implements the Polylogarithm and some related functions that were needed (Harmonic numbers, Stieltjes constants, and Bernoulli numbers and polynomials).
The code is aimed at calculating Li_s(z) for all (complex) s and z.
This is still a little experimental, but there is a fairly large test set that all works nicely.
Note that the aimed for accuracy is 1.0e-12 relative error, but that occasional errors as large as 1.0e-11 have been seen.
-
polylog(s, z)
the polylogarithm function -
bernoulli(n)
Provides the first 35 Bernoulli numbers -
bernoulli(n,x)
Provides the Bernoulli polynomials -
harmonic(n)
Provides the Harmonic numbers -
harmonic(n,r)
Provides the generalised Harmonic numbers -
stieltjes(n)
Provides the first 10 Stieltjes (generalized Euler-Mascheroni) constants (see Abramowitz and Stegunm, 23.2.5) or -
dirichlet_beta(z)
Provides the Dirichlet beta function
julia> using Polylogarithms
julia> polylog(2.0, 1.0)
1.6449340668482273
See ...
Extended details of the algorithms being used here are provided at ...
There is another package doing polylogarithms, https://github.com/Expander/polylogarithm but it's using C/CPP/Fortran bindings, and only appears to do s=2,3,4,5,6.