In mathematics, Spence's function, or dilogarithm, denoted as Li2(z), is a particular case of the polylogarithm. Two related special functions are referred to as Spence's function:
Here the series can only be used for |z| < 1, inside its radius of convergence.
A computer routine to compute the dilogarithm using approximation by truncated Chebyshev series is available, for example, as TMath::DiLog() in the open-source ROOT data analysis package.