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.
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 7.
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
The remainder term
satisfies the following error bound:
Thus
and hence in theory the function is capable of achieving an accuracy of approximately
significant digits.
None.