A Table of Logs

Got nostalgic thinking about how we ran calculations before scientific calculators, and broke out one of my slide rules and calculated the volume of the observable universe. That’s not as daunting at it seems: You just take the furthest point of the observable universe, now known to be 13.8 x 109 light-years, as the radius, and use 4πr3 ÷ 3, the formula for calculating the volume of a sphere. Using scientific notation and 3.141 6 for π, you can calculate it on scratch paper. But when you’re a kid in junior high who’s still impressed by lots of zeros, and who’s discovered slide rules, it’s something big. I still remember running that calculation, my mind blown by the speed of the slide rule. And until the advent of pocket scientific calculators, slide rules would remain the fastest way.

Slide rules are usually good for three digits, which isn’t much, but close enough for most applications. Even when doing this by hand, restricting the number of significant digits was a compromise of speed vs accuracy. Calculating this stuff with pencil and paper gets tedious.

It was possible to get a few more numbers with less effort than longhand by using logarithmic tables. Science textbooks often had short logarithmic tables with about the same precision as a slide rule in the back, but were slower to use. For work such as astronomy, it was common to use larger tables of logarithms. This level of precision was rarely needed outside of the sciences, engineering, navigation, and surveying, so a book of logarithmic tables wasn’t a common item. I had owned a scientific calculator for several years before I saw a book of logarithmic tables. Even through the scientific calculator was a better solution, a book of logarithms fascinated me for the simple reason they didn’t need batteries. This was at the height of the Cold War, and there was a distinct appeal in an alternative in calculation techniques that didn’t need batteries, just in case.

This book was at the local library, but thanks to the Internet, it’s possible to find PDFs of public domain works free for downloading. You can even find Charles Babbage’s tables, the one he generated using his famed Difference Engine. Being spoiled by pocket calculators, I wanted something with greater precision, and set out making one in a spreadsheet.

It didn’t take long to abandon that project. It’s easy enough, but the greater the number of digits, the larger the table. A logarithmic table of 16 digit numbers would weigh in at about 1.785 7 x 1013 pages. Printed up in 1,000 page books, it would make a 1.785 7 x 1010 volume set. If each book was 2 inches thick, it would stretch over 563 thousand miles. That’s well over twice the distance to the moon. So much for that idea.

So I downloaded Baron Von Vegas’ Logarithmic Tables of Numbers and Trigonometrical Functions, which has seven place logarithms. With logarithm tables, the greater the number of places, or digits, the greater the precision.

The calculations that follow is how it used to be done. For sentimental reasons, we’ll calculate the volume of the observable universe.

First we look up the logarithm of the numbers we need: 13.8 x 109 light-years for the radius of the observable universe; 4; 3; and, of course, 3.141 6 for π.

Logarithmic tables are usually laid out with the number, N, in a column on the far left, with numbers from 0 to 9 across the top. In each row under the header is the logarithm. To find the value of 1.38, we go down under N until we find 1380, and across to the 0 column. There we find 139 8791. That’s our mantissa. Since we’re dealing with 13.8 x 109, and since this is the same as 1.38 x 1010, our characteristic is 10. So the logarithm for 13.8 x 109 is 10.139 8791.

On to the number 3. Here we look up 3000 under the N column, and again go over to the 0 column. There we find 477 1213. Since 3 is less than 10, it has a characteristic of 0, so the logarithm of 3 is 0.477 1213.

I had hoped to find the logarithm of π as a handy constant, but since it doesn’t seem to have it, we’ll have to look it up. Using the value of 3.141 6, we go down to 3141 and across to the 6 column. Here we find 497 1509. As with the logarithm of 3, the characteristic is 0, so our logarithm of π is 0.497 1509.

The logarithm of 4 is easily found by looking up 4000 and going over to the 0 column: 0.602 0600.

Since logarithms are exponents of a base number, in this case 10, to multiply and divide, all we have to do is add and subtract. And since raising a number to the 3rd power (cubing the number) is multiplying it by itself 3 times, we multiply the logarithm of 13.8 x 109 by 3

On to our calculations!

13.8 x 109 to the 3rd power: 10.139 8791 x 3 = 30.419 6373

To multiply this by 4: 30.419 6373 + 0.602 0600 = 31.021 6973

To multiply by π: 31.021 6973 + 0.497 1509 = 31.518 8482

To divide by 3: 31.518 8482 – 0.477 1213 = 31.041 7269

To find the number of the logarithm, we look in the table until we find 0417 269. This is between 11008 = 041 7084 and 11009 = 041 7479. Now what?

First we find the proportional part. The proportional part is how much increase is between the two logarithms. 11008 = 041 7084 and 11009 = 041 7479. As our heading number increased by one, the logarithm increased by 395. Using this, we can interpolate and find our number. 041 7269 – 041 7084 = 185. 185÷395 = 0.468 3. We round this to 0.5 , and add this to 11008 to get 11008.5. Here the decimal point acts as a convenient place holder; without the characteristic, the logarithm for 0.041 7479 is for a number less than 10. This is why we call our number 1.10085. Since these logarithms are base 10, the characteristic of 31 means 1031. So our answer is 1.10085 x 1031

In this book of logarithms the interpolation is already done for us. On the same page as 11008 we find small, two-column, tables of numbers in the far right column. These are the proportional parts and their interpolated values. First we find the mini-table with the heading 395, and go down the right column until we find the closest match to 185. Here it’s 197.5, and this number corresponds to 5. We now write this to the left of 11008, giving us 110085. Since our characteristic is 31, we can now write our final value: 1.100 85 x 1031. Working this out by pocket calculator, using 3.1416 as π, and rounding to five significant digits, we get the answer of 1.100 85 x 1031.

We can also interpolate in the other direction. If we had decided to use 3.141 59 for π, we would have found the proportional part between 31415 and 31416 (497 1509 – 497 1371 = 138), and either multiply that by 0.9 or look in the mini-table in the right column under the proportional part to find the number we would have to add to 497 1371. Both methods give 124.2, so 497 1371 + 124.2 = 497 1495.2. Since here the decimal is a convenient place holder, we can either round the logarithm to 497 1495 or call it 497 14952. But if we call it 497 14952, we have to remember to align the mantissa from the right of the characteristic, so, if we had used this value of π, when it came time to add it to 31.021 6973, we would have done so like this:

31.021 6973
+0.497 14952
31.518 84682

We interpolated a lot, especially in trigonometry. Yes, the same technique works for other types of mathematical tables. And the tables in the back of our textbooks didn’t have mini-tables of proportional parts to simplify things for us.

That was how it was done in the day. Not quite like walking to school uphill both ways, but not very speedy.

How is this an improvement over doing it longhand? When the calculations were more involved, especially those involving trigonometric functions, it increased speed and accuracy. Let’s say we wanted to calculate the volume of the universe in cubic inches. All we need is the following information:

1 light-year = 5,878,499,810,000 miles (call it 5.878 5 x 1012 miles) = 12.769 2665.

1 mile = 5,280 feet (5.280 x 103 feet) = 3.722 6339.

1 foot = 12 inches = 1.079 1812.

We simply add the logarithms to find the number of inches in a light-year:

12.769 2665 + 3.722 6339 + 1.079 1812 = 17.571 0816.

To get the number of cubic inches in a cubic light-year, we multiply this logarithm by 3:

17.571 0816 x 3 = 52.713 2448.

Now we add this to the logarithm of the volume of the universe in cubic light-year:

52.713 2448 + 31.041 7269 = 83.754 9717.

Looking this up, we come up with 5.688 16 x 1083 cubic inches. Comparing this with a scientific calculator, using the same values and rounding to 5 significant digits, we have 5.688 16 x 1083.

This is more efficient than calculating it longhand. You can even use a mechanical adding machine for the job. It’s still labor intensive, which was why universities often hired people to do the work. They were called computers. I kiddest thee not. So it was that in the early years of the 20th Century, a Harvard computer named Henrietta Swan Leavitt was doing the grunt work of cataloging variable stars and noticed a pattern. Published in 1908, her work enabled astronomers to measure stellar distances that were previously impossible to gauge.

These days, when we need to run calculations, we just reach for our scientific calculators and have the answer quicker and more accurately than going through conversions to logarithms, processing, then converting them back. And while I have a twinge of nostalgia every now and then, I don’t really miss those days. Running through calculations every now and then with a table of logarithms can be fun, but using logarithmic and trigonometric tables all day long? Shudder.

Given the choice between daily use of a slide rule, a book of logarithmic and trigonometric tables, and a scientific calculator, I’ll take the calculator. Every time.

ADDENDUM

After making this post, I realized I’d made a significant omission: the logarithms of numbers between 0 and 1. There is a gotcha with these numbers, one that frequently nailed me, and that will be the subject of tomorrow’s post. It’s something you must know when working with logarithms.

Advertisements