+ 1
Pi
Anyone can get the Nth decimal value of pi?
3 odpowiedzi
+ 2
You might want to apply any of the algorithms here:
https://en.m.wikipedia.org/wiki/Category:Pi_algorithms
Then convert the result to a string and look for the character with Nth index (or N-1 for most languages).
For just finding the Nth digit without calculating the π itself, try the BBP formula:
https://en.m.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula
0
Here's a comparison of python's internal value of pi to value of pi
from the code coach involving 1000 digits of pi. Python's pi is good
for 15 decimal places.
https://code.sololearn.com/c9We9fWe9ob3
- 2
I guess the answer is 3.14 don't even bother to ask how i got it because i just guessed.