Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Entire Value of PI?

  1. #1
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default Entire Value of PI?

    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

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

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

    http://www.trans4mind.com/personal_d...king%20Example

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    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

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I love this (courtesy of Wikipedia, if they allow the hot link):



    It makes it seem so simple.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I like that. I never really quite understood the concept of pi until now. Thanks John.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Thank you all, jscheuer1, djr33, and thetestingsite.

    -magicyte (did you ever know it is pronounced majisite?)
    Last edited by magicyte; 07-07-2008 at 05:23 PM. Reason: forgot something

  10. #10
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •