LOG_GAMMA (The GNU Fortran Compiler)

### 8.188 `LOG_GAMMA` — Logarithm of the Gamma function ¶

Synopsis:

  `X = LOG_GAMMA(X)`

Description:

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

Class:

  Elemental function

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:

      program test_log_gamma
        real :: x = 1.0
        x = lgamma(x) ! returns 0.0
      end program test_log_gamma

Specific names:

  Name | Argument | Return type | Standard
  --- | --- | --- | ---
  `LGAMMA(X)` | `REAL(4) X` | `REAL(4)` | GNU extension
  `ALGAMA(X)` | `REAL(4) X` | `REAL(4)` | GNU extension
  `DLGAMA(X)` | `REAL(8) X` | `REAL(8)` | GNU extension

Standard:

  Fortran 2008 and later

See also:

  Gamma function:
  `GAMMA` — Gamma function