[UP]


Manual Reference Pages  - gamma (3)

NAME

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

CONTENTS

Description
Syntax
Arguments
Return Value
Example
Standard
Class
See Also

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


gamma (3) March 18, 2019
Generated by manServer 1.08 from fd24ce25-b3c8-4f2b-afa4-cd62cce6439a using man macros.