The functions described in this section are declared in the header file gsl_sf_dilog.h.

Real Argument
-------------

 -- Function: double gsl_sf_dilog (double X)
 -- Function: int gsl_sf_dilog_e (double X, gsl_sf_result * RESULT)
     These routines compute the dilogarithm for a real argument. In Lewin's notation this is Li_2(x), the real part of the dilogarithm of a real x.  It is defined by the integral representation Li_2(x) = - \Re \int_0^x ds \log(1-s) / s. Note that \Im(Li_2(x)) = 0 for $x \le 1$ x <= 1, and -\pi\log(x) for x > 1.

     Note that Abramowitz & Stegun refer to the Spence integral S(x)=Li_2(1-x) as the dilogarithm rather than Li_2(x).

Complex Argument
----------------

 -- Function: int gsl_sf_complex_dilog_e (double R, double THETA, gsl_sf_result * RESULT_RE, gsl_sf_result * RESULT_IM)
     This function computes the full complex-valued dilogarithm for the complex argument z = r \exp(i \theta). The real and imaginary parts of the result are returned in RESULT_RE, RESULT_IM.