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

  • Context: Graduate 
  • Thread starter Thread starter Redbelly98
  • Start date Start date
  • Tags Tags
    Base Pi
Click For Summary
SUMMARY

The discussion focuses on calculating the digits of π in base-16 using the Wolfram formula, which is expressed as a series involving terms like 4/(8n+1) and 1/(16^n). It clarifies that obtaining the nth digit is not straightforward, as the series does not yield integers between 0 and 15 directly. Instead, users must manage both fractional and integral parts of the series to extract the desired digit. The conversation emphasizes the necessity of computational assistance for this task, rather than manual calculations.

PREREQUISITES
  • Understanding of the Wolfram formula for π calculation
  • Familiarity with base-16 (hexadecimal) number representation
  • Basic knowledge of series and summation concepts
  • Proficiency in programming for numerical computations
NEXT STEPS
  • Research the implementation of the Wolfram formula in Python using libraries like NumPy
  • Explore algorithms for extracting digits from fractional series
  • Learn about numerical precision and rounding techniques in programming
  • Investigate existing software tools for calculating π in various bases
USEFUL FOR

Mathematicians, computer scientists, and programmers interested in numerical methods for calculating π, as well as anyone looking to deepen their understanding of base conversions and series calculations.

Redbelly98
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Messages
12,179
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]:

[tex] \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}[/tex]

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   Reactions: 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

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K