naginterfaces.library.specfun.gamma_​log_​complex

naginterfaces.library.specfun.gamma_log_complex(z)[source]

gamma_log_complex returns the value of the logarithm of the gamma function for complex , .

For full information please refer to the NAG Library document for s14ag

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/s/s14agf.html

Parameters
zcomplex

The argument of the function.

Returns
lngzcomplex

The value of .

Raises
NagValueError
(errno )

On entry, is ‘too close’ to a non-positive integer when .

Notes

gamma_log_complex evaluates an approximation to the logarithm of the gamma function defined for by

where is complex. It is extended to the rest of the complex plane by analytic continuation unless , in which case is real and each of the points is a singularity and a branch point.

gamma_log_complex is based on the method proposed by Kölbig (1972) in which the value of is computed in the different regions of the plane by means of the formulae

where , are Bernoulli numbers (see Abramowitz and Stegun (1972)) and is the largest integer . Note that care is taken to ensure that the imaginary part is computed correctly, and not merely modulo .

The function uses the values and . The remainder term is discussed in Accuracy.

To obtain the value of when is real and positive, gamma_log_real() can be used.

References

Abramowitz, M and Stegun, I A, 1972, Handbook of Mathematical Functions, (3rd Edition), Dover Publications

Kölbig, K S, 1972, Programs for computing the logarithm of the gamma function, and the digamma function, for complex arguments, Comp. Phys. Comm. (4), 221–226