[UP]


Manual Reference Pages  - gamma (3)

NAME

gamma(3f) - [FORTRAN:INTRINSIC:MATHEMATICS] Gamma function

DESCRIPTION

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 $$

SYNTAX

x = gamma(x)

ARGUMENTS

X Shall be of type REAL and neither zero nor a negative integer.

RETURN VALUE

The return value is of type REAL of the same kind as X.

EXAMPLE

Sample program:

   program demo_gamma
   implicit none
     real :: x = 1.0
     x = gamma(x) ! returns 1.0
   end program demo_gamma

STANDARD

[[Fortran 2008]] and later

CLASS

[[Elemental function]]

SEE ALSO

Logarithm of the Gamma function: [[log_gamma(3)


gamma (3) March 11, 2021
Generated by manServer 1.08 from 01c5e973-8b54-4bc7-92f1-514910659e0e using man macros.