## Calculation of the Digits of π

by the Spigot Algorithm

of Rabinowitz and Wagon

(Faster Version)

The spigot algorithm of Rabinowitz and Wagon outputs sequentially the decimal digits of π one at a time. The basic idea of the algorithm however applies to other positional system. In particular, it was noted yet by Rabinowitz and Wagon themselves that the algorithm can be sped up by using the system in base, say, 10000. The digits in such a system are groups of 4 decimal digits so that in this variant the algorithm generates 4 decimal digits at a time:

π/10_{ } | = .314159 ...0 + 1/10000 (3141 + 1/10000 (5926 + 1/10000 (5358 + 1/10000 (9793 + 1/10000 ( ... ))))). |

(The applet implements the algorithm as it is described by Arndt and Haenel with a 50,000 limitation on the number of decimal digits.)

What if applet does not run? |

### References

- S. Rabinowitz, S. Wagon,
__A Spigot Algorithm for the Digits of π__,*The American Mathematical Monthly*, Vol. 102, No. 3. (Mar., 1995), pp. 195-203. - J. Arndt, C. Haenel,
*π Unleashed*, Springer, 2000

|Activities| |Contact| |Front page| |Contents| |Algebra|

Copyright © 1996-2018 Alexander Bogomolny

68362515