I stumbled upon a very brief and powerful C program that calculates over a thousand digits of pi super fast. I presumed it to be an adaptation of a Machin-like formula, but the exact algorithm used is a spigot algorithm: http://www.pi314.net/eng/goutte.php Inside is the C program (both in its original form and "readable" form), and the Scratch equivalent/translation. http://codepad.org/coJOcSsx