# Pi approximation

If $d(a,b)=$ largest $n$ such that $a$ and $b$ agree on all digits upto $n$. Eg. $d(\pi,3.14)=3$, $d(0.1234667,0.1234669)=7$. What is the asymptotics of $d(\pi/4,1-1/3+1/5-1/7+\cdots(\pm)1/m)$ as $m\rightarrow\infty$?

• So $d(a,b)=\lceil-\log_{10}|a-b|\rceil$? – J. M. is a poor mathematician Oct 27 '11 at 2:56
• This is a complicated way of asking about the rate of convergence of the Gregory series.. – Ragib Zaman Oct 27 '11 at 3:00
• No, there can be problem if there are a long sequence of 9's in decimal representation of $\pi$, you can see it here, section 10: ics.org.ru/doc?pdf=440&dir=e – Nurdin Takenov Oct 27 '11 at 3:21

Using the standard estimates for an alternating series of decreasing terms , we know the error $$\frac{\pi}{4} - \sum_{k=1}^m \frac{(-1)^{k+1} }{2k-1} = \sum_{k=m+1}^{\infty} \frac{(-1)^{k+1} }{2k-1}$$
has magnitude $\sim \displaystyle \frac{1}{2m}.$ The number of agreed digits is thus asymptotic to the number of leading decimal zeros in the decimal expansion of $\displaystyle \frac{1}{2m},$ which is $\sim \log_{10} 2m .$