Learning Some Logarithms (2023)

kqr1 pts0 comments

Learning Some Logarithms

A colleague asked how many digits of \(\pi\) I can recite from memory. I realised<br>I still remember the 27.3 digits I memorised in my childhood11 Wait, what does<br>it mean to remember 0.3 digits? I know the digit after the last one is in the<br>range 0–4, which is one bit of information, and the full digit would be just<br>over three bits. Hence, 1/3 or 0.3 digits. Okay but why do I know the digit<br>after the last is in the range 0–4? I deliberately picked a cut-off point that<br>didn&rsquo;t force me to round the last digit up, so that if I wanted to expand and<br>learn even more digits later I wouldn&rsquo;t have to re-learn the last rounded<br>digit.. I was slightly embarrassed to admit this, because of how useless it is<br>to know more than, say, four significant figures of \(\pi\).

There are many other useful values to memorise, e.g. some logarithms would be<br>neat.

Base ten logarithms

I have picked up spaced repetition again, so I now have a way to learn some<br>logarithms basically for free, as well as how to use them for mental maths. The<br>values below are good to know and enough to get started (the rest can be roughly<br>interpolated.)

\(\;\;\;\; \log{1} = 0\)

\(\;\;\;\; \log{2} \approx 0.3\)

\(\;\;\;\; \log{3} \approx 0.5\)

\(\;\;\;\; \log{5} \approx 0.7\)

\(\;\;\;\; \log{8} \approx 0.9\)

\(\;\;\;\; \log{10} = 1\)

A few weeks after I memorised that batch, I added a second batch to fill out<br>some of the gaps. These are probably overkill but convenient once the memories<br>are formed.

\(\;\;\;\; (\log{1.25} \approx 0.1)\)

\(\;\;\;\; (\log{1.6} \approx 0.2)\)

\(\;\;\;\; (\log{2.5} \approx 0.4)\)

\(\;\;\;\; (\log{4} \approx 0.6)\)

\(\;\;\;\; (\log{6} \approx 0.8)\)

\(\;\;\;\; (\log{7} \approx 0.85)\)

\(\;\;\;\; (\log{9} \approx 0.95)\)

Base ten logarithms are particularly convenient because we write numbers in base<br>ten, so we only need to know the logarithms of 1–10 to compute the logarithm of<br>any other number.

For larger numbers, we can approximate using the rule that turns multiplication<br>into addition22 This rule was in fact why Napier invented logarithms in the<br>first place! Multiplication problems are hairy but addition is easier.

\[\log{50} = \log{(5 \times 10)} = \log{5} + \log{10} \approx 0.7 + 1 = 1.7\]

(Incorrect by 0.06 %.)

We can always just round to the nearest number with a bunch of zeroes on it:

\[\log{87234} \approx \log{(8.7 \times 10^4)} = \log{8.7} + \log{10^4} \approx 0.93 + 4 = 4.93\]

(Incorrect by 0.2 %.)

To approximate log 8.7, we see that it is about a third of the way between 8 and<br>10, and since all continuous functions are linear when you look up close, we<br>just go a third of the way from log 8 to log 10, both of which we know!

Smaller numbers work on the same principle:

\[\log{0.055} = \log{(5.5 \times 10^{-2})} = \log{5.5} + \log{10^{-2}} \approx 0.73 - 2 = -1.27\]

(Incorrect by 0.8 %.)

Multiplication

If we need to multiply two numbers, say 365×48, we can do that by instead<br>estimating the equivalent

\[10^{\log 365 + \log 48}\]

where the relevant logs turn it into something like

\[10^{2.55 + 1.68} = 10^{4.23} \approx 17000\]

(Incorrect by 3 %.)

Natural logarithms

If we add another two numbers to our memory we can do even more useful things:

\(\;\;\;\; \log{e} \approx 0.43\)

\(\;\;\;\; \frac{1}{\log{e}} \approx 2.3\)

Now we can change from base-ten logarithms to natural logarithms by plain<br>multiplication with 2.3. Quick example:

\[\ln{57} \approx 2.3 \times \log{57} \approx 2.3 \times 1.77 \approx 4.1\]

(Incorrect by 1 %.)

One neat property of the natural logarithm is that for small \(x\), we can<br>estimate \(\ln{(1 + x)} = x\). So \(\ln{1.03} \approx 0.03\).33 This sort of<br>conversion is convenient when discussing growth rates of lognormal random walks<br>and log-odds differences of small effects.

Powers

Raising a number to the power of another comes with another handy rule, namely<br>that

\[a^b = 10^{b \log{a}}\]

Since we have \(\log{e}\) from before we can estimate

\[e^3 = 10^{3 \log{e}} \approx 10^{3 \times 0.43} \approx 10^{1.3} \approx 20\]

(Incorrect by 0.4 %.)

New here? I often write about mental calculation and getting an intuition for difficult mathematical ideas. You should subscribe to receive weekly summaries of new articles by email. If you don't like it, you can unsubscribe any time.

Square roots

Square roots are, of course, just powers under the hood.

\[\sqrt{512} = 512^{0.5} = 10^{0.5 \times \log{512}} \approx 10^{0.5 × 2.7} \approx 10^{1.3} = 20\]

(Incorrect by 13 % – the main imprecision enters the picture in the sloppy<br>division of 2.7 by two. If we compute with 1.35 instead of 1.3, we get a quarter<br>of the way between 20 and 30, i.e. 23, which is inaccurate only by 2 %.)

What&rsquo;s neat is you can use the same technique for third roots, which are<br>otherwise much trickier to guess!

Next steps

I&rsquo;m not fast at doing this in my head yet, but I can at least do it without a<br>calculator, which is more than I was able to...

approx logarithms times incorrect know digits

Related Articles