A SPIGOT ALGORITHM FOR THE DIGITS OF PI
暂无分享,去创建一个
It is remarkable that the algorithm illustrated in Table 1, which uses no floating-point arithmetic, produces the digits of π. The algorithm starts with some 2s, in columns headed by the fractions shown. Each entry is multiplied by 10. Then, starting from the right, the entries are reduced modulo den, where the head of the column is num/den, producing a quotient q and remainder r. The remainder is left in place and q × num is carried one column left. This reduce-and-carry is continued all the way left. The tens digit of the leftmost result is the next digit of π. The process continues with the multiplication of the remainders by 10, the reductions modulo the denominators, and the augmented carrying.
[1] Arthur H. J. Sale. The Calculation of e to Many Significant Digits , 1968, Comput. J..
[2] S. Kamal Abdali. Algorithm 393: Special series summation with arbitrary precision , 1970, CACM.
[3] William Gosper,et al. Acceleration of Series , 1974 .
[4] Jonathan M. Borwein,et al. Ramanujan, modular equations, and approximations to Pi or how to compute one billion digits of Pi , 1989 .