jax.scipy.special.spence

Contents

jax.scipy.special.spence#

jax.scipy.special.spence(x)[source]#

Spence’s function, also known as the dilogarithm for real values. It is defined to be:

\[\begin{equation} \int_1^z \frac{\log(t)}{1 - t}dt \end{equation}\]

Unlike the SciPy implementation, this is only defined for positive real values of z. For negative values, NaN is returned.

Parameters:

z – An array of type float32, float64.

Return type:

Array

Returns:

An array with dtype=z.dtype. computed values of Spence’s function.

Raises:

TypeError – if elements of array z are not in (float32, float64).

Notes: There is a different convention which defines Spence’s function by the integral:

\[\begin{equation} -\int_0^z \frac{\log(1 - t)}{t}dt \end{equation}\]

this is our spence(1 - z).

Parameters:

x (Array) –