Next: , Previous: , Up: Intrinsic Procedures   [Contents][Index]


9.177 LOG_GAMMA — Logarithm of the Gamma function

Description:

LOG_GAMMA(X) computes the natural logarithm of the absolute value of the Gamma (\Gamma) function.

Standard:

Fortran 2008 and later

Class:

Elemental function

Syntax:

X = LOG_GAMMA(X)

Arguments:
XShall 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:
program test_log_gamma
  real :: x = 1.0
  x = lgamma(x) ! returns 0.0
end program test_log_gamma
Specific names:
NameArgumentReturn typeStandard
LGAMMA(X)REAL(4) XREAL(4)GNU Extension
ALGAMA(X)REAL(4) XREAL(4)GNU Extension
DLGAMA(X)REAL(8) XREAL(8)GNU Extension
See also:

Gamma function: GAMMA