Question

I have found this formula for computing Pi value: enter image description here

But I need to compute only(for example - 1000th) number of Pi value. How I can do it with provided formula?

Thanks.

Was it helpful?

Solution

What you want is called a "spigot algorithm". Take a look at [1] in the section "BBP digit-extraction algorithm for pi". Good luck and have fun.

[1] http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top