LOG — Natural logarithm function¶
- LOG(X)¶
LOG(X)computes the natural logarithm ofX, i.e. the logarithm to the base e.- Parameters
X – The type shall be
REALorCOMPLEX.- Returns
The return value is of type
REALorCOMPLEX. The kind type parameter is the same asX. IfXisCOMPLEX, the imaginary part omega is in the range -pi < omega leq pi.
Standard:Fortran 77 and later, has GNU extensions
Class:Elemental function
Syntax:RESULT = LOG(X)
Example:program test_log real(8) :: x = 2.7182818284590451_8 complex :: z = (1.0, 2.0) x = log(x) ! will yield (approximately) 1 z = log(z) end program test_log
Specific names:Name
Argument
Return type
Standard
ALOG(X)REAL(4) XREAL(4)Fortran 77 or later
DLOG(X)REAL(8) XREAL(8)Fortran 77 or later
CLOG(X)COMPLEX(4) XCOMPLEX(4)Fortran 77 or later
ZLOG(X)COMPLEX(8) XCOMPLEX(8)GNU extension
CDLOG(X)COMPLEX(8) XCOMPLEX(8)GNU extension