Catalan's Constant [Ramanujan's Formula]

  6   2
In Category - Applied Mathematics
Fee, Greg Project Gutenberg 1996
Mathematical constants Readers of public-domain and historical texts
Project Gutenberg digital edition en

Edition facts

Words: 3,419
Reading time: 15 min
Text sections: 2
Greg Fee's technical note details the computation of Catalan's constant to 300,000 digits using an Euler-accelerated series and Ramanujan's formula, with C++/LiDIA code and performance benchmarks.
Share

Greg Fee's Catalan's Constant [Ramanujan's Formula] is a concise computational record rather than a narrative text. The work opens with a precise timestamp: the constant was computed to 300,000 digits on September 29, 1996, using a Sun Ultra-Sparc in 1 day, 8 hours, 15 minutes, and 15.55 seconds. This level of specificity sets the tone for a document that is as much about the process as the result.

The text includes inline C++ code using the LiDIA library, with comments explaining each step of the Euler transform. The algorithm is presented as a loop that iterates until a term becomes approximately zero, a phrasing that mirrors the iterative nature of the computation itself.

Algorithm as Narrative

The core of the document is a single C++ function, const_catalan, which is both the algorithm and the story. Variables are named p, t, y, and i, j—a minimal vocabulary that emphasizes the mathematical operations over descriptive labels. The comments, such as // j = 2*i+1, serve as a running commentary, translating the code into the series formula. This dual presentation—code and annotation—creates a layered reading experience where the reader can follow either the implementation or the mathematics.

The loop's condition, while (!t.is_approx_zero ()), introduces a pragmatic tolerance rather than an exact zero, reflecting the reality of floating-point computation. The code is not merely a recipe; it is a record of decisions about precision and termination.

Performance as Proof

The document treats computational performance as a form of evidence. The opening line reports the exact time and hardware, and later it compares this result to previous records: 200,000 digits by Thomas Papanikolaou, and 100,000 digits by Fee and Simon Plouffe on August 14, 1996, using an SGI r10000 Power Challenge in 5.63 hours. These benchmarks are presented without commentary, letting the numbers speak to the progress in both algorithms and hardware.

The inclusion of the Euler transform reference—Abramowitz and Stegun, formula 3.6.27—and Ramanujan's Notebooks, part I, formula 34.1, anchors the work in a lineage of mathematical literature. The reader is invited to see the computation as a validation of these classical formulas.

The Constant Itself

Catalan's constant is defined as the infinite sum sum((-1)**(n+1)/(2*n-1)**2, n=1..infinity), also known as beta(2). The document notes that the series used is the ordinary formula for Catalan, sum((-1)**(n+1)/(2*n+1)**2, n=0..infinity), accelerated by the Euler transform. This transformation is the key innovation: it converts a slowly converging series into one that reaches 300,000 digits in a day.

The constant itself is never printed; the output is merely described as "Calculating Catalan's constant to 300000 decimals." The focus remains on the method, not the digits. The reader seeking the actual value must look elsewhere, but the document provides the means to generate it.

This work is best approached as a technical artifact rather than a reading text. Readers interested in computational number theory will find the code and performance data valuable. The document assumes familiarity with series acceleration and the LiDIA library. For those new to the topic, the references to Maple's ?catalan and the cited papers offer entry points. The brevity of the text—under 3,500 words—belies the density of information it contains.

Related eBooks