Library / Literature & Fiction

Catalan's Constant [Ramanujan's Formula]
by Greg Fee
- Pages
- about 15
- Category
- Literature & Fiction
- Language
- English
- Reading time
- 17 min at 250 wpm
From the opening
Catalan constant to 300000 digits computed on September 29, 1996
by using a Sun Ultra-Sparc in 1 day 8 hour 15 min 15 sec 55 hsec.
The algorithm used is the standard series for Catalan, accelerated
by an Euler transform. The algorithm was implemented using the LiDIA
library for computational number theory and it is part of the
multiprecision floating-point arithmetic of the package.
inline void
constcatalan (bigfloat & y)
{
bigfloat p;
bigfloat t;
int i = 1, j = 3; // j = 2*i+1
// y = t = p = 1/2
divide (y, 1, 2);
t.assign (y);
p.assign (y);
// while t is greater than the desired accuracy
while (!t.isapproxzero ())
{
// do
// p = p * (i/j);
// t = (t * i + p) / j;
// y = y + t;
// i++; j+=2;
multiply (p, p, i);
divide (p, p, j);
multiply (t, t, i);
add (t, t, p);
divide (t, t, j);
add (y, y, t);
i++;
j += 2;
}
}
Time required: 1 day 8 hour 15 min 15 sec 55 hsec
Catalan constant is: sum((-1)**(n+1)/(2*n-1)**2,n=1..infinity) also known
under the name beta(2), see ?catalan in Maple for more details.
The previous record was 200000 digits, also from Thomas Papanikolaou
and before that: 100000 digits
was due to Greg Fee and Simon Plouffe on August 14, 1996,
by using a SGI r10000 Power Challenge with 194 Mhz in 5.63 hours
and the standard implementation of Catalan on MapleV, Release 4.
(which uses Greg's idea).
Euler Tranform: References, Abramowitz and Stegun, formula 3.6.27
page 16 in Handbook of Mathematical Functions and Tables, Dover 1964.
The series used is by putting x--> -1/2 . In other
words the formula used is: the ordinary formula for Catalan
Computation of Catalan's constant using Ramanujan's Formula, by
Greg Fee, ACM 1990, Proceedings of the ISAAC conference, 1990, p. 157.
A short sample. Read the whole book
More to read
- "Captains Courageous": A Story of the Grand BanksRudyard KiplingLiterature & Fiction191 pages
- "Captains Courageous": A Story of the Grand BanksRudyard KiplingLiterature & Fiction191 pages
- "I Say No"Wilkie CollinsLiterature & Fiction428 pages
- "Miss Lou"Edward Payson RoeLiterature & Fiction409 pages
- "Speaking of Operations--"Irvin S. CobbLiterature & Fiction37 pages
Public-domain text from Project Gutenberg, Standard Ebooks or a similar open source. Copyright differs between countries. Rights holder? See our takedown process.