Spigot algorithm is used to compute the value of a mathematical constant such as π or e.
A spigot algorithm is a particular type of algorithm used to compute the value of a mathematical constant such as π or e, which can generate a stream of output digits without needing to reuse them.