LogGamma
The log-gamma function
Wikipedia
Gamma functionMathWorldLogGammaFunctionGammaFunctionWikidataQ190573Encyclopedia of MathematicsGamma-functionnLabGamma functionBritannicascience/gamma-functionDLMF5.2.E1FungrimLogGammaWolfram LanguageLogGammaLogGamma(z)the log-gamma function Details
- For real
it is simply : , -- where it agrees with compute-engine's own GammaLn. - Elsewhere it is the continuation across the upper and lower half-planes, continuous off
— the convention Wolfram's and mpmath's `loggamma` share. with a principal logarithm jumps by wherever crosses the negative axis; this does not. GammaLn is that principal version, so the two genuinely differ: at , GammaLn is while LogGamma is . at the poles of , the nonpositive integers. - Numerically, Stirling's series for large
with the recurrence — in principal logarithms, which for is exactly the continuation. compute-engine has a complex Gamma but no LogGamma of its own.
Examples
Implementation
referenceengine
notatioThe continuation pinned by lnΓ(1) = 0 and (lnΓ)′ = ψ — which is what makes it the continuation and not Ln(Gamma(z)), whose branch differs off the positive axis.
nativeengine
typescriptpackages/analytic/src/loggamma.tsmappedexternal
wolfram / mpmathpackages/oracle/src/mappings.tsLogGamma[z] and mpmath.loggamma(z) — both the continuation, not Log[Gamma[z]].
See also: Gamma, GammaLn, LogBarnesG, Digamma