The really early days of computing
Let's start at the very beginning This column is based on an earlier article that appeared in Micro Cornucopia magazine, ca. 1986. The editor had asked us to offer stories of how things were in "the early days of computing." I expect he meant, "the early days of microcomputing," but I elected to delve back even further in time. This is an updated and greatly expanded version of that article. |
The log in your eye
I don't know how to tell you this -- some readers may find it disturbing -- but we haven't always had PCs. We haven't even always had microcomputers. Heck, there was a time when we didn't have computers at all! If anyone needed to compute something, we did it the old-fashioned way: with pencil and paper.
An elegant mathematical proof can be a thing of beauty forever, but when it comes down to the important stuff, like the position of a farmer's property lines, the amount of wine in a barrel, or the trajectory of a moon rocket, scientists need numbers. Computing those numbers is the craft of the applied mathematician. The computations may be based on the most complex of mathematical analyses, but in the end, they boil down to simple arithmetic. We don't usually need the 15-digit sort of accuracy we computer types have come to expect -- Kepler would have killed for those -- but we do need at least four or five digits, or else the result can get lost in the numerical noise.
Adding a column of five-digit numbers is easy enough -- my father could do those in his head -- but multiplying them is quite another matter. If you have more than a few products to compute, the process can be painful in the extreme and fraught with error. Early astronomers often spent months -- even years -- calculating the orbit of one comet.
So how do you multiply lots of five-digit numbers? Applied mathematicians have known the secret since the 1600s. In my high school math classes, they taught us the secret: logarithms. A goodly portion of my algebra class was spent teaching us how to read and interpolate a table of logarithms, and how to manipulate them to get an answer.
The first step in understanding logarithms is to recognize that, when we raise a number to a power, that power need not be an integer. We all know that:
(1)
But somewhere between that 1 and the 2, say, there must be a different power such that:
(2)
That number happens to be:
(3)
For any positive and nonzero number x, there's a value p such that:
(4)
This value is called the logarithm (log, for short) of x, and we write:
(5)
The logs of various numbers are hard to compute by hand, but the computation only needs to be done once for each number or, more precisely, a lot of numbers that are close together, then tabulated for the rest of us. We've had tables of logarithms since the early 1600s. Between the tabulated points, we interpolate (remember proportional parts?).
The second key lies in the relationship:
(6)
In terms of the log functions:
(7)
Given two numbers x and y, we can get their product by adding their logarithms. It may seem a roundabout way of doing things. We must access the log table three times, once to get p, once to get q, and a third time to get the inverse log (antilog) of the product. Even so, applied mathematicians preferred this approach because adding is an easier and safer operation than multiplying.
Log(x) is not logarithm base 10 High-order computing languages like Fortran, C, and C++, all have a function called log(x). Unfortunately, confusingly, and most perversely, this is NOT the logarithm base 10, but the natural log, which mathematicians call ln(x). The natural log uses base e = 2.718282... Yet another example where compiler writers got things wrong. Check your own environment to be sure what the function is giving you. |
My trig book had tables that gave not only the values of the trig functions, but of their logarithms as well. The logs were used most, because trig functions tend to multiply things. The tables were typically given to the nearest tenth of a degree, which certainly seemed to be enough for anybody.
Needless to say, solving a relatively simple trig problem was not a simple matter ... it took lots of time and patience, and errors were easy to make. Doing something like calculating the points in a single 3-D drawing would have been an overwhelming task.
We had another approach to problems like that: graphics. A drafting class was always considered required for anyone planning a technical career. It was there that we learned how to handle T-squares and triangles, and how to keep our pencils needle sharp without breaking them (you use sandpaper).
Higher education
College was more of the same. I'll never forget that first day in the college bookstore, where I was outfitted for a career in engineering. I watched, bug-eyed, as the clerk stacked up my standard-issue equipment: a set of drafting instruments, a drawing board, T-square, triangles and French curves, and ... (wait for it) that most wonderful of all calculating instruments ... the slide rule.
Figure 1 The slide rule.
Editor's note: Picture from Highlights from The Computer Museum Report, Volume 18 --- Winter 1987, the Computer History Museum of Boston, now in Mountain View, California. This picture and many more are posted on Ed Thelen's website.
About a week after inventing logarithms, Napier realized that he could mechanize the process of adding them. You can do the same thing with ordinary numbers. Figure 2 shows how. Take two rulers, and place them one above the other as shown. Find the point on the lower ruler that corresponds to a number -- call it x. Slide the upper ruler so its zero mark lines up with that point.
Now look along the upper ruler until you find the second number, y. Look below it on the lower ruler, and there's your sum.
Figure 2 Adding with rulers.
The slide rule works the same way, only the things you're adding are logarithms. The scales are inscribed, not with the logs, but the numbers associated with them. Think "log scale" on an Excel chart, and you'll see what I mean. Other scales included the trig functions and log tables, thereby rendering the books of tables (almost) obsolete. The K & E slide rule had all that inscribed in 10 inches of porcelained bamboo. To multiply, divide, take square roots (or any other root or power, for that matter), and solve trig problems, all you had to do was to manipulate the slider and hairline "cursor" on that magic instrument.
My first technical class in college was a course in how to use the slide rule. The slide rule never left our collective sides, housed as it was in a scabbard hanging from our belts like prehistoric light sabers.
The one operation the slide rule couldn't do was to add/subtract. For that we still had to do things by hand, although in graduate school I finally got a neat little pocket adding machine (based on a design by Pascal), that helped immensely. As a sidelight, I entered a sports car rally as a navigator (the "sports car" was a custom '41 Chevy). We won, thanks to the invincible computing power of my slide rule and adding machine.
As the years progressed, so did our proficiency with the slide rule. Our performances and grades in our classes depended upon it, and we studied it earnestly. Before a quiz, we would carefully adjust it like a soldier cleans his rifle before a big battle. Those three strips of bamboo had to be spaced just right, to slide freely but still stay where they were put. We actually lubricated them with talcum powder for maximum speed without overheating (!). You could always tell the guys who were serious about their grades, by the talcum powder stains on their shirts.
Our skills in graphics were sharpened, too. In those days, the worth of an engineer depended just as much on his ability to draw a straight line or to plot a graph, as on his "book-larnin." Many problems that we now do by computer were solved in those days with graphs and nomograms. One of my favorite courses was Descriptive Geometry. There, we learned to do all kinds of magical things with a pencil and T-square.
Example 1: Suppose you're given two points in three-space and need to know how far apart they are. You can apply the Pythagorean theorem twice, to get:
(8)
Or, you can draw the line in front, top, and side views. Now project it in the right direction, and you're looking at it side-on. So just measure it.
Using descriptive geometry, we solved real-life problems, like estimating the volumes of cuts and fills on a highway or the distance that a power cable would miss a hillside.
One day, our prof gave us four sets of coordinates defining two straight lines skewed in 3-space. The problem was to find the miss distance between them. You did this by generating projections of the lines onto various planes until one of them appeared end-on, as a point.
While I was working diligently on the problem, Francis Pugh, who was smarter and faster than the rest of us, announced that the distance was zero; the lines intersected. "That's impossible," shouted the prof. "I picked those points at random. Do you realize what the odds are that I would randomly pick a pair of lines that intersect? The distance may be small, but it can't be zero. Go back and do it again."
Now Francis was smart, but he wasn't a politician. He said, "I don't care what the odds are. I've done it right the first time, and the lines intersect!"
As the conversation got more and more heated, it was clear that Francis was in deep trouble. He was winning the argument but losing the war, and the prof's face was getting redder and redder. As the two elevated the argument to a shouting match, they were too engrossed to notice that, all over the classroom, the rest of us were quietly erasing the lines that we, too, had by this time found to intersect. One of the nice features of solving things graphically was that you could always warp the lines a bit when it seemed prudent.
Into the space age!
After college, I went to work for the space agency, NASA. I was going to help put men on the moon (which I did). My first day, I received the two tools of my trade: an 18-inch government-issue slide rule and a book of five-place trig tables.
See, NASA figured that the three-digit accuracy of the standard 10-inch slide rule just wouldn't cut it for space travel. In general, to get one more digit of accuracy you need a slide rule 10 times longer. But it just happened that the 10" rule could almost get four digits (it could, over part of its range), so that increasing the length to 18" was just enough to get that precious extra digit.
Even more exciting, NASA had real desktop calculators! Electro-mechanical ones, which were sort of adding machines on steroids.
Please confirm the information below before signing in.
{* #socialRegistrationForm *} {* firstName *} {* lastName *} {* displayName *} {* emailAddress *} {* addressCountry *} {* companyName *} {* ednembJobfunction *} {* jobFunctionOther *} {* ednembIndustry *} {* industryOther *}