Clicky

Fortran Wiki
log_gamma

Description

log_gamma(x) computes the natural logarithm of the absolute value of the Gamma function (Γ\Gamma).

Standard

Fortran 2008 and later

Class

Elemental function

Syntax

x = log_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

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

See also

Gamma function: gamma

category: intrinsics