Documentation/Calc Functions/GAMMALN

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

GAMMALN

Category:

Statistical Analysis

Summary:

Returns the natural logarithm of a gamma function value. The natural logarithm of the gamma function grows much more slowly than the gamma function and it is often more convenient to add and subtract logs instead of multiplying and dividing very large values.

Syntax:

GAMMALN(Number)

Returns:

Returns a real number which is the same as LN(GAMMA(N)) where N is the Number.

Arguments:

Number is a real number or a reference to the cell containing that number for which the natural logarithm of the gamma function value is to be calculated.

  • If Number is a less than equal to zero, then the function returns an error value.
  • If

Additional details:

  • The formula for the GAMMALN is:
Gammaln.png

where N is the Number

  • For more details on the natural logarithm of the gamma function, visit Wikipedia

Examples:

Formula Description Returns
=GAMMALN(2) The function calculates the natural logarithm of the gamma function value of 2. 0
=GAMMALN(10) The function calculates the natural logarithm of the gamma function value of 10. 12.8018274800815
=GAMMALN(2.8) The function calculates the natural logarithm of the gamma function value of 2.8 0.516702791987746
=GAMMALN(-2.8) The function returns an error for negative values of Number. Err:502
=GAMMALN(0) The function returns an error for 0 value of Number. Err:502

Related LibreOffice functions:

GAMMA

GAMMALN.PRECISE

ODF standard:

Section 6.16.35, part 2

Equivalent Excel functions:

GAMMALN