Skip to content

LogGamma

The log-gamma function as an analytic continuation (branch cut on ), which differs from by multiples of off the positive axis. Provided by `@enumeratio/analytic`.

LogGamma(z)the log-gamma function , analytically continued.

Domain: Special functions

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

referenceenginenotatio

The 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.

nativeenginetypescriptpackages/analytic/src/loggamma.ts
mappedexternalwolfram / mpmathpackages/oracle/src/mappings.ts

LogGamma[z] and mpmath.loggamma(z) — both the continuation, not Log[Gamma[z]].

See also: Gamma, GammaLn, LogBarnesG, Digamma