log(x) computes the natural logarithm of
x, i.e. the logarithm to the base .
FORTRAN 77 and later
result = log(x)
x- The type shall be
The return value is of type
complex. The kind type parameter is the same as
complex, the imaginary part is in the range .
program test_log real :: x = 2.7182818284590451_8 complex :: z = (1.0, 2.0) x = log(x) ! will yield (approximately) 1 z = log(z) end program test_log