is the log-gamma function, the logarithm of the gamma function. The gamma function extends the factorial to the reals, but it grows so violently that it is awkward to handle numerically, so the logarithm takes the leading role both in practice and in theory. For we have , so the real logarithm is defined directly.
The graph is drawn over . We have when , at the two points and . As we have and hence , so the -axis is a vertical asymptote.
The derivative is the digamma function . It vanishes at just one point, and that is the minimum.
| Item | Value |
|---|---|
| at the minimum | |
The valley lies between the two intercepts and , and the range is .
The second derivative is the trigamma function, positive throughout .
The function is therefore convex everywhere and has no inflection point. That the gamma function is logarithmically convex is no ornament. Adding logarithmic convexity to and pins the function down to the gamma function alone. That is the Bohr-Mollerup theorem, the ground for saying that the correct extension of the factorial is unique1.
Taking the logarithm of turns a multiplication into an addition.
It reads as saying that shifting by lifts the graph by . At the integers , so the curve is the logarithm of the factorial joined up smoothly.
For large it expands as follows2.
The leading part is . Trying , the true value is matched to six decimal places by taking the expansion only as far as the term.
| , which overflows |
Double-precision floating point tops out around , so overflows. Its logarithm, on the other hand, causes no trouble at all. That is why numerical libraries provide a log-gamma function alongside the gamma function.
A binomial coefficient can be written as follows, so it can be computed for large without overflow.
In statistics the function appears directly in the log-likelihoods of the gamma, beta and Dirichlet distributions.