Hitung logaritma natural dari fungsi gamma.
=GAMMALN(x)
| Parameter | Deskripsi |
|---|---|
x |
A positive real number for which you want to calculate the natural logarithm of the gamma function. |
For example, the following formula calculates the natural logarithm of the gamma value for 5:
=GAMMALN(5) // returns 3.17805383
The GAMMALN function takes a single argument as input like this:
=GAMMALN(x)
The argument x is the value for which you want to calculate the natural logarithm of the gamma function. Here are some basic examples showing both int
=GAMMALN(0.5) // returns 0.57236494...
=GAMMALN(2.0) // returns 0
=GAMMALN(2.5) // returns 0.28468287...
=GAMMALN(4.0) // returns 1.79175947...
In general, the GAMMALN function is equivalent to the natural logarithm of the GAMMA function:
=GAMMALN(x) // returns LN(GAMMA(x))
This relationship makes the GAMMALN function useful for calculations involving large factorials, as it avoids direct computation of large numbers. For
=GAMMA(172) // returns #NUM! error
The GAMMALN function returns #NUM! for zero and negative numbers, and #VALUE! for non-numeric inputs.
=GAMMALN(0) // returns #NUM! error
=GAMMALN(-1) // returns #NUM! error
=GAMMALN(-2.5) // returns #NUM! error
=GAMMALN("text") // returns #VALUE! error