# Computers and π (Pi).

**URL:** <https://boards.straightdope.com/t/computers-and-pi/698711>\
**Category:** In My Humble Opinion\
**Created:** [September 17, 2014, 4:42am UTC](https://boards.straightdope.com/t/computers-and-pi/698711 "2014-09-17T04:42:50Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_B](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jim_b/32/4338_2.png) [@Jim\_B](https://boards.straightdope.com/u/Jim_B)\
**Post date:** [September 17, 2014, 4:42am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/1 "2014-09-17T04:42:50Z")

</div>

I have wondered this now for some time. Why is it, when the build a new computer, and they want to test it out, they calculate Pi (π)?

Pi is not the only irrational number. And it’s not even my favorite.

For starters, I like the square root of 3, believe it or not. Here, I’ll even get them started with the calculator on my computer: 1.7320508075688772935274463415059.

My next favorite irrational number is a little more obscure. In high school, we were taught trigonometry. And it is really a fascinating subject, well, in my opinion at least. And for some reason I was immediately drawn to the Sine of 60 degrees. It equals the square root of three (again) divided by 2. Here, again I will get them started: 0.86602540378443864676372317075294.

I can’t say why I like the Sine of 60. It’s just something about that beginning 8 and then two 6’s. Looks imposing, I think–kind of like the “57” in Heinz “57 Varieties”. Just my personal feelings at least.

Well, those are my two submissions for irrational number for new computers to find. What do the rest of you think?

:):)🙂

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [September 17, 2014, 4:59am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/2 "2014-09-17T04:59:39Z")

</div>

There are a few reasons:

1. Pretty much everyone knows what pi is, so you can use it to easily communicate with them about how powerful your new box is. (We calculated pi to seventy gazillion places in one nanosecond!) Not as many people know about e or have ever really thought about the square roots of two or three.

2. There’s a chicken-and-egg thing. We’ve been calculating pi since the dawn of digital computing, so every time there’s a new big computer, we check that it works by calculating pi again and comparing it to previous calculations. If the first hundred billion or so digits match, then it probably works. (Although there have in recent times been efforts to calculate other favorite irrational numbers to many digits. But the fact is there’s no real practical purpose for doing this other than testing and for bragging rights.)

3. There are some interesting algorithms that have been developed for calculating pi, in particular some really cool binary spigot algorithms. I don’t know if such things exist for other interesting numbers.

---

<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:** [September 17, 2014, 5:17am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/3 "2014-09-17T05:17:12Z")

</div>

Instead of decimal notation where √3 = 1.732…, continued fraction notation is purer and many irrational numbers become “boring.” For example, √3 = [1; 1, 2, 1, 2, 1, 2, …].  
BTW, √3’s decimal expansion is almost the only √ I’ve memorized and George Washington is the only President whose birth-year I’ve memorized. I learned them together more than five decades ago, the one reminding me of the other and vice versa 🙂

In continued-fraction notation, e = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, …] but π is the unfathomable(?) π = [3; 7, 15, 1, 292, 1, 1, 1, 2, …]

My favorite irrational is the golden ratio φ = [1; 1, 1, 1, 1, 1, …]. It seems nifty that the Golden-ratio bus-scheduling heuristic relies on _two_ more-or-less unrelated properties of the Golden ratio.

---

<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:** [September 17, 2014, 5:29am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/4 "2014-09-17T05:29:02Z")

</div>

> [@Jim\_B](#):
>
> I have wondered this now for some time. Why is it, when the build a new computer, and they want to test it out, they calculate Pi (π)?

Should they calculate the 5 million names of God ? (Obscure short story, but I assume the title gives the idea.)

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [September 17, 2014, 6:38am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/5 "2014-09-17T06:38:44Z")

</div>

Since when do they calculate pi? The first thing we do when we integrate a new processor into a computer is boot UNIX and print “hello world.” If you can boot the OS you are most of the way there. I’ve never seen anyone brag about computing some of pi, which would just test a limited number of instructions and the floating point unit.  
Maybe supercomputers do this - but it wouldn’t be much of a test of parallelism in any case.

---

<div class="post-metadata">

**Author:** ![Trinopus](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@Trinopus](https://boards.straightdope.com/u/Trinopus)\
**Post date:** [September 17, 2014, 6:41am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/6 "2014-09-17T06:41:27Z")

</div>

They do a whole lot of different tests. One of the things they like to do with new computers is generate a bunch of random (pseudo-random) numbers and test them for giveaway patterns.

Also to try to hack the registrar’s office computer and give yourself a better grade in that pesky American Literature class.

---

<div class="post-metadata">

**Author:** ![Dervorin](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dervorin](https://boards.straightdope.com/u/Dervorin)\
**Post date:** [September 17, 2014, 10:25am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/7 "2014-09-17T10:25:56Z")

</div>

> [@Isilder](#):
>
> Should they calculate the 5 million names of God ? (Obscure short story, but I assume the title gives the idea.)

The problem with this is that you can only do it once before you notice that “overhead, without any fuss”, the stars are going out.

ETA: Wasn’t it actually the nine billion names of God?

---

<div class="post-metadata">

**Author:** ![Malacandra](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Malacandra](https://boards.straightdope.com/u/Malacandra)\
**Post date:** [September 17, 2014, 10:55am UTC](https://boards.straightdope.com/t/computers-and-pi/698711/8 "2014-09-17T10:55:06Z")

</div>

> [@Dervorin](#):
>
> The problem with this is that you can only do it once before you notice that “overhead, without any fuss”, the stars are going out.
> 
> ETA: Wasn’t it actually the nine billion names of God?

Yes to both. Most of us prefer a test routine that will not end the universe. 😃

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [September 17, 2014, 12:16pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/9 "2014-09-17T12:16:03Z")

</div>

_Do_ they test out new computers by calculating digits of Pi anymore? I thought that went out with hair bands. Or maybe disco.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [September 17, 2014, 12:25pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/10 "2014-09-17T12:25:36Z")

</div>

I don’t think it was ever in. It’s a really poor test of a CPU. When I build a new computer the first thing I do is look for smoke. After that I’ll do something that involves a lot of memory, or something better than producing what appears to be random digits.

---

<div class="post-metadata">

**Author:** ![Precambrianmollusc](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/precambrianmollusc/32/63_2.png) [@Precambrianmollusc](https://boards.straightdope.com/u/Precambrianmollusc)\
**Post date:** [September 17, 2014, 3:16pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/11 "2014-09-17T15:16:52Z")

</div>

It is one of several informal benchmarks used by people who like to overclock their computers and try and see who has the fastest. As such, it is a measurement of one aspect of a processor/computer system that some people like to compare.

I would be interested to see a cite that identifies any large processor manufacture or computer manufacturer as using PI calculations as a test of a device.

An example of an actual test used to verify a processors functionality is here

> **[Download Intel Drivers and Software](https://www.intel.com/content/www/us/en/download-center/home.html?DwnldID=19792)**
>
> Download new and previously released drivers including support software, bios, utilities, firmware and patches for Intel products.

That is Intels processor test program, with test meaning “does it actually work as it is supposed to”  
“The diagnostic checks for brand identification, verifies the processor operating frequency, tests specific processor features and performs a stress test on the processor.”

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [September 17, 2014, 5:57pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/12 "2014-09-17T17:57:37Z")

</div>

> [@Precambrianmollusc](#):
>
> An example of an actual test used to verify a processors functionality is here
> 
> [https://downloadcenter.intel.com/Detail\_Desc.aspx?DwnldID=19792](https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=19792)
> 
> That is Intels processor test program, with test meaning “does it actually work as it is supposed to”  
> “The diagnostic checks for brand identification, verifies the processor operating frequency, tests specific processor features and performs a stress test on the processor.”

I suspect that is mostly for customers. The actual verification of processor functionality is a lot harder than that.

After the FDIV bug Intel poured tons of verification resources on each processor. Most functionality verification is done long before there is any silicon, and consists of manual or automatic tests run on simulators which run on thousands of servers.  
(This is all from 15 years ago or so - but I doubt it has changed much except in the addition of more formal verification.)  
Since Intel processors are compatible with previous versions, there is a large library of functional verification tests which are run on first silicon. These are called “kitchen sink” tests. You run those and new patterns and see what breaks. Eventually you discover that most of the tests detect nothing and they get pruned.  
Then there are still more detailed tests which look for defects, and problems of functionality. These can detect design errors and functionality tests can detect defects, but they are not good at the jobs they are not designed to do.

By the time a customer sees a part the design errors had better be scrubbed, except for a known bug list which won’t be tested by the diag. That is to detect either defects which have popped up, or maybe marginal parts which have drifted to bad territory as they age. I suspect most of it is to make the user feel better.

---

<div class="post-metadata">

**Author:** ![Precambrianmollusc](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/precambrianmollusc/32/63_2.png) [@Precambrianmollusc](https://boards.straightdope.com/u/Precambrianmollusc)\
**Post date:** [September 17, 2014, 6:28pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/13 "2014-09-17T18:28:25Z")

</div>

Agree, the software package linked is more of an integration test making sure the processor is playing well with everything else in the computer, probably should have said ‘verify the computers functionality”, with the caveats that a test only test the tings it is designed to test. I’d put the PI test in a ‘benchmarking ‘ category as it really doesn’t have a pass/fail criteria

On a similar note to your last paragraph about processor testing and design error and bugs , up until about 10 years ago, 8086 and 80186 processors were still being designed into downhole drilling equipment and in other applications where fault tolerance was critical. This was largely because the known bug list and behaviors was very well known and documented, so the people writing the code for the processor would be unlikely to be surprised by an undocumented feature. I think the only reason they were eventually dropped was because getting them in ceramic form factor was almost impossible.

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [September 17, 2014, 6:58pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/14 "2014-09-17T18:58:37Z")

</div>

> [@Precambrianmollusc](#):
>
> On a similar note to your last paragraph about processor testing and design error and bugs , up until about 10 years ago, 8086 and 80186 processors were still being designed into downhole drilling equipment and in other applications where fault tolerance was critical. This was largely because the known bug list and behaviors was very well known and documented, so the people writing the code for the processor would be unlikely to be surprised by an undocumented feature. I think the only reason they were eventually dropped was because getting them in ceramic form factor was almost impossible.

Another reason might be that they are made at a very old process node, which has very high yields. Field failures are a function of inherent yield, so this would also lead them to being more reliable. Government labs doing very high reliability stuff also use old process nodes, as well as doing tests that we in industry could never afford.

---

<div class="post-metadata">

**Author:** ![Mikahw](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Mikahw](https://boards.straightdope.com/u/Mikahw)\
**Post date:** [September 17, 2014, 7:12pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/15 "2014-09-17T19:12:05Z")

</div>

The test I’ve usually seen used is Prime95, which finds prime numbers, not the value of Pi.

---

<div class="post-metadata">

**Author:** ![Buck\_Godot](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/buck_godot/32/6573_2.png) [@Buck\_Godot](https://boards.straightdope.com/u/Buck_Godot)\
**Post date:** [September 17, 2014, 7:30pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/16 "2014-09-17T19:30:07Z")

</div>

As for favorite irrationals, my obvious choice is Euler’s number e=2.718281828459045… I use it much more often than I do pi, and it has a long repeated sequence early in the decimal expansion, such that if you can learn the first 5 decimal places you get the next 4 for free.

Still pi is the Elvis of the transcendentals, and I admit knowing the first 30 decimal places of pi from memory while only knowing the first 9 decimal places of e.

---

<div class="post-metadata">

**Author:** ![Grestarian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/grestarian/32/3227_2.png) [@Grestarian](https://boards.straightdope.com/u/Grestarian)\
**Post date:** [September 17, 2014, 11:42pm UTC](https://boards.straightdope.com/t/computers-and-pi/698711/17 "2014-09-17T23:42:35Z")

</div>

> [@Isilder](#):
>
> Should they calculate the 5 million names of God ? (Obscure short story, but I assume the title gives the idea.)

Arthur C. Clarke short story?  
9 Billion

Now-a-days that would take a dozen nanoseconds on a iPhone? :dubious:  
G!  
…and one by one, without a fuss, the stars began to wink out.

ETA: Ninja’d by Dervorin ☹
