# Class polylog (o2scl)¶

template<class fp_t = double, class func_t = funct_ld, size_t max_refine = 15, class internal_fp_t = long double>
class polylog

Class to compute the polylogarithm function.

This class uses integral representations based on the Fermi-Dirac or Bose-Einstein functions to compute the polylog functions.

The relationship between the polylogarithm and the Fermi-Dirac distribution is:

$\mathrm{Li}_{1+s}(-e^{\mu}) = - \frac{1}{\Gamma(s+1)} \int_0^{\infty} \frac{k^{s}}{e^{k-\mu}+1}$
or
$\mathrm{Li}_{s}(z) = - \frac{1}{\Gamma(s)} \int_0^{\infty} \frac{k^{s-1}}{e^{k-\ln(-z)}+1}$
this representation works for negative values of $$z$$.

The relationship between the polylogarithm and the Bose-Einstein distribution is:

$\mathrm{Li}_{1+s}(e^{\mu}) = \frac{1}{\Gamma(s+1)} \int_0^{\infty} \frac{k^{s}}{e^{k-\mu}-1}$
or
$\mathrm{Li}_{s}(z) = \frac{1}{\Gamma(s)} \int_0^{\infty} \frac{k^{s-1}}{e^{k-\ln(z)}-1}$
this representation works for positive values of $$z$$.

Todo

In class polylog, test with higher accuracy floating point types.

A classic reference for the polylogarithm function is [Lewin81].

Note

experimental

Public Functions

inline polylog()
inline void set_tol(fp_t tol)

Set tolerance.

inline fp_t calc(fp_t s, fp_t y)

Polylogarithm function.

Protected Attributes

fermi_dirac_integ_tl<o2scl::inte_exp_sinh_boost<func_t, max_refine, internal_fp_t>, internal_fp_t> it_fd

The integrator for negative arguments.

bose_einstein_integ_tl<o2scl::inte_exp_sinh_boost<func_t, max_refine, internal_fp_t>, internal_fp_t> it_be

The integrator for positive arguments.