How Mr. Bidder calculated logarithms
George Parker Bidder (1806-1878) was a calculating prodigy. One of his feats was mentally calculating logarithms to eight decimal places. This post will explain his approach.
I'll use log" when the base of the logarithm doesn't matter, and add a subscript when it's necessary to specify the base. Bidder was only concerned with logarithms base 10.
Smooth numbersIf you wanted to calculate logarithms, a fairly obvious strategy would be to memorize the logarithms of small prime numbers. Then you could calculate the logarithm of a large integer by adding the logarithms of its factors. And this was indeed Bidder's approach. And since he was calculating logarithms base 10, so he could make any number into a integer by shifting the decimal and then subtracting off the number of places he moved the decimal after taking the log of the integer.
Numbers with only small prime factors are called smooth." The meaning of small" depends on context, but we'll say numbers are smooth if all the prime divisors are less than 100. Bidder knew the logs of all numbers less than 100 and the logs of some larger numbers.
Rough numbersBut what to do with numbers that have a large prime factor? In this case he used the equation
log(a + b) = log(a(1 + b/a)) = log(a) + log(1 + b/a).
So if a number n doesn't factor into small primes, but it is close to a number a that does factor into small primes, you're left with the problem of finding log(1 + b/a) where b = n - a and the fraction b/a is small.
At this point you may be thinking that now you could use the fact that
log(1 + x) x
for small x. However, Bidder was interested in logarithms base 10, and the equation above is only valid for natural logarithms, logarithms base e. It is true that
loge(1 + x) x
but
log10(1 + x) log10(e) x = 0.43429448 x.
Bidder could have used 0.43429448 x as his approximation, but instead he apparently [1] used a similar approximation, namely
log(1 + b/a) log(1 + 10-m) 10m b/a
where b/a is between 10-m-1 and 10-m. This approximation is valid for logarithms with any base, though Bidder was interested in logs base 10 and had memorized log101.01, log101.001, log101.0001, etc. [2]
Finding nearby smooth numbersTo get eight significant figures, the fraction b/a must be on the order of 0.001 or less. But not every number n whose log Bidder might want to calculate is so close to a smooth number. In that case Bidder might multiply n by a constant k to find a number so that kn is close to a smooth number, take the log of kn, then subtract log k.
Smith says in [1] For example, to obtain log 877, he would multiply 877 by 13, which gives 11,401, or 600 * 19 + 1." Then he could calculate
log(877) = log(13*877) - log(13) = log(11400) + log(1/11400) - log(13)
and use his algorithm for approximating log(1/11400).
I can't imagine thinking Hmm. 877 isn't close enough to a smooth number, but if I multiply it by 13 it will be." But apparently Bidder thought that way.
Related postsHere is a simple way to approximate logarithms to a couple significant figures without having to memorize anything.
See also this post on mentally calculating other functions to similar accuracy.
Notes[1] This equation comes from The Great Mental Calculators by Steven B. Smith. Bidders methods are not entirely known, and Smith prefaces the approximation above by saying it appears that Bidder's approximation was ...".
[2]
|-------+-------------|| x | log_10(1+x) ||-------+-------------|| 10^-2 | 0.00432137 || 10^-3 | 0.00043408 || 10^-4 | 0.00004342 || 10^-5 | 0.00000434 || 10^-6 | 0.00000043 || 10^-7 | 0.00000004 ||------+--------------|The post How Mr. Bidder calculated logarithms first appeared on John D. Cook.