|
Brighton Webs Ltd.
Statistics for Energy and the Environment
|
|
Log Function 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.
Returns 1, the log to base 10 of 10. Providing an optional argument allows the analyst to specify the base of the logarithm, thus
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: 21-May-2009 | |