Common logarithm

From Wikipedia, the free encyclopedia

Enlarge

In mathematics, the common logarithm is the logarithm with base 10. It is also known as the decadic logarithm, named after its base. It is indicated by log10(x), or sometimes Log(x) with a capital L (however, this notation is ambiguous since it can also mean the complex natural logarithmic multi-valued function). On calculators it is usually "log", but mathematicians usually mean natural logarithm rather than common logarithm when they write "log".

Before the early 1970s, hand-held electronic calculators were not yet in widespread use. Because of their utility in saving work in laborious calculations by hand on paper, tables of base-10 logarithms were found in appendices of many books. Such a table of "common logarithms" giving the logarithm of each number in the left-hand column, which ran from 1 to 10 by small increments, perhaps 0.01 or 0.001. There was no need to include numbers not between 1 and 10, since if one wanted the logarithm of, for example, 120, one would know that

\log_{10}120=\log_{10}(10^2\times 1.2)=2+\log_{10}1.2\cong2+0.079181.

The very last number ( 0.079181)—the fractional part of the logarithm of 120, known as the mantissa of the common logarithm of 120—was found in the table. (This stems from an older, non-numerical, meaning of the word mantissa: a minor addition or supplement, e.g. to a text. For a more modern use of the word mantissa, see significand.) The location of the decimal point in 120 tells us that the integer part of the common logarithm of 120, called the characteristic of the common logarithm of 120, is 2.

Similarly, for numbers less than 1 we have

\log_{10}0.12=\log_{10}(10^{-1}\times 1.2)=-1+\log_{10}1.2\cong-1+0.079181=\bar{1}.079181.

The bar over the characteristic indicates that it is negative whilst the mantissa remains positive. Negative logarithm values were rarely converted to a normal negative number (−0.920819 in the example).

Numbers are placed on slide rule scales at distances proportional to the differences between their common logarithms.  By mechanically adding the distance from 1 to 2 on the lower scale to the distance from 1 to 3 on the upper scale, one can quickly determine that 2 x 3 = 6.
Enlarge
Numbers are placed on slide rule scales at distances proportional to the differences between their common logarithms. By mechanically adding the distance from 1 to 2 on the lower scale to the distance from 1 to 3 on the upper scale, one can quickly determine that 2 x 3 = 6.

In addition, slide rules work by using a logarithmic scale.

Contents

[edit] History

Common logarithms are sometimes also called Briggsian logarithms after Henry Briggs, a 17th-century British mathematician.

Because base-10 logarithms were most useful for computations, engineers generally wrote "log(x)" when they meant log10(x). Mathematicians, on the other hand, wrote "log(x)" when they mean loge(x) for the natural logarithm. Today, both notations are found. Since hand-held electronic calculators are designed by engineers rather than mathematicians, it became customary that they follow engineers' notation. So ironically, that notation, according to which one writes "ln(x)" when the natural logarithm is intended, may have been further popularized by the very invention that made the use of "common logarithms" far less common, electronic calculators.

[edit] Numeric value

The numerical value for logarithm to the base 10 can be calculated with the following identity.

\log_{10}(x) = \frac{\log_e(x)}{\log_e(10)} \qquad \mbox{ or } \qquad \log_{10}(x) = \frac{\log_2(x)}{\log_2(10)}

as procedures exists for determining the numerical value for logarithm base e and logarithm base 2.

Alternatively below is a correct but inefficient algorithm that can calculate the common logarithm to an arbitrary number of decimal places. [1]

#!/usr/bin/python
    
from __future__ import division
import math

# Calculates the logarithm (of any base) of a positive number
# to the an arbitary number of decimal places. The accuracy is
# subjected only to limitation of the floating point representation.
def log(X,base=math.e,decimalplace=12):
    integer_value=0
    while X < 1:
        integer_value = integer_value - 1 
        X = X * base
    while X >= base:
        integer_value = integer_value + 1
        X = X / base
    decimal_fraction = 0.0
    partial = 1.0
    # Replace X with X to the 10th power
    X = X ** 10
    while decimalplace > 0:
        partial = partial / 10
        digit=0
        while X >= base:
              digit = digit + 1
              X = X / base
        decimal_fraction = decimal_fraction + digit * partial
        # Replace X with X to the 10th power
        X = X ** 10
        decimalplace = decimalplace - 1
    return integer_value + decimal_fraction


if __name__ == '__main__':
    value = 4.5
    print "                      X  =",value
    print " 6 decimal places LOG(X) =",log(value,base=10,decimalplace=6)
    print " 9 decimal places LOG(X) =",log(value,base=10,decimalplace=9)
    print "12 decimal places LOG(X) =",log(value,base=10,decimalplace=12)

# Sample Run
#
# $ python log.py
#                       X  = 4.5
#  6 decimal places LOG(X) = 0.653212
#  9 decimal places LOG(X) = 0.653212513
# 12 decimal places LOG(X) = 0.653212513775

[edit] An approximation for simpler calculators

Early electronic calculators did not have the ability to calculate logarithms, but many could extract square roots. There is a curious approximation to the common logarithm that can be made on such a calculator. If a number has its square root taken 11 times, is subtracted from by 1, then multiplied by 889, then this is an approximation of the common logarithm of that number, of which accuracy varies. For a wide range of numbers from 10−17 to 10+18, this is accurate to within 1%. In other words:

889\times(x^{1/2048} - 1) \approx \log_{10}x.

It is based on the fact that 889 ln 10 ≈ 2048 and ln xx − 1 for x ≈ 1.

[edit] See also