Documentation/Calc Functions/GAMMA

From The Document Foundation Wiki
Jump to: navigation, search

Function name:

GAMMA

Category:

Statistical Analysis

Summary:

Calculates the value of the gamma function for a specified real number. In mathematics, the gamma function is an extension to the factorial function, which is only defined for the non-negative integers.

Im-jabber.svg

Note:
Note that GAMMAINV is not the inverse of GAMMA, but of GAMMADIST.

Syntax:

GAMMA(Number)

Returns:

Returns a real number which is the gamma function on Number.

Arguments:

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

  • If Number is a negative integer or 0, then the function returns an error value.

Additional details:

  • The formula for GAMMA function is:
Gamma new.png

where x is the Number.

  • GAMMA(x) can also be expressed as:
Gamma ext.png
  • For more details on gamma function, visit Wikipedia.

Examples:

Formula Description Returns
=GAMMA(10) The function calculates the gamma function value of 10 362880
=GAMMA(2.8) The function calculates the gamma function value of 2.8 1.67649078776444
=GAMMA(-2.8) The function calculates the gamma function value of -2.8 -1.13860211111081
=GAMMA(-9) The function returns error for negative integer values of Number. Err:502
=GAMMA(0) The function returns an error for 0 value of Number. Err:502

Related LibreOffice functions:

GAMMALN

GAMMALN.PRECISE

ODF standard:

Section 6.18.31, part 2

Equivalent Excel functions:

GAMMA