Google I/O is a wrap! Catch up on TensorFlow sessions

# tfp.math.log_gamma_correction

Returns the error of the Stirling approximation to lgamma(x) for x >= 8.

This is useful for accurately evaluating ratios between Gamma functions, as happens when trying to compute Beta functions.

Specifically,

``````lgamma(x) approx (x - 0.5) * log(x) - x + 0.5 log (2 pi)
+ log_gamma_correction(x)
``````

for x >= 8.

This is the function called Delta in [1], eq (30). We implement it with the rational minimax approximation given in [1], eq (32).

#### References:

[1] DiDonato and Morris, "Significant Digit Computation of the Incomplete Beta Function Ratios", 1988. Technical report NSWC TR 88-365, Naval Surface Warfare Center (K33), Dahlgren, VA 22448-5000. Section IV, Auxiliary Functions. https://apps.dtic.mil/dtic/tr/fulltext/u2/a210118.pdf

`x` Floating-point Tensor at which to evaluate the log gamma correction elementwise. The approximation is accurate when x >= 8.
`name` Optional Python `str` naming the operation.

`lgamma_corr` Tensor of elementwise log gamma corrections.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]