LOG(3f) - [FORTRAN:INTRINSIC:MATHEMATICS] Logarithm function
Syntax
Description
Arguments
Return Value
Example
Standard
Class
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 real :: x = 2.7182818284590451_8 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 18, 2019 |