digamma

constexpr Complex digamma(const Complex &z) noexcept

Evaluates the digamma function [1] for a complex input. It has the same definition as the psi function.

Parameters

const Complex &z

A complex number.

Returns

type Complex

A complex number.

The digamma function is the derivative of the natural log of the gamma function. It is defined as:

\[\psi(z) = \frac{\Gamma'(z)}{\Gamma(z)}\]

Example

Complex z = 1.0 + 1_j;
std::cout << digamma(z) << "\n";

Output:

0.0946503 + 1.07667j

References