# Logarithmic Tables

**URL:** https://boards.straightdope.com/t/logarithmic-tables/793079
**Category:** Factual Questions
**Created:** [August 8, 2017, 10:44am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079 "2017-08-08T10:44:31Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![abashed](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@abashed](https://boards.straightdope.com/u/abashed)
#### Post date: [August 8, 2017, 10:44am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/1 "2017-08-08T10:44:31Z")

</div>

How are logarithmic tables calculated? (Dumbed down plz).

---

<div class="post-metadata">

### Author: ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)
#### Post date: [August 8, 2017, 11:41am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/2 "2017-08-08T11:41:52Z")

</div>

The classic way to calculate logarithms (and a great many functions) is to use the infinite series expansion of the function, which can be truncated when the desired precision is achieved, or if adding further terms doesn’t affect the values written down. You can find these in a lot of places (Abramowitz and Stegun, Gradshteyn and Rhyzhik, old edition of the CRC Handbook), but the simplest place thes days is online, as in Wikipedia:

> **[Natural logarithm](https://en.wikipedia.org/wiki/Natural_logarithm)**
>
> The natural logarithm of a number is its logarithm to the base of the mathematical constant e, which is an irrational and transcendental number approximately equal to 2.718281828459. The natural logarithm of x is generally written as ln x, loge x, or sometimes, if the base e is implicit, simply log x. Parentheses are sometimes added for clarity, giving ln(x), loge(x), or log(x). This is done particularly when the argument to the logarithm is not a single symbol, so as to prevent ambiguity. The...

more “dumbed down”

You can write down a mathematical formula to calculate the logarithm. To get the result with complete accuracy, the formula has an infinite number of terms. But you can get the approximately correct number with only the first few terms, so you only need to calculate those.

Tables of logarithms were calculated, I believe, originally by people actuaslly working through the math for each case, then later with mechanical calculators, and finally with computers. Before hand calculators were capable of doing these, engineers and scientists relied on previously calculated tables of logarithms, published in book form. I did this, and still have mine.

It was by observing that such tables didn’t get uniformly dirty that Frank Benford discovered the Benford Probabilities.

> **[Benford's law](https://en.wikipedia.org/wiki/Benford%27s_law)**
>
> Benford's law, also known as the Newcomb–Benford law, the law of anomalous numbers, or the first-digit law, is an observation that in many real-life sets of numerical data, the leading digit is likely to be small. In sets that obey the law, the number 1 appears as the leading significant digit about 30% of the time, while 9 appears as the leading significant digit less than 5% of the time. If the digits were distributed uniformly, they would each occur about 11.1% of the time. Benford's law

---

<div class="post-metadata">

### Author: ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)
#### Post date: [August 8, 2017, 11:55am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/3 "2017-08-08T11:55:12Z")

</div>

Engineers used slide rules as they were much faster than look-up tables. My maths teacher at school had spent part of WW2 in a bunker with a large cylindrical slide rule (ironically it was made in Germany) calculating trajectories for anti aircraft guns.

---

<div class="post-metadata">

### Author: ![Isilder](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@Isilder](https://boards.straightdope.com/u/Isilder)
#### Post date: [August 8, 2017, 12:09pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/4 "2017-08-08T12:09:56Z")

</div>

You can read off graphs. you can make a mechanism to make a very large graph.

You can do log in base 10 easily right,  
and logN of X (in base N ), is log10 X / log10 N. (both base 10 logs. )

So if you can do log in one base, you can do log in any base using a single division.

---

<div class="post-metadata">

### Author: ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)
#### Post date: [August 8, 2017, 12:33pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/5 "2017-08-08T12:33:08Z")

</div>

Articles about the early calculation of the logarithmic tables:

> **[Computing Power Used to Be Measured in 'Kilo-Girls'](https://www.theatlantic.com/technology/archive/2013/10/computing-power-used-to-be-measured-in-kilo-girls/280633/)**
>
> The earliest computers were human. And, more often than not, female.

> **[Computer (occupation)](https://en.wikipedia.org/wiki/Human_computer)**
>
> The term "computer", in use from the early 17th century (the first known written reference dates from 1613), meant "one who computes": a person performing mathematical calculations, before electronic computers became commercially available. Alan Turing described the "human computer" as someone who is "supposed to be following fixed rules; he has no authority to deviate from them in any detail." Teams of people, often women from the late nineteenth century onwards, were used to undertake lon Sin...

---

<div class="post-metadata">

### Author: ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)
#### Post date: [August 8, 2017, 1:53pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/6 "2017-08-08T13:53:34Z")

</div>

> [@](#):
>
> Quoth **Isilder** :
> 
> You can do log in base 10 easily right,  
> and logN of X (in base N ), is log10 X / log10 N. (both base 10 logs. )
> 
> So if you can do log in one base, you can do log in any base using a single division.

Maybe you can do logs in base 10 easily, but for the rest of us, the easiest way to find base 10 logs is to start with natural logs, and then do the corresponding conversion you describe in the next line. Logs base 10 are only easy for 1, 10, 100, 1000, and so on, and if you’re taking the log of one of those, you’re not even looking at the table.

As to those tables, literally the first hundred pages of my CRC are tables of various mathematical functions, all of which can be calculated instantly to a greater precision using a $10 solar-powered calculator, or a free app that comes bundled with every smartphone. And the next hundred pages are tables of integrals, which can likewise be done instantly by a computer with the right software.

---

<div class="post-metadata">

### Author: ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)
#### Post date: [August 8, 2017, 2:18pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/7 "2017-08-08T14:18:31Z")

</div>

The OP did not say, but on one hand suppose I locked you in a room with nothing but paper, pens, and ink, and you had to produce a table of logarithms. If you use base 10 Arabic numerals, then of course you would produce the final table in base 10, and moreover there are many little tricks you would use to speed things up and check your work as you go along. It may be instructive to actually try this and see if you can get one or two digits of precision.

On the other hand, the modern version of this problem is how to program a digital computer to extract logarithms without some inputs resulting in a loss of precision, unreasonable slowdowns, or incorrect output. Easy to suggest it is all down to using an infinite series somewhere, but equally easy to screw up the algorithm.

---

<div class="post-metadata">

### Author: ![DSYoungEsq](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@DSYoungEsq](https://boards.straightdope.com/u/DSYoungEsq)
#### Post date: [August 8, 2017, 3:00pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/8 "2017-08-08T15:00:02Z")

</div>

> [@Chronos](#):
>
> Maybe you can do logs in base 10 easily, but for the rest of us, the easiest way to find base 10 logs is to start with natural logs, and then do the corresponding conversion you describe in the next line. Logs base 10 are only easy for 1, 10, 100, 1000, and so on, and if you’re taking the log of one of those, you’re not even looking at the table.
> 
> As to those tables, literally the first hundred pages of my CRC are tables of various mathematical functions, all of which can be calculated instantly to a greater precision using a $10 solar-powered calculator, or a free app that comes bundled with every smartphone. And the next hundred pages are tables of integrals, which can likewise be done instantly by a computer with the right software.

Yes, I showed off my CRC Handbook to my high school students to properly impress them with how awful mathematics was in the dark ages. You know, the 70s. 😛

(Side note: the 70s is actually the watershed decade. I started high school having to calculate all sorts of stuff by tables, and finished high school using a TI-58C, IIRC, which did all of that sort of stuff for me)

---

<div class="post-metadata">

### Author: ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)
#### Post date: [August 8, 2017, 3:37pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/9 "2017-08-08T15:37:45Z")

</div>

I want to make explicitly clear how incredibly significant _interpolation_ was in calculating tables by hand.

No, you did _not_ calculate each value on it’s own. No, no, no.

You start off calculating every xth value. X being initial quite large. Then you interpolate some of the values in between. Then you iterate on those to make them more precise. Then you interpolate on the remaining ones. Do some sporadic checks by iterating some of those to make sure they’re accurate enough.

So 50-90% of a table could be from interpolation only.

One thing with logarithm tables is that once a block is filled in, it is quite easy to fill in the next block using the obvious identities. Again, some sanity checking here and there to make sure things haven’t drifted off too far.

Sine/cosine also have identities that were used but not nearly as simple as logarithms.

---

<div class="post-metadata">

### Author: ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)
#### Post date: [August 8, 2017, 3:39pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/10 "2017-08-08T15:39:53Z")

</div>

> [@Isilder](#):
>
> You can do log in base 10 easily right,

I love this. In order to calculate a logarithm, one must merely calculate a logarithm.

It’s recursion before they invented the base case.

Genius.

---

<div class="post-metadata">

### Author: ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)
#### Post date: [August 8, 2017, 4:00pm UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/11 "2017-08-08T16:00:26Z")

</div>

Here is some real C code to compute (_but with no error-checking_) logarithm base _e_.

```auto

/*
 * This code is loosely based on Freeware;
 * x_log() is similar to log() but does no error-checking.
 * x_frexp() accomplishes the built-in function frexp()
 * but is much slower. It is included to make this
 * wholly self-contained.
 * No copyright is claimed by Septimus G. Stevens VII.
 * Use of this code for satiric purposes is encouraged.
 */
 
double x_frexp(double x, int *xpon)
{
	int	xp = 0;
	while (x >= 1)
		x /= 2, xp++;
	while (x < 0.5)
		x *= 2, xp--;
	*xpon = xp;
	return x;
}

double x_log(double x)
{
        double z, w;
        int xpon;

        x = 1.4142135623730950488 * x_frexp(x, &xpon);
	z = 2 * (x-1) / (x+1);
	w = z * z;
	x = z;
	z *= - w * 64.124943423745581147
		+ w*w * 16.383943563021534222
		- w*w*w * 0.78956112887491257267;
	z /= -769.49932108494879777
		+ w * 312.03222091924532844
		- w*w * 35.667977739034646171
		+ w*w*w;
        return x + z + xpon * .69314718055994530941
		- .3465735902799726547;
}

```

---

<div class="post-metadata">

### Author: ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)
#### Post date: [August 9, 2017, 12:14am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/12 "2017-08-09T00:14:13Z")

</div>

The real story of how Napier constructed the first log tables is a fascinating tale in human ingenuity. What he actually calculated was something like -10^7\*ln(10^{-7}\*x). Why the natural log? Because he was in effect solving the differential equation y’ = 1/y.

He imagined an point moving from -1 on the x-axis towards 0 in such a way that its speed was inversely proportional to the distance from the origin. Why -1? I don’t know. That was how he thought of it and it is, in any case, that differential equation. Then he imagined dividing the axis into intervals of size 10^{-7}. He started with the value at -1 equal to 10^7. Then to go from one interval to the next, he multiplied by 1-10{-7}=.9999999 which sounds hard but is easy. Just take the multiplicand and under it the same shifted over by 7 places and subtract. Continue until you get to the point -1+10^{-6}. I think at that point he started using intervals of size 10^{-6} using his earlier work to interpolate the finer intervals. He continued this strategy until he got to -1/2 when he observed that the computations could be duplicated between -1/2 and -1/4. When he was finished he had a table of 7 place logarithms. Then Briggs came along and observed that base 10 logs would be much more useful. Then Briggs and Napier collaborated to start doing the necessary computations. Napier died before it was finished and Briggs finished the job.

Note that this was all done before calculus and certainly before differential equations. His genius was in seeing how this computation would give a function that converted multiplication to addition.

By Babbage’s time there were indeed power series known. The problem was that published had errors. His idea was to build a machine that would not only do the computations, but also\* set it in type\*. There were two problems. Do the computations correctly, but then get them into type and proofread it. Babbage wanted to solve both.

---

<div class="post-metadata">

### Author: ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)
#### Post date: [August 9, 2017, 12:25am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/13 "2017-08-09T00:25:55Z")

</div>

> [@ftg](#):
>
> I want to make explicitly clear how incredibly significant _interpolation_ was in calculating tables by hand.
> 
> No, you did _not_ calculate each value on it’s own. No, no, no.
> 
> You start off calculating every xth value. X being initial quite large. Then you interpolate some of the values in between. Then you iterate on those to make them more precise. Then you interpolate on the remaining ones. Do some sporadic checks by iterating some of those to make sure they’re accurate enough.
> 
> So 50-90% of a table could be from interpolation only.
> 
> .

One of the people who lived on my floor at my dorm had the logarithm function memorized in such a way that he could “read off” three-place logarithms in his head, without looking anything up.  
He could do it while drunk, too.

---

<div class="post-metadata">

### Author: ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)
#### Post date: [August 9, 2017, 12:42am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/14 "2017-08-09T00:42:24Z")

</div>

Supposedly Gauss had his logarithms memorized, to 5 digits. Memorizing your table of logarithms would be tremendously useful, and start to come naturally through practice, to anyone who did manual computations all day, eg in the 18th and 19th centuries; today it is not a practical skill.

---

<div class="post-metadata">

### Author: ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)
#### Post date: [August 9, 2017, 3:38am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/15 "2017-08-09T03:38:42Z")

</div>

As a young man, my dad had his logarithms meorized to (as I recall) 2 digits. It was a requirement for his NY state professional engineering registration, so everybody that did that exam had those numbers memorised.

2 digit tables perhaps aren’t ver useful, by they do allow you to interpolate three or 4 digits

---

<div class="post-metadata">

### Author: ![Monty](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/monty/32/47_2.png) [@Monty](https://boards.straightdope.com/u/Monty)
#### Post date: [August 9, 2017, 5:48am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/16 "2017-08-09T05:48:20Z")

</div>

> [@Wendell\_Wagner](#):
>
> [Computer (occupation) - Wikipedia](https://en.wikipedia.org/wiki/Human_computer)

A fun SciFi novel using human computers as an important plot device is [_The Three-Body Problem_](https://en.m.wikipedia.org/wiki/The_Three-Body_Problem).

---

<div class="post-metadata">

### Author: ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)
#### Post date: [August 9, 2017, 6:24am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/17 "2017-08-09T06:24:39Z")

</div>

That doesn’t summarize the plot of _The Three-Body Problem_ very well. It’s not about human computers. It’s about the contact between the inhabitants of Earth and a planet in the Alpha Centauri system. The interactions between that planet and the three stars in this solar system make the length of the days and nights on that planet very chaotic. That’s because the three-body problem of gravity has no general analytic solution:

> **[Three-body problem](https://en.wikipedia.org/wiki/Three-body_problem)**
>
> In physics and classical mechanics, the three-body problem is the problem of taking the initial positions and velocities (or momenta) of three point masses and solving for their subsequent motion according to Newton's laws of motion and Newton's law of universal gravitation. The three-body problem is a special case of the n-body problem. Unlike two-body problems, no general closed-form solution exists, as the resulting dynamical system is chaotic for most initial conditions, and numerical m Histo...

Incidentally, here’s (what I think is) a better way of viewing the Wikipedia entry for _The Three-Body Problem_:

> **[Three-body problem (disambiguation)](https://en.wikipedia.org/wiki/The_Three-Body_Problem)**
>
> Three-body problem or The Three-Body Problem may refer to:

Monty, I don’t understand why the link in your post gave a different way of viewing the same entry in Wikipedia. In any case, the inhabitants of this planet of Alpha Centauri have this weird way of using quantum effects (or something) to encode a supercomputer into a single proton and send it to Earth. I don’t understand why that should be considered a human computer. I haven’t read the two sequels to _The Three-Body Problem_, so I don’t know if they have something to do with it.

---

<div class="post-metadata">

### Author: ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)
#### Post date: [August 9, 2017, 8:41am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/18 "2017-08-09T08:41:34Z")

</div>

The definitive sci-fi story in this respect is “The Feeling of Power,” by Isaac Asimov.

---

<div class="post-metadata">

### Author: ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)
#### Post date: [August 9, 2017, 8:42am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/19 "2017-08-09T08:42:57Z")

</div>

> [@Chronos](#):
>
> Logs base 10 are only easy for 1, 10, 100, 1000, and so on, and if you’re taking the log of one of those, you’re not even looking at the table.

You can do more than that easily (to nearly two digits of precision). Remembering that a power of 2 adds about 0.3, we have log10(2)=0.3, log10(4)=0.6, etc. Since half a log is a square root, we also have log10(1.4)=0.15, and from there we can just interpolate, so log10(1.2)=0.075 and log10(1.7)=0.225 (roughly). Remembering that the square root of 10 is about 3.1, we also have log10(3.1)=0.5. That’s enough different values and factors to get pretty close.

An easy way to get an approximate log2:

- Find the highest power of 2 smaller than your number (x)
- Subtract x from your number
- Divide that by x
- Add log2 of x

Say you want log2(89). Subtract 64 to get 25. Log2(64)=6, so our answer is 6+25/64, or 409/64. That’s 6.39, while the real answer is 6.476. It’s at most 0.08 off from the real answer (actually, you can improve that to 0.04 by adding 0.04 to the final result). Multiply by 0.3 to get the log10.

Some of this is a bit silly and useless, but log10(2)=0.3 comes in _very_ handy in engineering.

---

<div class="post-metadata">

### Author: ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)
#### Post date: [August 9, 2017, 10:00am UTC](https://boards.straightdope.com/t/logarithmic-tables/793079/20 "2017-08-09T10:00:40Z")

</div>

> [@Dr.Strangelove](#):
>
> Some of this is a bit silly and useless, but log10(2)=0.3 comes in _very_ handy in engineering.

Well yes, 3db and 6db are welded into ones mind. I have a feeling many don’t even realise that these are approximations, and get confused when they see the extra decimal places.

There was a time when I had a few more of these approximations at my mental fingertips. Not so much anymore.

[Next page](https://boards.straightdope.com/t/logarithmic-tables/793079.md?page=2)
