Calculating Digits of Pi in Base-16 Using the Wolfram Formula

  • Thread starter Thread starter Redbelly98
  • Start date Start date
  • Tags Tags
    Base Pi
Redbelly98
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Messages
12,178
Reaction score
186
According to this link at Wolfram, the following formula can be used to calculate any digit of the base-16 representation of π[/size]:

<br /> \pi = \sum_{n=0}^{\infty} \ <br /> \left(<br /> \frac{4}{8n+1} - \frac{2}{8n+4} - \frac{1}{8n+5} - \frac{1}{8n+6} <br /> \right)<br /> \cdot \frac{1}{16^n}<br />

But apparently it is not as straightforward as simply taking the nth term in the series to get the nth digit. For example, the 0th term is 3.1333..., and not simply 3 as it must be.

So my question is, just how does one use this formula to calculate a digit? Or am I missing something in my above reasoning?
 
Physics news on Phys.org
The problem is that the expression between brackets isn't an integer between 0 and 15, so it's not going to give you the nth digit. You're going to have to deal with fractional and integral parts and do some cleaning up before you actually get the nth digit to pop out. You can read up on how to do this here. This is something that's not so easily done by hand, but very easily done by a computer program.
 
  • Like
Likes 1 person
morphism said:
You can read up on how to do this here.
Ah, thanks.

For the most part I'll have to be satisfied with "it's not so simple", but now I have a better appreciation and some sense of how it can be done.

Thanks again!
 

Similar threads

Back
Top