This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/48054] New: Documentation for LOG intrinsic function is ambiguous


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48054

           Summary: Documentation for LOG intrinsic function is ambiguous
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: thenlich@users.sourceforge.net


The documentation for the LOG (Logarithm) function does not mention that this
function calculates the natural logarithm, the logarithm to the base e.

Also the example:
            real(8) :: x = 1.0_8
            x = log(x)

is not very meaningful, since the result is 0.0 for all logarithm bases.

Suggested fix:

Change the headline and description to

LOG â Natural logarithm function
LOG(X) computes the logarithm of X to base e.

or to (a modified version of the LOG10 doc):
LOG â Base e logarithm function
LOG(X) computes the base e logarithm of X. 

and change the example to
            real(8) :: x = 2.718281828_8
which yields (approximately) 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]