Statistical

GAMMALN.PRECISE Formula

Returns the natural logarithm of the gamma function. This is functionally identical to GAMMALN but was introduced for consistency with the .PRECISE naming convention in modern spreadsheets. It computes ln(gamma(x)) with full precision for positive values of x.

Syntax

GAMMALN.PRECISE(x)
ParameterDescription
x Parameter of the GAMMALN.PRECISE function.
Try GAMMALN.PRECISE in Viztab — free, no signup

Examples

Equivalent to GAMMALN

Formula
=GAMMALN.PRECISE(10)
Returns ~12.8018. This equals LN(9!) = LN(362880) = 12.8018, identical to GAMMALN(10).

Small positive value

Formula
=GAMMALN.PRECISE(0.01)
Returns ~4.5995. The gamma function gets very large near zero, so its log is still manageable.

Large argument

Formula
=GAMMALN.PRECISE(200)
Returns ~857.934. Direct computation of gamma(200) would overflow, but the log-gamma is a reasonable number.

Common Errors

#NUM!

x must be positive. Zero and negative values are not in the domain of the gamma function.

#VALUE!

Occurs when the argument is non-numeric.

Tips

Identical to GAMMALN

In practice, GAMMALN and GAMMALN.PRECISE produce the same results. Use whichever is consistent with your spreadsheet's naming conventions.

When to use this

GAMMALN.PRECISE is primarily useful for building custom distribution functions or computing probabilities that involve the gamma function in their formulas.

Stirling's approximation check

For large x, GAMMALN(x) is approximately (x-0.5)*LN(x) - x + 0.5*LN(2*PI()). This can serve as a sanity check for your results.

Try GAMMALN.PRECISE in Viztab

Import your data and use GAMMALN.PRECISE with 370+ other formulas. No signup required.

Open Viztab

Related Formulas