Reputation: 157
I have this odd goal: dedicate a Raspberry PI to calculating the value of Pi to millions of digits. Running 24/7, I have 496 weeks before my (statistically speaking) demise. So, researching on SO, I found this page that might be an answer to my quest. Question: can anyone point me to more information on this specific algorithm and whether or not it is valid and accurate for a gazillion digits? Or, if this dog can't hunt, point me to one that can. The algorithm must not consume large amounts of memory -- a hard drive will do that. Thoughts?
Upvotes: 1
Views: 1234
Reputation: 36702
You likely want to go for an algorithm that calculates digits one by one independently. The RABINOWITZ AND WAGON’S SPIGOT ALGORITHM (presented in the paper) outputs the nth digit of pi in linear time O(n) with memory usage O(log(n)).
Upvotes: 2