Post Reply 
Pi digits (again) - an unbounded spigot program
05-20-2024, 03:43 PM (This post was last modified: 05-20-2024 05:39 PM by Thomas Klemm.)
Post: #26
RE: Pi digits (again) - an unbounded spigot program
(05-20-2024 02:39 PM)EdS2 Wrote:  I'm especially interested in Albert's spigot from the ABC documentation - is it described anywhere else, is it attached to any name? It seems simple and effective.

From the linked document:
Quote:The program works by repeatedly refining a so-called continued fraction that represents pi. The first approximation is 4/1, the second is 4/(1+1/3), which is 12/4. In the next, the 3 is replaced by 3+4/5, and in the next after that, the 5 is replaced by 5+9/7 and so on, so that each part of the fraction is k2/(2k+1+...) for k = 0, 1, 2, ... .

So it appears to use Lambert's formula:

\(
\begin{align}
\pi = \frac{4}{
1 + \frac{1^2}{
3 + \frac{2^2}{
5 + \frac{3^2}{
7 + \cdots}}}}
\end{align}
\)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Pi digits (again) - an unbounded spigot program - Thomas Klemm - 05-20-2024 03:43 PM



User(s) browsing this thread: 3 Guest(s)