Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top