Computation of the N Digits of Pi in O (N) Iterations
Xingfeng Chen
Published on: 2021-05-14
Abstract
A method for computing the n decimal digits of π in O(n) iterations with O (n) computation complexity and O (1) memory. The result of 3.1415926 < π < 3.1415927 by Zu Chongzhi can be calculated in 10 iterations or 12288 polygons with 9 bit significant decimal intermediate precision. The 1000th bit of π can be calculated at 1660th iteration with 1005 bit significant intermediate precision and the 10000th bit can be calculated at 16608th iteration with 10005 bit significant intermediate precision. The key thought is that the area of a circle equals to the sum of the difference of areas between polygons inside one circle. This method is similar to Liu Hui’s methods, but there’s a little bit of a difference. Guess that Zu Chongzhi may use this method to obtain higher accuracy.