# Questions about pi

**URL:** <https://boards.straightdope.com/t/questions-about-pi/662796>\
**Category:** Factual Questions\
**Created:** [July 6, 2013, 5:17pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796 "2013-07-06T17:17:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teuton](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/teuton/32/3864_2.png) [@Teuton](https://boards.straightdope.com/u/Teuton)\
**Post date:** [July 6, 2013, 5:17pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/1 "2013-07-06T17:17:43Z")

</div>

2 questions, in fact.

1. To what degree of accuracy is pi generally used in actual work stuff

and, which is more of a GQ with a definite answer:

1. How many decimal places would you need pi to be to accurately describe a circle that bounded the known universe, to a tolerance of the planck length?

---

<div class="post-metadata">

**Author:** ![Exapno\_Mapcase](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/exapno_mapcase/32/1051_2.png) [@Exapno\_Mapcase](https://boards.straightdope.com/u/Exapno_Mapcase)\
**Post date:** [July 6, 2013, 5:55pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/2 "2013-07-06T17:55:21Z")

</div>

[How Much Pi Do You Need?](http://blogs.scientificamerican.com/observations/2012/07/21/how-much-pi-do-you-need/).

The article talks about the limits of needed precision for pi. The comments on that page give 63 decimals to get to a planck length.

---

<div class="post-metadata">

**Author:** ![Ranger\_Jeff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ranger_jeff/32/2065_2.png) [@Ranger\_Jeff](https://boards.straightdope.com/u/Ranger_Jeff)\
**Post date:** [July 6, 2013, 5:56pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/3 "2013-07-06T17:56:26Z")

</div>

When I was an instructor in the electronics school in the Coast Guard, the joke going around was 7 decimal places was “close enough for NASA”. In most situations, I suspect 3.14159 is good enough.

---

<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:** [July 6, 2013, 5:56pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/4 "2013-07-06T17:56:38Z")

</div>

> [@Teuton](#):
>
> 2 questions, in fact.
> 
> 1. To what degree of accuracy is pi generally used in actual work stuff

3.141593 (single precision) and 3.141592653589793 (double precision). Not necessarily what is _needed_, but what is often used.

---

<div class="post-metadata">

**Author:** ![standingwave](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@standingwave](https://boards.straightdope.com/u/standingwave)\
**Post date:** [July 6, 2013, 6:08pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/5 "2013-07-06T18:08:20Z")

</div>

> [@Exapno\_Mapcase](#):
>
> [How Much Pi Do You Need?](http://blogs.scientificamerican.com/observations/2012/07/21/how-much-pi-do-you-need/).
> 
> The article talks about the limits of needed precision for pi. The comments on that page give 63 decimals to get to a planck length.

That’s about what I get. I suppose it depends on the current estimate for the size of the universe. From wiki I found:  
Radius of the observable universe: 4.32×10^26 meters  
Planck length: 1.62×10^−35 metres.  
Radius of obv universe in planck lengths: 2.67×10^61.

---

<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:** [July 6, 2013, 6:27pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/6 "2013-07-06T18:27:55Z")

</div>

> [@](#):
>
> 3.141593 (single precision) and 3.141592653589793 (double precision). Not necessarily what is needed, but what is often used.

Yeah, most computer languages have a built-in standard math library, which includes a variety of often-used functions (trig, log, etc.) and constants like pi. Most programmers will just grab the built-in value, which will be to either single or double precision.

In practice, you can quite often get away with approximating pi as 3, and in the majority of cases where that’s not good enough, 3.14 is still plenty.

---

<div class="post-metadata">

**Author:** ![K364](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k364/32/5_2.png) [@K364](https://boards.straightdope.com/u/K364)\
**Post date:** [July 6, 2013, 7:06pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/7 "2013-07-06T19:06:22Z")

</div>

I vaguely remember that there was a fraction that was much close than 22/7 (=~3.142857) Anybody know what that fraction is?

---

<div class="post-metadata">

**Author:** ![Great\_Antibob](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Great\_Antibob](https://boards.straightdope.com/u/Great_Antibob)\
**Post date:** [July 6, 2013, 7:18pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/8 "2013-07-06T19:18:04Z")

</div>

> [@K364](#):
>
> I vaguely remember that there was a fraction that was much close than 22/7 (=~3.142857) Anybody know what that fraction is?

There are infinitely many such fractions. Do you have anything to narrow it down a bit?

One fraction that’s closer is 223/71. Clearly, this is in the same neighborhood as 22/7. And 2232/711 is even closer.

In the worst case, just take powers of 10 as the denominator: 314159/100000, which is pretty close.

---

<div class="post-metadata">

**Author:** ![K364](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k364/32/5_2.png) [@K364](https://boards.straightdope.com/u/K364)\
**Post date:** [July 6, 2013, 7:33pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/9 "2013-07-06T19:33:49Z")

</div>

> [@K364](#):
>
> I vaguely remember that there was a fraction that was much close than 22/7 (=~3.142857) Anybody know what that fraction is?

I found 355/113 = 3.141592920353982 - that’s pretty close!

---

<div class="post-metadata">

**Author:** ![Donnerwetter](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@Donnerwetter](https://boards.straightdope.com/u/Donnerwetter)\
**Post date:** [July 6, 2013, 7:37pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/10 "2013-07-06T19:37:31Z")

</div>

3 (three) ought to be good enough.

[Did a state legislature once pass a law saying pi equals 3?](http://www.straightdope.com/columns/read/805/did-a-state-legislature-once-pass-a-law-saying-pi-equals-3)

---

<div class="post-metadata">

**Author:** ![K364](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k364/32/5_2.png) [@K364](https://boards.straightdope.com/u/K364)\
**Post date:** [July 6, 2013, 7:38pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/11 "2013-07-06T19:38:24Z")

</div>

> [@Great\_Antibob](#):
>
> There are infinitely many such fractions. Do you have anything to narrow it down a bit?

Sorry, I meant a reasonably common fraction, i.e. 3 digits/2-3 digits

---

<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:** [July 6, 2013, 8:21pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/12 "2013-07-06T20:21:25Z")

</div>

> [@Great\_Antibob](#):
>
> There are infinitely many such fractions. Do you have anything to narrow it down a bit?

First, it’s easy to exclude lots of fractions as uninteresting, because there are fractions with smaller numbers but with a better approximation. Here’s a list of the first few:  
[http://www.isi.edu/~johnh/BLOG/1999/0728\_RATIONAL\_PI/top\_approximations.txt](http://www.isi.edu/~johnh/BLOG/1999/0728_RATIONAL_PI/top_approximations.txt)

22/7 and 355/113 are “extra special” in that the next larger numerators with a better approximation are quite a bit larger. For 22/7, the next better fraction is 179/57. For 355/113, it’s 52163/16604 (it jumps over two orders of magnitude!).

The next “extra special” fraction is 5419351/1725033.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [July 6, 2013, 9:37pm UTC](https://boards.straightdope.com/t/questions-about-pi/662796/13 "2013-07-06T21:37:52Z")

</div>

I vaguely recall from a World History class I took (circa 1982) that one of the early kings of Italy (Frederick Barbarossa maybe?) also decreed some “simple” rational value for pi. It was mentioned in the textbook, IIRC.

(I’ve never seen or heard any mention of this since, nor can I find anything on Google that seems to be relevant.)

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [July 7, 2013, 1:17am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/14 "2013-07-07T01:17:19Z")

</div>

“For actual work stuff” covers a huge range of activity. I might have occasion to need a rough estimate of the mass of water in a large spherical tank that I can eye-ball as being about 10 meters across. I’d use pi=3 in a blink for getting the volume, and that’s assuming I don’t just visually approximate the thing as a cube and leave pi out of it entirely.

pi=3 is good to 5%, and if you are working in your head, you probably are just trying to get a ballpark number for something. Knowing how well you need to estimate something is a major part of estimating something, and there are many real-world problems where 5% is wayyyy better than one is after.

As mentioned, you would typical use a built-in constant in software, because (1) you need the precision, (2) it’s just as easy to use the full precision available as any particular approximation, or (3) because explicitly writing PI or pi() or whatever in the code serves as documentation about the make up of the expression. (That is, 3 might be good enough, but 4_pi/3_r[sup]3[/sup] jumps out as the volume of a sphere if you see it, whereas 4\*r[sup]3[/sup] doesn’t.)

---

<div class="post-metadata">

**Author:** ![deltasigma](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@deltasigma](https://boards.straightdope.com/u/deltasigma)\
**Post date:** [July 7, 2013, 1:41am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/15 "2013-07-07T01:41:33Z")

</div>

Can’t you think of pi as how many sides a circle has. If you inscribe a circle inside of a square so that 2r = the length of one side then

1. the circumference of the circle is 2 \* pi \* r and that of the square is 4 \* 2 \* r

2. the area of the circle is pi \* r^2 and the area of the square is 4 \* r^2 (also = (2r)^2)

3. The volume of a cylinder is height \* pi \* r^2.

So to continue the example let’s assume a height of 2r.

The volume of the cylinder would be 2r \* pi \* r^2 = 2pi \* r^3 while the volume of the cube would be 4 \* 2r \* r^2 = 8 \* r^3 (also = (2r)^3)

---

<div class="post-metadata">

**Author:** ![crucible](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@crucible](https://boards.straightdope.com/u/crucible)\
**Post date:** [July 7, 2013, 1:55am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/16 "2013-07-07T01:55:54Z")

</div>

so, what function is used to determine the actual numbers in the coefficient? How can an irrational number be calculated beyond the accuracy of the measurement of a radius and of a circumference?

I seem to remember it is a trig function, but, again, aren’t those values dependent of measurement as the basis?

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [July 7, 2013, 2:11am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/17 "2013-07-07T02:11:41Z")

</div>

> [@crucible](#):
>
> so, what function is used to determine the actual numbers in the coefficient? How can an irrational number be calculated beyond the accuracy of the measurement of a radius and of a circumference?
> 
> I seem to remember it is a trig function, but, again, aren’t those values dependent of measurement as the basis?

See [this wiki page](http://en.wikipedia.org/wiki/Approximations_of_%CF%80) for a wide range of infinite series that yield pi. Some are indeed tied to trigonometry. One that you might try playing with on a calculator since it follows an easy pattern is:

Keep adding terms of the following form:  
2 +  
2 \* (1) / (3) +  
2 \* (1_2) / (3_5) +  
2 \* (1_2_3) / (3_5_7) +  
2 \* (1_2_3_4) / (3_5_7_9) +  
…etc., with more and more numbers in the numerator and more and more _odd_ numbers in the denominator.

---

<div class="post-metadata">

**Author:** ![Asympotically\_fat](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Asympotically\_fat](https://boards.straightdope.com/u/Asympotically_fat)\
**Post date:** [July 7, 2013, 2:12am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/18 "2013-07-07T02:12:34Z")

</div>

> [@deltasigma](#):
>
> Can’t you think of pi as how many sides a circle has. If you inscribe a circle inside of a square so that 2r = the length of one side then
> 
> 1. the circumference of the circle is 2 \* pi \* r and that of the square is 4 \* 2 \* r
> 
> 2. the area of the circle is pi \* r^2 and the area of the square is 4 \* r^2 (also = (2r)^2)
> 
> 3. The volume of a cylinder is height \* pi \* r^2.
> 
> So to continue the example let’s assume a height of 2r.
> 
> The volume of the cylinder would be 2r \* pi \* r^2 = 2pi \* r^3 while the volume of the cube would be 4 \* 2r \* r^2 = 8 \* r^3 (also = (2r)^3)

No it doesn’t really work, consider a regular pentagon inscribed in a square and you’ll quickly see why.

---

<div class="post-metadata">

**Author:** ![deltasigma](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@deltasigma](https://boards.straightdope.com/u/deltasigma)\
**Post date:** [July 7, 2013, 2:18am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/19 "2013-07-07T02:18:40Z")

</div>

> [@Asympotically\_fat](#):
>
> No it doesn’t really work, consider a regular pentagon inscribed in a square and you’ll quickly see why.

I don’t mean it literally - a circle doesn’t have “sides”. Anyway I think the correct procedure would be to use polygons with increasing numbers of sides to enclose the circle and then compare the areas - no?

edit: so in that sense, a circle has an infinite number of “sides”.

---

<div class="post-metadata">

**Author:** ![Asympotically\_fat](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Asympotically\_fat](https://boards.straightdope.com/u/Asympotically_fat)\
**Post date:** [July 7, 2013, 2:31am UTC](https://boards.straightdope.com/t/questions-about-pi/662796/20 "2013-07-07T02:31:53Z")

</div>

> [@deltasigma](#):
>
> I don’t mean it literally - a circle doesn’t have “sides”. Anyway I think the correct procedure would be to use polygons with increasing numbers of sides to enclose the circle and then compare the areas - no?

Of course a circle doesn’t have sides - y’know I do realize that, but in no sense I can think of off the top of my head is it like a a regular polygon of pi sides.

[Next page](https://boards.straightdope.com/t/questions-about-pi/662796.md?page=2)
