nag_complex_log_gamma (s14agc) 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.
nag_complex_log_gamma (s14agc) 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 Section [Accuracy].
To obtain the value of
when
is real and positive, s14abc (nag_log_gamma) can be used.