|
|
|||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||
Calculating Pi (π) |
||||||||||||||||||||||||||||||||||||||||||||||||||
Electronics & Technology
The discovery of mathematical series allowed for further refinement. The Madhava-Leibniz series, formulated by the Kerala mathematician Madhava around 1400 and independently discovered by James Gregory and Gottfried Leibniz, expressed π as an infinite series:
However, its slow convergence made it impractical for high-precision computations. In 1706, John Machin introduced an arctangent-based formula, allowing for faster convergence. His formula,
became the foundation for many subsequent calculations. By the 19th century, calculus enabled mathematicians to derive additional series for pan π. William Shanks, for instance, manually calculated π to 707 decimal places, though only 527 were correct. The advent of electronic computers revolutionized π-calculation methods. In 1949, the ENIAC computer computed π to 2,037 decimal places in 70 hours using Machin's formula. By 1958, the IBM 704 mainframe extended π to 10,000 places, and by 1987, Fujitsu's VP200 reached over a million digits using the Gauss-Legendre algorithm. Today, the Chudnovsky algorithm, developed in 1988, dominates high-precision π calculations. This formula,
converges exceptionally quickly, adding about 14 decimal places per term. It is paired with highly optimized arithmetic techniques, such as Fast Fourier Transform (FFT) multiplication, to handle the enormous numbers involved. In 2021, a team at the University of Applied Sciences Graubünden in Switzerland used a high-performance computing cluster to compute ���� π to 62.8 trillion decimal places. A year later, Japanese software engineer Emma Haruka Iwao used Google Cloud infrastructure to extend this to 100 trillion places. These calculations required months of processing and employed specialized tools such as Y-cruncher, which is designed for extreme precision in numerical computations. For smaller-scale applications, π can also be computed programmatically. Below is an example of Excel VBA code for calculating π to a specified number of decimal places using the Leibniz formula: Public Function CalculatePi(DecimalPlaces As Integer) As String Dim k As Long Dim pi As Double To use this code, open the VBA editor in Excel by pressing Alt + F11. Insert a new module and paste the code. Close the editor and return to Excel, where you can call the function in a cell, such as =CalculatePi(10), to calculate π to 10 decimal places. While this method illustrates the principle, it is not suitable for computing π to millions or trillions of digits, as modern computations require advanced algorithms and hardware.
AI Technical Trustability Update While working on an update to my RF Cafe Espresso Engineering Workbook project to add a couple calculators about FM sidebands (available soon). The good news is that AI provided excellent VBA code to generate a set of Bessel function plots. The bad news is when I asked for a table showing at which modulation indices sidebands 0 (carrier) through 5 vanish, none of the agents got it right. Some were really bad. The AI agents typically explain their reason and method correctly, then go on to produces bad results. Even after pointing out errors, subsequent results are still wrong. I do a lot of AI work and see this often, even with subscribing to professional versions. I ultimately generated the table myself. There is going to be a lot of inaccurate information out there based on unverified AI queries, so beware. Electronics & High Tech Companies | Electronics & Tech Publications | Electronics & Tech Pioneers | Electronics & Tech Principles | Tech Standards Groups & Industry Associations | Societal Influences on Technology |
||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||