Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>And if you need to "produce" pi just remember pi/4 = 1 - 1/3 + 1/5 - 1/7...

This converges too slowly to be practically useful.

If you group the consecutive terms in pairs you get that the nth pair sums to 1/(2n + 1) - 1/(2n + 3) = (2n+3 - (2n+1))/(2n+1)(2n+3) = 2/(2n+1)(2n+3) = Theta(1/n^2). Thus it has the same asymptotic growth order as sum 1/n^2. That has has monotone terms and so it's easy to estimate how many terms we need to get k correct fractional digits by solving 10^(-k) = 1/n^2, giving n = 10^(k/2).

This is off by a big constant factor but it gives you the right idea that you need an exponential number of terms relative to the desired number of significant digits. From Wikipedia: "After 500,000 terms, it produces only five correct decimal digits of pi."

So, this series for pi has only theoretical relevance.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: