LOG(X)

Purpose

Natural logarithm.

Class

Elemental function

Argument type and attributes

X
must be of type real or complex.
  • If X is real, its value must be greater than zero.
  • If X is complex, its value must not be zero.

Result type and attributes

Same as X.

Result value

The -qxlf2003=signdzerointr option controls whether you get Fortran 2003 behavior. See qxlf2003 in the XL Fortran Compiler Reference

Examples

LOG (10.0) has the value 2.3025851 (approximately).

Specific Name Argument Type Result Type Pass As Arg?
ALOG default real default real yes
DLOG double precision real double precision real yes
QLOG REAL(16) REAL(16) yes  1 
CLOG default complex default complex yes
CDLOG double complex double complex yes  1 
ZLOG double complex double complex yes  1 
CQLOG COMPLEX(16) COMPLEX(16) yes  1 
Note:
  •  1  IBM Extension: the ability to pass the name as an argument.