Results 1 to 18 of 18

Thread: Pi and accuracy?

  1. #1

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    Pi and accuracy?

    please, how can i get an accurate value or function for Pi, VB allows me 2 use 3.14159265358979, but the error increases so much when i work with large figures?

    again, given x, i want to implement inverse tangent of x
    Nobody is smarter than all of us!

  2. #2
    Member
    Join Date
    Mar 2003
    Posts
    33
    3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706 7982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381 9644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412 7372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160 9433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949 12.



    Chris

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    33
    Also, the tangent inverse of X could be also the following


    tan^-1(x)=(i/2)log(i+z/i-z)


    Chris

  4. #4
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    I thought it was ArcTan(1)*4? (Radians)

    But in any case VB won't allow you to use such a simple calculation to get an accurate result (i don't think...) since its accuracy is limited anyways.

    Look on mathworld.wolfram.com for some Pi calculating algorithms.
    Unite, proletariat!

  5. #5
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Here you got 50 000 000 digits...I am not allowed to post more then 10 000 so you have to down load them by your self...

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Here you got 50 000 000 digits...I am not allowed to post more then 10 000 so you have to down load them by your self...

    http://www.cecm.sfu.ca/projects/ISC/data/pi.html

  7. #7

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    da chain

    Originally posted by BillyYank42
    3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706 7982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381 9644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412 7372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160 9433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949 12.



    Chris
    please, how will these chains of numbers enter my code, i declare the variable as variant or what?.
    Nobody is smarter than all of us!

  8. #8

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    code?

    Originally posted by BillyYank42
    Also, the tangent inverse of X could be also the following


    tan^-1(x)=(i/2)log(i+z/i-z)


    Chris
    Hey, Bill , i can't make anything out of these formula (or is it an equation). where is the i and z coming from?
    please, i need a code-like version that i can implement!
    Nobody is smarter than all of us!

  9. #9

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    too long ?

    Originally posted by NoteMe
    Here you got 50 000 000 digits...I am not allowed to post more then 10 000 so you have to down load them by your self...
    yea, i saw it, can you put all those in your codes?, if so, how do you do the magic?
    (how old is the Pi, dates back to 5000 years ago with the Egyptians!)
    Nobody is smarter than all of us!

  10. #10
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    You know there are no magic formula for pi....all the formulas is just formulas that are giving close digits, and not the acurat number...

  11. #11
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Oyad,
    exactly why do you think you need pi beyond the precision of a double? Even if you did, and you used variants, surely you wouldn't need Pi to more than 32 decimal places?

    Pi to the 32nd decimal place will calculate the circumference of the universe to within an accuracy of the width of a hydrogen atom. So it would seem that anything beyond 32 decimals is a bit of an overkill.


    -Lou

  12. #12
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Plus, humans cannot measure things to a precision greater than 7 significant digits, even in Physics.

    This doesn't mean they can't measure at 1025
    it means that if they do post a measurement then only the first seven numbers in the number string mean anything.

  13. #13

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    you're all right

    you guys are all right, 'cos i was getting wrong results, i felt the Pi i was using was not accurate enough. i re-examined my codes and every is now okay.
    but i think tan(x*(Pi/180)) should return an error?
    Nobody is smarter than all of us!

  14. #14
    New Member
    Join Date
    May 2003
    Location
    In a house. A medium-sized house. In the suburban area...
    Posts
    8
    Originally posted by NotLKH


    Pi to the 32nd decimal place will calculate the circumference of the universe to within an accuracy of the width of a hydrogen atom. So it would seem that anything beyond 32 decimals is a bit of an overkill.


    -Lou
    yeah, what are you trying to do?
    IF you.thief = TRUE THEN
    you.future.place = jail
    END IF

  15. #15

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    Lightbulb clue?

    Originally posted by Fragolata
    yeah, what are you trying to do?

    i am trying to generate results for the following functions tan, sin,cos and the inverse also
    Nobody is smarter than all of us!

  16. #16
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    Originally posted by NotLKH
    Pi to the 32nd decimal place will calculate the circumference of the universe to within an accuracy of the width of a hydrogen atom. So it would seem that anything beyond 32 decimals is a bit of an overkill.
    How was that figured out? I would presume that you'd have to know something about the size of the universe....
    Unite, proletariat!

  17. #17
    Lively Member
    Join Date
    Apr 2003
    Location
    Georgetown, Texas
    Posts
    114
    All BASIC-derived languages give SIN(X), COS(X), TAN(X) AND ATN(X). To get the ASIN(X) and ACOS(X), you can use the formulas:

    ASIN(X) = ATN(X/SQR(1-X^2))
    ACOS(X) = ATN(SQR(1-X^2)/X)

    Also, remember that the answers are in radians. To obtain degrees, multiply by 180/3.14159

  18. #18
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Originally posted by siyan
    How was that figured out? I would presume that you'd have to know something about the size of the universe....
    I believe it was in referance to an estimated 10-15 billion light year radius of the visible universe, and I'd like to attribute that to Isaac A., but it might have been Arthur C.


    -Lou

Posting Permissions

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



Click Here to Expand Forum to Full Width