# Complex calculations before computers

**URL:** <https://boards.straightdope.com/t/complex-calculations-before-computers/559926>\
**Category:** Factual Questions\
**Created:** [November 8, 2010, 5:06pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926 "2010-11-08T17:06:08Z")\
**Posts on this page:** 14\
**Page:** 4

<div class="post-metadata">

**Author:** ![panamajack](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@panamajack](https://boards.straightdope.com/u/panamajack)\
**Post date:** [November 9, 2010, 6:03pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/61 "2010-11-09T18:03:11Z")

</div>

> [@Frylock](#):
>
> What does “precision” mean in this context? Why exactly does adding 1 to that number yield the same number rather than the number plus 1?

If you’re familiar with scientific notation, it’s like putting every number in that format:

1729.03 = 1.72903 x 10^3  
-1899012530000000000000000 = -1.899012532 x 10^24  
0.000045 = 4.5 x 10^-5

Suppose I only have 20 digits in which to write my numbers. I can get rid of the parts that don’t change, and write them in this way :

(s) (dddddddddd) (s) (eeeeeeee)

The first part (d) is assumed to be of the form d.dddd. The (s) is the sign of the number, or the exponent (I’ll use 0 to mean positive numbers, and 9 for negative ones). My numbers above can then be written as

0 1729030000 0 00000003  
9 1899012530 0 00000024  
0 4500000000 9 00000005

What if I want to write this number?

30.0000000008 = 3.00000000008 x 10^2

I have a problem. I can’t write it this way, because there’s not enough (d) digits to fit. That’s the problem you run into with loss of precision. Now, the upside of this is that I can write numbers that have more than 20 digits in them. This is useful if I need to work with numbers that might vary over a huge range (+/- 10^10000000 here). Really, though I only have the same total numbers to work with (10^20 for 20 digits), they’re just spread out more.

When I do math, I can add tiny quantities to large ones, and if they’re tiny enough, it doesn’t affect my large number. That’s useful in many engineering applications, but not when those tiny numbers are meaningful (as in the second-counting example). The moral of the story is to never use floating point values unless you have to and know what you’re doing.

(Side note: Computers store in binary format, and so get away with an extra bit of precision. Since a number in scientific notation doesn’t start with a 0, it must start with a 1, and you don’t need to store that 1).

---

<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:** [November 9, 2010, 6:57pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/62 "2010-11-09T18:57:05Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> Perhaps off-topic, but ENIAC has a pretty torturous claim to the “first computer”. [long snip]

The Manchester Small-Scale Experimental Machine, aka the Baby, was the first because it was the first **electronic, digital, stored-program** computer. That meant it wasn’t a loom (electric), it wasn’t an analog machine (digital), and it actually worked like computers work now (stored-program).

(Also, the [Kenbak-1](http://www.kenbak-1.net/), from 1970, was the first personal computer. Everything prior to it was either not personal, or not a computer.)

(Seriously. I’ve seen people claim with a straight face that CMS running on a System/360 mainframe was the first personal computer. You can only believe that if you enjoy redefining words into a fine pulp.)

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [November 9, 2010, 7:10pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/63 "2010-11-09T19:10:59Z")

</div>

> [@Frylock](#):
>
> What does “precision” mean in this context? Why exactly does adding 1 to that number yield the same number rather than the number plus 1?

Others have answered this well, but the fact that they needed to is indicative of the issue I was illustrating: Computers can create an illusion accuracy that has unexpected holes.

---

<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:** [November 9, 2010, 7:48pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/64 "2010-11-09T19:48:07Z")

</div>

> [@](#):
>
> (Side note: Computers store in binary format, and so get away with an extra bit of precision. Since a number in scientific notation doesn’t start with a 0, it must start with a 1, and you don’t need to store that 1).

But you might anyway, depending on the precise format your computer, compiler, etc. use. There are advantages and tradeoffs either way.

---

<div class="post-metadata">

**Author:** ![SCSimmons](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@SCSimmons](https://boards.straightdope.com/u/SCSimmons)\
**Post date:** [November 9, 2010, 7:53pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/65 "2010-11-09T19:53:15Z")

</div>

> [@sleestak](#):
>
> I was going to mention this. However, a slight correction. Feynman setup the program but if I recall correctly his students figured out how to correct for errors. I remember that Feynman describes walking in and seeing all kinds of different colored cards running through the system and the students just told him not to worry about it, they had it handled even though Feynman was freaking. Apparently, the students decided that when they found an error they could cut out the error and continue on with the calculation but would use different color cards for the ‘fixed’ calculation. Then they found another error and added another color. And so on.

I think there are two different stories getting conflated here … This process was designed for the actual ‘modern’ computers–IBM provided some early mainframes for the Manhattan Project. The earlier discussions were about the previous process of using human ‘computers’ with mechanical calculators, which they used while they were waiting for the IBM equipment to arrive. Feynman claims that after his re-working of the process, the humans were finishing problems at nearly the predicted speed of IBM’s machines. (Conclusion: they were running Windows. 😉 )

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 9, 2010, 8:13pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/66 "2010-11-09T20:13:20Z")

</div>

> [@Chronos](#):
>
> But you might anyway, depending on the precise format your computer, compiler, etc. use. There are advantages and tradeoffs either way.

What are the advantages to wasting space storing the constant leading 1? Surely, whenever you might want it to be present, you can just add it back, no problem.

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [November 9, 2010, 8:42pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/67 "2010-11-09T20:42:23Z")

</div>

> [@Indistinguishable](#):
>
> What are the advantages to wasting space storing the constant leading 1? Surely, whenever you might want it to be present, you can just add it back, no problem.

If the one is implied, then you can’t represent zero without making a special exception, which you then have to check for in every operation.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 9, 2010, 8:54pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/68 "2010-11-09T20:54:08Z")

</div>

Ah, good point. Though using a sign bit already implies some special case checking, and having zero as a special case along with that is really no different. But, yeah, that’s a good answer.

---

<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:** [November 9, 2010, 9:22pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/69 "2010-11-09T21:22:11Z")

</div>

Keeping the initial 1 also lets you handle underflows a little more gracefully. Let’s say, for instance, that the smallest exponent allowed is -255. If you’re always chopping off the initial 1, then the smallest number you can handle is 1.000000e-255, and if you go any smaller than that, then you suddenly drop off the deep end, probably with bad results. If you’re leaving it, though, then you still have a little more wiggle room where you can go to 0.1111111e-255, or 0.100000e-255, or 0.000100e-255, or whatever, and just gradually lose precision instead of abruptly crashing and burning. Now, granted, if you’re paying attention and using good programming practices, you shouldn’t ever get close to your underflow limit (if you are, you need to restructure your problem), but sloppy programming does happen.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 9, 2010, 9:37pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/70 "2010-11-09T21:37:44Z")

</div>

Sure, de-/subnormal numbers. But those are accounted for in IEEE floating point formats not by actually storing the leading bit of the significand, but by instead taking it to be implicitly 1 most of the time except when the exponent is the smallest possible (just as in your examples), in which case it’s implicitly 0 instead. Which is a fine system, but it still isn’t actually wasting space storing the leading bit, which was what I was wondering about the advantages of.

---

<div class="post-metadata">

**Author:** ![BrotherCadfael](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@BrotherCadfael](https://boards.straightdope.com/u/BrotherCadfael)\
**Post date:** [November 9, 2010, 10:00pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/71 "2010-11-09T22:00:19Z")

</div>

> [@unclelem](#):
>
> I’m pretty sure the novel that people are sort of remembering is “Starman Jones”.  
> A decent story, but badly dated due to the main plot device involving manual calculations and math tables.
> 
> IIRC they used human astrogators to calculate with a triple redundancy, vote out the odd result error catching mechanism. Unfortunately for them, two officers made the same mistake on the jump outward and outvoted the correct answer.

Actually, two astrogators recognized the mistake, but the senior one was unwilling to tell the captain (the third astrogator) that he was wrong.

---

<div class="post-metadata">

**Author:** ![JoelUpchurch](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@JoelUpchurch](https://boards.straightdope.com/u/JoelUpchurch)\
**Post date:** [November 10, 2010, 3:38am UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/72 "2010-11-10T03:38:51Z")

</div>

> [@unclelem](#):
>
> I’m pretty sure the novel that people are sort of remembering is “Starman Jones”.  
> A decent story, but badly dated due to the main plot device involving manual calculations and math tables.
> 
> IIRC they used human astrogators to calculate with a triple redundancy, vote out the odd result error catching mechanism. Unfortunately for them, two officers made the same mistake on the jump outward and outvoted the correct answer.
> 
> The titular character needed to calculate an inverse for the previously botched jump calculation without any of the original paperwork, and also without their 10-digit log/trig tables which had been destroyed.

“Starman Jones” had electronic calculators also, but they were pretty primitive with binary input-outputs. One of the things they were looking up in their tables were the binary to decimal conversion. In sounds pretty primitive, but in terms of discrete transistors and a computer about the size of a refrigerator using 1953 technology it wouldn’t be far off.

I also got the impression that regular ballistic calculations were pretty easy, but during a transition they had to make course corrections every few minutes to hit their window.

Of course it does sort of beg the question about why they didn’t use a bigger computer that didn’t require all the gymnastics to do calculations. Their starships didn’t seem to be hard up for space. The descriptions shouldn’t a lot like a ocean liner. I suspect they kept the older primitive computers to protect the privileges of the astrogators guild.

---

<div class="post-metadata">

**Author:** ![JoelUpchurch](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@JoelUpchurch](https://boards.straightdope.com/u/JoelUpchurch)\
**Post date:** [November 10, 2010, 4:02am UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/73 "2010-11-10T04:02:00Z")

</div>

> [@unclelem](#):
>
> I’m pretty sure the novel that people are sort of remembering is “Starman Jones”.  
> A decent story, but badly dated due to the main plot device involving manual calculations and math tables.
> 
> IIRC they used human astrogators to calculate with a triple redundancy, vote out the odd result error catching mechanism. Unfortunately for them, two officers made the same mistake on the jump outward and outvoted the correct answer.
> 
> The titular character needed to calculate an inverse for the previously botched jump calculation without any of the original paperwork, and also without their 10-digit log/trig tables which had been destroyed.

It wasn’t triple redundancy. They were doing a round robin with each astrogator doing a different sighting. The only reason that Max Jones knew that the Captain had made a mistake, was that he had an eidetic memory and was doing all the sightings in his head, so he realized that the Captain had transposed two digits. The second astrogator under corrected on his shot and by the time it came back to the Captain the error was huge, but still fixable, but the Captain applied it with the wrong sign.

---

<div class="post-metadata">

**Author:** ![UncleFred](https://avatars.discourse-cdn.com/v4/letter/u/f0a364/32.png) [@UncleFred](https://boards.straightdope.com/u/UncleFred)\
**Post date:** [November 10, 2010, 12:42pm UTC](https://boards.straightdope.com/t/complex-calculations-before-computers/559926/74 "2010-11-10T12:42:04Z")

</div>

Milutin Milankovitch spent decades (some of it under house arrest during WW1) calculating changes in the inicidence of solar rays at all latitudes of the earth over 10,000’s of thousands of years due to the earth’s tilt, pitch, and wobble. He was looking for an explanation for ice ages.

[Previous page](https://boards.straightdope.com/t/complex-calculations-before-computers/559926.md?page=3)
