gamma(3f) - [FORTRAN:INTRINSIC:MATHEMATICS] Gamma function
Description
Syntax
Arguments
Return Value
Example
Standard
Class
See Also
gamma(x) computes Gamma of X. For positive, integer values of X the Gamma function simplifies to the factorial function Gamma(x)=(x-1)!.
$$ \Gamma(x) = \int_0**\infty t**{x-1}{\mathrm{e}}**{-t}\,{\mathrm{d}}t $$
x = gamma(x)
X - Shall be of type REAL and neither zero nor a negative integer.
The return value is of type REAL of the same kind as X.
Sample program:
program demo_gamma real :: x = 1.0 x = gamma(x) ! returns 1.0 end program demo_gamma
[[Fortran 2008]] and later
[[Elemental function]]
Logarithm of the Gamma function: [[log_gamma]]
gamma (3) | March 18, 2019 |