Brighton Webs Ltd.
statistical and data services for industry

Home
Index
Feedback


Log

In the context of math and stats programming, the log function is usually taken to mean the log to base e of the argument (often called the natural logarithm).  It is often necessary to have the log to base 10 of a number, this can be derived using the log to base e function:

The log function is shown in graphic form below:

Spreadsheets

Both MS Excel and Google Docs spreadsheet have a variety of log functions.  The log function without the optional argument specifying the base, returns the log to base 10 of the argument, eg.

log(10)

Returns 1, the log to base 10 of 10.

Providing an optional argument allows the analyst to specify the base of the logarithm, thus

log(8,2)

returns the log of 8 to base 2, which is 3

In addition the, the log10() and ln() functions return the log of the argument to base 10 and e respectively.

Programming Languages

Most programming languages with a math library have a log function which returns log to base e of the argument.

Comment

When adapting VB or C++ code to a spreadsheet, care should be taken to the correct spreadsheet function.

Page updated: 03-Aug-2008

 

For more information: info@brighton-webs.co.uk