An Unbounded Spigot Algorithm for the Digits of Pi
Rabinowitz and Wagon (<i>American Mathematical Monthly</i> 102(3):195–203, 1995) present a <em>spigot algorithm</em> for computing the digits of π. A spigot algorithm yields its outputs incrementally, and does not reuse them after producing them. Their algorithm is inherently...
Main Author: | |
---|---|
Format: | Journal article |
Published: |
2015
|
Summary: | Rabinowitz and Wagon (<i>American Mathematical Monthly</i> 102(3):195–203, 1995) present a <em>spigot algorithm</em> for computing the digits of π. A spigot algorithm yields its outputs incrementally, and does not reuse them after producing them. Their algorithm is inherently <em>bounded</em>; it requires a commitment in advance to the number of digits to be computed, and in fact might still produce an incorrect last few digits. We propose two <em>streaming algorithms</em> based on the same characterization of π, with the same incremental characteristics but without requiring the prior bound. |
---|