magicyte

07-05-2008, 02:18 AM

Is it possible to return the ENTIRE value of PI (heh, don't think so) using Math.abs(Math.PI)? (What I am asking is, would this work?)

-magicyte

-magicyte

View Full Version : Entire Value of PI?

magicyte

07-05-2008, 02:18 AM

Is it possible to return the ENTIRE value of PI (heh, don't think so) using Math.abs(Math.PI)? (What I am asking is, would this work?)

-magicyte

-magicyte

thetestingsite

07-05-2008, 02:51 AM

Not sure about that, but I came across this website:

http://www.trans4mind.com/personal_development/JavaScript/longnumPiMachin.htm#oo1%20Working%20Example

Hope this helps.

http://www.trans4mind.com/personal_development/JavaScript/longnumPiMachin.htm#oo1%20Working%20Example

Hope this helps.

jscheuer1

07-05-2008, 04:29 AM

Yes, but why? And, there is no entire value of PI - it's an irrational number. The approximation of PI provided by javascript is accurate enough for just about any computational purpose. For example, FF 2 gives:

3.141592653589793

for:

<script type="text/javascript">

document.write(Math.PI);

</script>

How much more precise than that do you need?

And remember, whatever you do to get a more accurate value will in almost all likelihood slow down the execution of your overall code.

3.141592653589793

for:

<script type="text/javascript">

document.write(Math.PI);

</script>

How much more precise than that do you need?

And remember, whatever you do to get a more accurate value will in almost all likelihood slow down the execution of your overall code.

magicyte

07-05-2008, 08:40 PM

I know it is an irrational number! PI is endless! I was wondering if the length of it could be extended with Math.abs(). I am guessing not.

-magicyte

-magicyte

jscheuer1

07-05-2008, 11:10 PM

Not like that. Math.PI will be what it will be. Math.abs(Math.PI) would be exactly the same value. What thetestingsite suggested might work though. However, as I said, once you go beyond the native Math.PI for whatever reason, your code will take a performance hit.

djr33

07-06-2008, 12:53 AM

It's impossible to really calculate pi. It's a ratio of a perfect circle, which cannot really be created; and in order to create that perfect circle, the only real way to do it is with pi.

Thus, the only way to really calculate it is to do an average, working with both values somehow systematically to work toward the value.

There is an integral which I believe is impossible to solve, which holds the exact value of pi. I can't remember what it is-- I found this last year while bored in class.

Basically, if you were to integrate (solve, for those of you who haven't done any calculus) the integral, it would be pi, but it's not possible to do it.

Thus, the only way to really calculate it is to do an average, working with both values somehow systematically to work toward the value.

There is an integral which I believe is impossible to solve, which holds the exact value of pi. I can't remember what it is-- I found this last year while bored in class.

Basically, if you were to integrate (solve, for those of you who haven't done any calculus) the integral, it would be pi, but it's not possible to do it.

jscheuer1

07-06-2008, 04:20 AM

I love this (courtesy of Wikipedia (http://en.wikipedia.org/wiki/Main_Page), if they allow the hot link):

http://upload.wikimedia.org/wikipedia/commons/2/2a/Pi-unrolled-720.gif

It makes it seem so simple.

http://upload.wikimedia.org/wikipedia/commons/2/2a/Pi-unrolled-720.gif

It makes it seem so simple.

thetestingsite

07-06-2008, 04:21 AM

I like that. I never really quite understood the concept of pi until now. Thanks John. :)

magicyte

07-07-2008, 05:22 PM

Thank you all, jscheuer1, djr33, and thetestingsite.

-magicyte (did you ever know it is pronounced majisite?)

-magicyte (did you ever know it is pronounced majisite?)

boogyman

07-07-2008, 05:35 PM

there have been numerous calculations to find out the exact value of pie, however research has never been able to get the full value. There was extensive research and i believe at one point a group of super computers computed it out to something like 100,000 places... dont quote me because I do not know the exact figure, but no one has ever been able to figure out the exact value.... The longest value I have ever seen used besides the TT symbol is 9 places 3.141592653 and that was once. Typically you only see 2 maybe 3 places being used as the "value" if written out in decimal form

jscheuer1

07-07-2008, 06:12 PM

there have been numerous calculations to find out the exact value of pie

I think one set of researches once determined it to be "strawberry". ;)

I think one set of researches once determined it to be "strawberry". ;)

magicyte

07-07-2008, 06:46 PM

I think one set of researches once determined it to be "strawberry".

lol :D

-magicyte

lol :D

-magicyte

Powered by vBulletin® Version 4.2.2 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.