A Python3 implementation of the spigot algorithm for π
The spigot algorithm is an algorithm that computes π on a digit-by-digit basis, much different from iterative algorithms, which compute an approximation of its value based on the number of iterations
- Python 3.6 or above
git clone https://github.com/nibble-4bits/py-spigot-algorithm.git
cd py-spigot-algorithm
- Credits to this paper by Stanley Rabinowitz and Stan Wagon where they describe how they derived the algorithm and how it works
- Also thanks to this website for helping me understand the algorithm better