Logarithmic Tables

log[sub]10[/sub]2 = 0.30103 is palindromic, so engineers always (used to) know that one to 5 digits, even if they didn’t have the entire 5-digit table memorized like Gauss.

What is satirical about it? Because of the lack of error checking? I have not proofread your code or the output precision, but it seems like a decent way to compute a logarithm; I like your change of variables to knock out half the terms in the familiar power series and the use of a Padé approximant for good precision.

It’s not my code; I just pulled it off the 'Net and did some rearranging to make it appear more straightforward to my eye. It does seem to produce the same answers as gcc’s log().

Someone – I think it was either Asimov or Martin Gardner – had a column about memorizing a few choice logarithms, using letters-for-numbers substitutions and recalling the words, which allowed you to make a few calculations.

Oh, sure, there are tricks you can use for quick-and-dirty base 10 logs, but there are also corresponding tricks for base e, or any other base.

Oh, and Wendell, the different Wikipedia formatting was because Monty was linking to the mobile version of Wikipedia, designed to look good on small phone screens. That’s what the m means in en.m.wikipedia.org (the “en”, meanwhile, is for English).

Thank you, Chronos.

Wendell Wagner: I didn’t say that was the plot of the novel, just that it was an important plot point. The Trisolarian army was put to use as human (Trisolarian) computers.

The commonly known rules of thumb for dB are
0dB = 1
3dB = 2
5dB = 3
6dB = 4
7dB = 5
8dB = 6
9dB = 8
10dB = 10
It’s a log table with one significant digit. Once you have it memorized, you can quickly do in your head the product of a lot of factors, or roots, or powers.

Is it mere pedantry to point out that the question that people have actually been answering is “How were logarithmic tables calculated?”

When was the last time anyone calculated a table of logarithms? (Of course, electronic calculators and computers do still calculate logarithms, but is there any longer a reason to produce a new table of logarithms?)

When was the last time anyone calculated a table of logarithms without having a computer (the electronic sort) do the calculations?

(See Hari Seldon’s post for the first time anyone calculated a table of logarithms.)

I know Hari is old, but I think people were calculating tables of logarithm before that post.

:wink:

In 1878 John Couch Adams published the best formulas for base-e logarithms of small integers, using the polynomials for ln(1 + x) and ln(1 - x):

a = ln (10/9) = -ln (1 - 1/10)

b = ln (25/24) = -ln (1 - 4/100)

c = ln (81/80) = ln (1 + 1/80)

d = ln (50/49) = -ln (1 - 2/100)

e = ln (126/125) = ln (1 + 8/1000)

ln 2 = 7a - 2b + 3c

ln 3 = 11a - 3b + 5c

ln 5 = 16a - 4b + 7c

ln 7 = 19a - 4b + 8c + e = (1/2)(39a - 10b + 7c - d)

Once you have the terms for a you can do ln 11 as well, with the terms for b you can do ln 13, and with the d terms you can do ln 17.

Don’t be silly; I actually described the method to Napier.