Pi Calculator

Discussion in 'C++' started by faint545, Sep 29, 2010.

  1. faint545

    faint545 New Member

    Joined:
    Sep 29, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I'm writing a program that calculates Pi in C and i'm using a double data structure to store the final result. Double only gives me a certain amount of digits after the decimal point. My question is, what kind of data structure or what method could I use if I potentially wanted to have it calculate 100 digits or more after the decimal point?
     
  2. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    http://www.techgeek.in
    Are u sure double is giving only certain amount of digits?? As far as I know double gives many digits after decimal, if not 100, and I have to truncate the digits using 0.2lf ...Getting 100 or more seems to be absurd to me....
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice