FREE BOOKS

Author's List




PREV.   NEXT  
|<   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25  
26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   >>   >|  
Project Gutenberg's Catalan's Constant [Ramanujan's Formula], by Greg Fee This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.net Title: Catalan's Constant [Ramanujan's Formula] Author: Greg Fee Posting Date: August 13, 2008 [EBook #682] Release Date: October, 1996 Language: English Character set encoding: ASCII *** START OF THIS PROJECT GUTENBERG EBOOK CATALAN'S CONSTANT *** Produced by Greg Fee Catalan's Constant [Ramanujan's Formula] 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. LiDIA is available from ftp://crypt1.cs.uni-sb.de/pub/systems/LiDIA/LiDIA-1.2.1.tgz http://www-jb.cs.uni-sb.de/LiDIA/linkhtml/lidia/lidia.html The implementation of the algorithm is: inline void const_catalan (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.is_approx_zero ()) { // 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; } } Here is the output of the program: Calculating Catalan's constant to 300000 decimals Time required: 1 day 8 hour 15 min 15 sec 55 hsec -------------------------------------------------------------------------- Additional REFERENCES: 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,
PREV.   NEXT  
|<   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25  
26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   >>   >|  



Top keywords:
Catalan
 

algorithm

 

constant

 

digits

 

bigfloat

 

Ramanujan

 
Constant
 
divide
 
Formula
 

300000


assign

 

catalan

 

multiply

 
August
 

Gutenberg

 

Project

 

greater

 

approx

 

accuracy

 

desired


linkhtml

 

implementation

 

inline

 

restrictions

 
whatsoever
 

200000

 

Thomas

 

record

 
previous
 

details


Papanikolaou

 

Plouffe

 
100000
 

decimals

 
Calculating
 

program

 

systems

 

output

 
required
 

Additional


infinity
 
REFERENCES
 

computed

 

September

 

Release

 

Author

 
Posting
 

Produced

 

CONSTANT

 

encoding