Manual Reference Pages  - log (3fortran)

NAME

LOG(3) - [MATHEMATICS] Natural logarithm

SYNOPSIS

result = log(x)

       elemental TYPE(kind=KIND) function log(x)

TYPE(kind=KIND),intent(in) :: x

CHARACTERISTICS

o X may be any real or complex kind.
o the result is the same type and characteristics as X.

DESCRIPTION

LOG(3) computes the natural logarithm of X, i.e. the logarithm to the base "e".

OPTIONS

o X : The value to compute the natural log of. If X is real, its value shall be greater than zero. If X is complex, its value shall not be zero.

RESULT

The natural logarithm of X. If X is the complex value (R,I) , the imaginary part "i" is in the range

        -PI < i <= PI

If the real part of X is less than zero and the imaginary part of X is zero, then the imaginary part of the result is approximately PI if the imaginary part of PI is positive real zero or the processor does not distinguish between positive and negative real zero, and approximately -PI if the imaginary part of X is negative real zero.

EXAMPLES

Sample program:

    program demo_log
    implicit none
      real(kind(0.0d0)) :: x = 2.71828182845904518d0
      complex :: z = (1.0, 2.0)
      write(*,*)x, log(x)    ! will yield (approximately) 1
      write(*,*)z, log(z)
    end program demo_log

Results:

          2.7182818284590451        1.0000000000000000
(1.00000000,2.00000000) (0.804718971,1.10714877)

STANDARD

FORTRAN 77

SEE ALSO

****(3)

fortran-lang intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 log (3fortran) April 28, 2024
Generated by manServer 1.08 from 0857daca-a2e8-4726-aee6-eea906f35fed using man macros.