# Calculating Pi?

1. Feb 19, 2004

### Zurtex

I've seen before that Pi supposedly takes a lot of processing power to approximate because of its infinite series $$4\sum_{r=1}^\infty \frac{-1^{r+1}}{2r-1}$$

However would it not be far quicker to use the infinite series to approximate $$arcsin{\frac{1}{\sqrt{2}}}$$ and then multiple the answer by 4? It seems to calculate Pi far faster to the small amount of terms I have done so far.

Last edited: Feb 19, 2004
2. Feb 19, 2004

### NateTG

There are many different algorithms for pi. A friend of mine once wrote a program he called emupa (even more useless pi algorithm) that calculated pi by using the property that the chance that two numbers have a common factor is $$\frac{\pi}{6}$$ or something like that. It took several hours of computer time to generate a few digits of pi.

Using $$\arcsin(\sqrt{2})$$ has the disadvantage that you need to calculate the digits of $$\sqrt{2}$$ in most number systems in order to use it.
So, $$\arctan{1}=\frac{\pi}{4}$$ is a better option, and is typically used.

There are series that generate more digits per term, but any of them generate n digits of pi in O(n) time, so there's not really a big difference for most applications.

3. Feb 19, 2004

### Zurtex

Oh right, that makes sense thanks

4. Feb 24, 2004

### Tom McCurdy

speed test

Also the reason they all use that algorithm for solving for pi is because it is something standard that can be used to compare processing speeds of something like computers. They are not actually going for the values of pi, but instead the focus is on how fast the processors is. It is a speed test.

5. Feb 25, 2004

### lavalamp

I wrote a JavaScript program that calculates pi using that power series, check it out it you want.

6. Feb 28, 2004

### Shahil

Just a thought - do we REALLY need to know the exact value for pi??? Coz the values we got now kinda do everything we need it to do.

7. Feb 28, 2004

We "know" it in the sense that we know how to calculate it, given an infinite amount of time. But, since we obviously don't have an infinite amount of time (or ink and paper), we can't write all of the digits of pi.

8. Feb 28, 2004

### NateTG

Really, we know the exact value of &pi; the same way that we know the exact value of 2.5. For real life applications, the limitation is the measuring equipment. In mathematics there is no need for error.

It's possible to write numbers base &pi; so that 1 is a non-repeating decimal, and &pi; is easy to write.

9. Feb 28, 2004

### toasty

pi - another way

I am a bit rusty on this stuff so please be patient.

Let Th (theta) be the angle enscribed at the apex of a triangle made by two radii and the secant at the circurmference., where the secant is not greater than one radius., and the apex is at the center of the circle.

* means , times or mutiply

sin Th * 360 / Th .

However I began with R , the radius and not D the diameter - so I must divide the resulting expression by 2

So

(sin Th * 360 / Th ) / 2 = Pi

When Th is very small - eg 1/360^n then the first 10 or so digits in the result remain identical...

Last edited: Feb 28, 2004
10. Feb 28, 2004

### master_coda

This seems to be mixing up the idea of "knowing" a number with our ability to produce a decimal representation of said number.

Decimal representation has a lot of practical uses. But mathematically it's just another way of writing a number. The ability to write down a finite decimal representation for a number doesn't make that number more "knowable".

11. Feb 28, 2004

### toasty

Perhaps there is no unique value that is exactly 'pi', IOW it cannot be. I once provided a proof for 'root 2' to my mathamatician friend which he tore to shreds with squiggles ...leaving me with a headache.

it goes like this.

Numbers must be separated to be distinct. What separates these is the dull stuff that holds on to the 'value' of Root 2, pi etc .. Which helps explain how it is ARITHMETICALLY possible to calculate AROUND them for ever, though never ever being able to hit the bullseye -because there isn't one.

When once an intellligent mathamatician began to understand this oddity he found a hole in the thought-world where a new dimension began and another ended. That mathamatician went mad.

OC one cannot 'know' a number, only that there is a number ...eg 4 or something like that. I don't know 4 any more than I know you. I can't get personal with 4 because it is not that sort of thing. Like 'myself and 4 went to the bar for a beer' Yeah ... that is mad.

OTOH we can know that x IS so many or so big, a number. We know that x is equal to 4.

Numbers provide exactitude to quantity statements. It is not that there are more apples in my desk than yours which permits me to say 'I have more than you'; rather, it is the fact there are 4 apples in my desk but 3 in yours that shows it.

In some realms there are exactitudes. Between these lie the work of a higher power which we cannot measure.

Last edited: Feb 28, 2004
12. Feb 28, 2004

In that case, I guess we'd need to more properly define how to "know" a number. Or perhaps that's the wrong question. How about this one, "What exactly do you want to know about $\pi$?"

13. Feb 29, 2004

### NateTG

This deals with one of the more subtle properties of real numbers -- completeness.

Completeness means that any set of real numbers that has an upper bound has a least upper bound, and that least upper bound is a real number.

Now for numbers like $$\sqrt{2}$$ it's easy to show that there is an upper bound for the set of real numbers such that $$x^2 \leq 2$$. This means that the set has a suprememum, and that suprememum is $$\sqrt{2}$$. A similar approach can be used with $$\pi$$ and several of the trig functions.

14. Feb 29, 2004

### toasty

I am certain these sorts of explanations
comfort many a wandering soul, good! For the rest of us what we understand by the word 'number' is a thing which enables us to count things.

We don't need to know anything about 'sets' or 'number lines' or any of that to be able to do it

Last edited: Mar 1, 2004
15. Mar 1, 2004

Staff Emeritus
Not if you just accept the numbers (including pi) as "given". But you were theorizing about the numbers and as soon as you do that you have to pay attention to the basic definitions, including sets, completeness, transcendence, and all kinds of stuff. You wanna play with the big boys you gotta spec up.

16. Mar 1, 2004

### toasty

EDIT:

Last edited: Mar 3, 2004
17. Mar 1, 2004

### curiousbystander

Ahhh (if I may don the venerable robe of the Socratic for a moment)... What are we counting when we say 3/4?

18. Mar 1, 2004

### NateTG

In that case you would be counting quarters. A quarter is one of four interchangable parts that make up a whole. For example, a horse is a quarter of a four-horse team, or 25 cents is a quarter of a dollar.

19. Mar 1, 2004

### curiousbystander

(still wearing the white robes-- robes which upon closer inspection appear a bit dirty around the edges)...

May we then (after fixing a standard length) use numbers to measure the length of objects-- saying that an object has a length of 3/4 when our standard of measurement may be subdivided into 4 equal sized pieces, one of which fits precisely 3 times without overlap or gap atop the object whose length we deemed to be 3/4?

20. Mar 2, 2004

### NateTG

There is a fundemental difference between counting and measuring. Numbers can be used to measure lengths, but completenes is needed in order to make geometry with measure work. For non ideal objects, there is sufficient fudging that completeness is not necessary. It's not difficult to come up with geometric constructions that contain lines with measure which is not rational. An alternative view is that you need a minimal granularity in order for counting to function, but (the standard notion of) measure does not allow for that.

Rational numbers are a effectively a counting system with 'variable granularity', but it is possible to show that there are pairs of meausurements that do not have a whole ratio relationship.

Here's a rather fun construction of one of them:
On a decimal ruler, each unit is divided into tenths, each of those tenths is divided into tenths, and each tenth of a tenth is divided, and so on.

Now, it's easy to see that on this ruler, $$\frac{1}{9}$$ is not on any of the marks. It's always possible to get closer to it, but dividing one more time, and going to the next notch.

Now let's say I have a ruler which denotes a length of one unit. Then I can subdivide the section between each mark with a smaller mark, so now the ruler counts halves. Then i divide each half into three sixths, each of the sixths into four twenty-fourths, and so on.

This new ruler has the rather nifty property that every rational number, that is, that every number which can be expressed as a fraction, is exactly on some mark. To prove this, simply consider that if the number can be written as $$\frac{a}{b}$$ then the number of segments on the ruler will be divisible by $$b$$ after at most $$b$$ steps and so, some notch will be at $$\frac{a}{b}$$.

Now, you need to ask whether a location that never falls exactly on a notch is possible on this ruler, and the answer is yes. For example, you can take the location analagous to $$\frac{1}{9}$$ - the answer is always closer to the next smaller notch. This location, by the way, corresponds to $$e-2$$