Abstract
The word spigot indicates that the "digits" (generally in a widened meaning) of the result number are extracted successively from left to right (as if pumped through a spigot) by using only integer arithmetic, as opposed to the iterative approach, where the result number as the whole is improved after each iteration step by using (high-precision) floating-point arithmetic. The approach of spigot computing as used in papers by S. Kamal Abdaly (Comm. ACM 13(1970)), S. Rabinowitz and S. Wagon (American Mathematical Monthly 102(3) (1995)), A. H. J. Sale (Comput. J. 11(1968)) is now systematized and correctness is formally proved; the way for achieving an arbitrary accuracy is shown.
Then a method for computing roots of arbitrary rational numbers is developed. If a root is not rational, spigot approach is used to compute its decimal approximation with an arbitrary given accuracy; if the root is rational, its numerator and denominator are computed exactly. This method for root computing is absolutely reliable: it is both formally proved and tested by numerical examples.
Similar content being viewed by others
References
Bailey, D., Borwein, P., and Plouffe, S.: On the Rapid Computation of Various Polylogarithmic Constants, Math. Comp. 66 (1997), pp. 903–913.
Gosper, R. W.: Acceleration of Series, Memo no. 304, M.I.T. Artificial Intelligence Laboratory, Cambridge, 1974.
Kamal Abdaly, S.: Algorithm 393-Special Series Summation with Arbitrary Precision, Comm. ACM 13 (1970), p. 570.
Knopp, K.: Theorie und Anwendung der unendlichen Reihen, Verlag von Julius Springer, 1964.
Knuth, D. E.: The Art of Computer Programming, Vol. 2, Seminumerical Algorithms, Third Edition, Addison-Wesley Reading, 1997.
Rabinowitz, S. and Wagon, S.: A Spigot Algorithm for the Digits of π, American Mathematical Monthly 102 (3) (1995), pp. 195–203.
Reichel, H.: Formale Spezifikation und Verifikation, Vorlesungsscript, TU Dresden Fakultät Informatik Institut für theoretische Informatik, 1993.
Sale, A. H. J.: The Calculation of e to Many Significant Digits, Comput. J. 11 (1968), pp. 229–230.
Stoschek, E. P.: Abenteuer Algorithmus, Teil 2, Dresden University Press, 1997.
Stoschek, E. P.: Internet Workshop on Design of Algorithms; Module 9, http://wwwtcs.inf.tu-dresden.de/DresdenAlgorithmicsChannel/modul9/task9.htm.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Do, DK. Spigot Algorithm and Root Computing. Reliable Computing 7, 247–273 (2001). https://doi.org/10.1023/A:1011403105587
Issue Date:
DOI: https://doi.org/10.1023/A:1011403105587