## 1.6 Short Examples

Let’s look at our two numbers above, call them \(x\) = 5827, and \(y\) = 0.0365. The product is \(x\times y =\) 212.6855, which can be verified by straightforward multiplication using pencil and paper, if you want to take the time. Now let’s compute this product using logarithms. Here, we’ll use a computer to do the work,^{3} where the function `log10(a)`

below produces the Base 10 logarithm of the number `a`

:

```
= 5827
x = 0.0365
y = log10(x)
logx = log10(y) logy
```

The output:

`## [1] logx = 3.76544501809015 ; logy = -1.43770713554353 .`

`## [1] logx + logy = 2.32773788254662 .`

`## [1] 10^(logx + logy) = 212.6855 .`

The number with logarithm 2.32774 is 212.6855.

The previous example shows that the logarithmic approach gives the right answer. Next, let’s do a problem where we need to look up the logarithms in a book or table. For example, suppose we want to compute \(38900 \times 0.792\):

\[ 38900 \times 0.792 = 3.89 \times 10^{4} \times 7.92 \times 10^{-1} = 3.89 \times 7.92 \times 10^{3}. \]

Let’s assume we have access to the logarithms for numbers between 1 and 10 (from a book of tables, for instance), where the logarithms are known to 5 decimal place accuracy. Then, \[ \log(3.89 \times 7.92 \times 10^3) = \log 3.89 + \log 7.92 + 3 \\ = 0.58995 + 0.89873 +3 \\ = 0.48868 + 4. \] So, the final answer to our problem is determined by finding the number whose logarithm is 0.48868, and multiplying by \(10^{4}\). From our table of logarithms we find that the number with logarithm 0.48868 is, to five significant figures: 3.0809. The FINAL result of our multiplication is hence \(3.0809 \times 10^{4}\) = 30809. Check (via computer):

`## [1] 38900 * 0.792 = 30808.8`

As we can see, the answer is correct, though its accuracy from the logarithmic approach will depend upon the accuracy of the logarithm values used. Here, our answer with 5-place logarithms is good to 6 parts per million. Such accuracy might be important in some applications, but might be overkill in others – do you need to know the height of that tree in your backyard to within 50 microns?

Before electronic computing devices, one might have used a book of tables to look up the appropriate logarithms and then add them together to perform a “multiplication.” Then, one would take that result and find in the tables the number that had that value as its logarithm; this would be the final answer, with *the computer* (the one doing the computing) having to keep track of the powers of ten. This would be repeated as needed to multiply and divide a series of numbers. The slide rule provides access to the values of logarithms (to a certain accuracy) and enables quick manipulations of them for mathematical calculations without the need to write down each of the steps and without looking up numbers in tables. The slide rule greatly sped up the process of performing long calculations, when the final results were only required to be accurate to a few digits.

Throughout this text we are using the

**R**programming language. See (R Core Team 2016).↩︎