loggamma
LogGamma denotes the natural logarithm of the gamma function, written as log Γ(z) or sometimes lgamma. It is a complex-valued function defined for complex numbers z with Γ(z) ≠ 0, and for real arguments z > 0 it reduces to the natural logarithm of the gamma function, log Γ(z) = ln Γ(z). For positive integers n, log Γ(n) = ln (n-1)!.
Analytic structure: Γ has simple poles at nonpositive integers, so log Γ is analytic on the complex plane
Important identities include the recurrence log Γ(z+1) = log z + log Γ(z) and the reflection formula log
Asymptotics and computation: Stirling-type expansions give log Γ(z) ~ (z−1/2) log z − z + (1/2) log(2π) + ∑ B_{2k}/(2k(2k−1) z^{2k−1})
In programming, functions named loggamma or lgamma appear in many libraries; care is needed for complex arguments