Did you know that before computers humans only knew the first 100 digits of Pi. The ENIAC computer took it to about 2000 digits in the 1950s. Today large, clustered, super computers can exceed a million digits. As a challenge to myself I wanted to see how far I could go with an Apple //e and 64KB of memory. Memory footprint is key so I eliminated DOS and wrote the code in 6502 assembly. With 128KB and bank swapping I could take it to 8000 digits but I’ll leave that for someone else. With 16 bit addressing and the Rabinowitz-Wagon algorithm you might be able to get to 10,000 digits but to go further requires a MUCH more complicated algorithm difficult to decompose in to small chunks on an Apple //e. Below is the source code, the assembly listing, and the output from the 4000 digit execution. Oh, and these calculations take a long time!



