I need a good pi calculator

Discussion in 'Community' started by sjjordan, Apr 20, 2005.

  1. sjjordan macrumors 6502

    Joined:
    Jun 10, 2003
    Location:
    United States
    #1
    I've seen the available pi calculators for OS X, and once my RAM is full, they're done calculating. Is there any available program that calculates "x" million decimals, then saves that chunk of number to a text file and repeats, calculating another "x" million decimals...

    This would allow one to save RAM yet generate a huge text file of pi decimals.

    Anything available like this?
     
  2. James Philp macrumors 65816

    James Philp

    Joined:
    Mar 5, 2005
    Location:
    Oxford/London
    #2
    I'm not entierly sure why you would want this!?
    Maybe somewhere out there there is already a text file of billions of decimal places of Pi.
    From a mathematical standpoint, i dont think what you are describing is possible, but i could be wrong!? :confused: :confused:
     
  3. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #3
    I think that you could probably just open the Terminal and use bc, the arbitrary number calculator, set the precision high, and print pi.
     
  4. sjjordan thread starter macrumors 6502

    Joined:
    Jun 10, 2003
    Location:
    United States
    #4
    Sure. Pi's been calculated to trillions of decimal spaces. I'd like to see how far I could calculate it with my powerbook. If I could do it in steps, like I described, then I could cyle through that calculation and have a multi meg/gig word document to show for it.
     
  5. Daveway macrumors 68040

    Daveway

    Joined:
    Jul 10, 2004
    Location:
    New Orleans / Lafayette, La
    #5
    i use the Unix br calculator quite often and I think it would work just fine for what he's looking for.
     
  6. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #6
    Or just rattle it off from memory.

    3.141592653589793384626433832...

    (I'm not quite sure about those last few.. too lazy to check...)

    :D
     
  7. iris_failsafe macrumors 6502

    iris_failsafe

    Joined:
    May 4, 2004
    Location:
    San Francisco, CA
    #7
    You need a huge cluster for that. Myabe you could ask Virginia tech to run the calculation for you. Some years ago I remeber SGI used to calculate the PI number to show the superscalar power of their machines.


    so now that you know the way, start saving for the 1000+ Xserves you are going to need.


    Good luck
    :D
     
  8. saabmp3 macrumors 6502a

    Joined:
    Jul 22, 2002
    Location:
    Tacoma, WA
    #8
    You can code something up like that c in under an hour. The calculation algorithm for pi can be found pretty easily with google. But, I think you have the coding idea a little backwards, I doubt you can dump the contents to ram and then start over. You could always just do the entire thing from your HD (external firewire). It'd be slow as heck, but you'd up the limit from 4 gigs (or however much ram you have) to the limit of your file system.

    BEN
     
  9. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #9
    After I posted my previous message, I hopped onto Google to check my results. I found this site:

    http://www.angio.net/pi/piquery

    Which has links to download digits and algorithms, and a nifty little search engine. My phone numbers all show up in pi, in the 10-million-some digits.

    You might take note that they used a custom number encoding (two digits per byte, I guess they use BCD) to save memory.
     
  10. mthangbk macrumors newbie

    Joined:
    Mar 9, 2005
    Location:
    Ha Noi, Viet Nam
    #11
    Using Mathematica, my PowerBook can compute 1 million digits of PI in several seconds. What a fast machine :D
     

Share This Page