Questions about pi

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?

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.

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.

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

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.

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.

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.

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

3 (three) ought to be good enough.

Did a state legislature once pass a law saying pi equals 3?

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

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

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.

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.)

“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 4pi/3r[sup]3[/sup] jumps out as the volume of a sphere if you see it, whereas 4*r[sup]3[/sup] doesn’t.)

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)

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 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 * (12) / (35) +
2 * (123) / (357) +
2 * (1234) / (3579) +
…etc., with more and more numbers in the numerator and more and more odd numbers in the denominator.

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”.

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.