GAMMA — Gamma function¶
- GAMMA(X)¶
GAMMA(X)computes Gamma (Gamma) ofX. For positive, integer values ofXthe Gamma function simplifies to the factorial function Gamma(x)=(x-1)!.- Parameters
X – Shall be of type
REALand neither zero nor a negative integer.- Returns
The return value is of type
REALof the same kind asX.
Standard:Fortran 2008 and later
Class:Elemental function
Syntax:X = GAMMA(X)
Example:program test_gamma real :: x = 1.0 x = gamma(x) ! returns 1.0 end program test_gamma
Specific names:Name
Argument
Return type
Standard
DGAMMA(X)REAL(8) XREAL(8)GNU extension
See also:Logarithm of the Gamma function: LOG_GAMMA