GAMMA(X) (Fortran 2008)

Purpose

Gamma function.

gamma(x)

Class

Elemental function

Argument type and attributes

X
must be of type real.

Result type and attributes

Same as X.

Result value

The result has a value that approximates Gamma(X).

Examples

GAMMA(1.0) has the value 1.0.

GAMMA(10.0) has the value 362880.0, approximately.

Specific Name Argument Type Result Type Pass As Arg?
GAMMA  1  default real default real yes
DGAMMA  2  4  double precision real double precision real yes
QGAMMA  3  4  REAL(16) REAL(16) yes
Notes:
  • X must satisfy the inequality:
    •  1  -2.0**23 < X ≤ 35.0401, except for nonpositive integral values
    •  2  -2.0**52 < X ≤ 171.6243, except for nonpositive integral values
    •  3  -2.0**105 < X ≤ 171.6243, except for nonpositive integral values
  •  4  IBM extension