LOG_GAMMA(3) - [MATHEMATICS] Logarithm of the absolute value of the Gamma function
result = log_gamma(x)
elemental real(kind=KIND) function log_gamma(x)real(kind=KIND),intent(in) :: x
o X may be any real type o the return value is of same type and kind as X.
LOG_GAMMA(3) computes the natural logarithm of the absolute value of the Gamma function.
o X : neither negative nor zero value to render the result for.
The result has a value equal to a processor-dependent approximation to the natural logarithm of the absolute value of the gamma function of X.
Sample program:
program demo_log_gamma implicit none real :: x = 1.0 write(*,*)x,log_gamma(x) ! returns 0.0 write(*,*)x,log_gamma(3.0) ! returns 0.693 (approximately) end program demo_log_gammaResults:
> 1.000000 0.0000000E+00 > 1.000000 0.6931472
Fortran 2008
Gamma function: GAMMA(3)
Fortran intrinsic descriptions
Nemo Release 3.1 | log_gamma (3fortran) | November 02, 2024 |