log(3f) - [FORTRAN:INTRINSIC:MATHEMATICS] Logarithm function
result = LOG(X)
LOG(X) computes the natural logarithm of X, i.e. the logarithm to the base "e".
X The type shall be REAL or COMPLEX.
The return value is of type REAL or COMPLEX. The kind type parameter is the same as X. If X is COMPLEX, the imaginary part OMEGA is in the range-PI < OMEGA <= PI.
Sample program:
program demo_log implicit none real(kind(0.0d0)) :: x = 2.71828182845904518d0 complex :: z = (1.0, 2.0) x = log(x) ! will yield (approximately) 1 z = log(z) end program demo_log
[[FORTRAN 77]] and later
[[Elemental procedure|Elemental function]]
log (3) | March 11, 2021 |