I've never been interested in calculating digits (3.141592653589793238462643383279502 is all most scientists even need), but you're right, figuring out the process is the interesting part. Smile As for 377 or so digits using up all of the RAM (actually, that was a while ago, and I believe that grew a bit since that update), that just shows you how much the numbers and digits grow with this algorithm. Perhaps your spigot algorithm set to calculate max digits, but truncated at the asked amount of digits, would be the fastest and most efficient solution. I might actually get to doing that, if you don't mind.
EDIT: Just tried, and apparently the more digits you want to calculate, the longer it takes to initialize and go through one iteration. Maybe calculating the max and truncating is not the best idea for a general solution Razz

I've actually even made a phi calculator using the same idea, except it calculates a square root digit by digit, and it's blazing fast compared to the pi calculator. I believe I can let it go on for more digits, too. I wonder if I should release it...
Calculating max digits and just printing a few of them is a bad way to go. The way this spigot works, or the other ones too, you need to create something like a matrix. For my program, it's a ono to one ratio. To calculate 5 digits, you need 5 rows and 5 columns for 25 sets of calculations. For 50 digits, you need 50 rows and 50 columns for 2500 sets of calculations. Other spigots might use a 4 to 1 ratio. To get 1 digit you need 4 columns and 1 row for 4 sets of calculations. For 5 digits, you need 20 columns and 5 rows for 100 sets of calculations. You can post your phi calculator just to show it, but I find it too much trouble to key in a program on the calculator. I don't use the calculators for anything, just to collect them when I find a TI that I don't have. I bought a TI 89 Titanium long ago just to have something to write programs on, but later on I found that I could write programs on the iPad which had better graphics, more memory, a better editor, and a lot faster.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement