Spigot algorithm
Appearance
Spigot algorithms are used to compute the values of the mathematical constants (most famously) pi and e. Unlike recursive algorithms, a spigot algorithm yields outputs incrementally without referring to previously computed digits. The number of digits to be computed is specified in advance, and may still produce an incorrect last few digits.