This page gives solutions of the MPFR team to the competition problems of the Many Digits Friendly Competition. A companion page exists for the practice problems. See also Richard Kreckel comments on the competition.

The source files need the many.h header file, C24 need gauss.h too, and C22 needs the intlib library from Laurent Fousse (not yet available).

The given timings were obtained on harif.cs.ru.nl, a mono-processor AMD Opteron 144 machine running Debian GNU/Linux "sid" unstable i386 (32 bit mode), which has 4GB of RAM. We used gmp-4.1.4, mpfr-20050920 (cvs version from 20 Sep 2005), and mpfi-1.3.3 (adapted to mpfr-cvs). The methods used in the different programs are explained here. We recall here the rule to find the optimal'' parameter N: "find the N closest to the default value so that the cpu time fits between 2 seconds and 2 minutes".

Problem Parameter (initial value) Output Results
C01 sin (tan (cos (1)) N (=4) The first 10N decimal digits after the decimal point 17.8s for N=5, using c01.c
C02 sqrt (e/pi) N (=5) The first 10N decimal digits after the decimal point 32.0s for N=6, using c02.c
C03 sin((e+1)^3) N (=4) The first 10N decimal digits after the decimal point 9.1s for N=5 using c03.c
C04 exp (pi * sqrt(2011)) N (=4) The first 10N decimal digits after the decimal point 11.6s for N=5 using c04.c
C05 exp (exp (exp (1/2))) N (=4) The first 10N decimal digits after the decimal point 5.1s for N=5 using c05a.c
C06 arctanh(1-arctanh(1-arctanh(1-arctanh(1/pi)))) N (=4) The first 10N decimal digits after the decimal point 8.2s for N=5 using c06.c
C07 pi^1000 N (=4) The first 10N decimal digits after the decimal point 24.8s for N=6 using c07a.c
C08 sin(6(6^6)) N (=4) The first 10N decimal digits after the decimal point 8.7s for N=5 using c08a.c
C09 sin(10*arctan(tanh(pi*(2011^(1/2))/3))) N (=4) The first 10N decimal digits after the decimal point 33.1s for N=5 using c09.c
C10 (7+2^(1/5)-5*(8^(1/5)))^(1/3) + 4^(1/5)-2^(1/5) N (=4) The first 10N decimal digits after the decimal point 4.1s for N=5 using c10.c
C11 tan(2^(1/2))+arctanh(sin(1)) N (=4) The first 10N decimal digits after the decimal point 24.2s for N=5 using c11.c
C12 arcsin(1/e^2) + arcsinh(e^2) N (=4) The first 10N decimal digits after the decimal point 8.5s for N=5 using c12.c
C13 The logistic map: x0=.5, xn+1=3.999*xn*(1-xn) N (=4) The first 10N digits after the decimal point of x10N 9.1s for N=4 using c13.c
C14 a0=14/3, a1=5, a2=184/35, a(n+2)= 114 - (1463 - (6390 - (9000/an-1))/an)/an+1 N (=2) The first 10N digits after the decimal point of a(10N+2). 40.4s for N=2 using c14tmp.c
C15 h(n) = 1/n + 1/(n+1) +...+ 1/n^2 N (=4) The first 10N digits after the decimal point of h(10N+1). 7.2s for N=4 using c15a.c
C16 f(i)= (Pi^2)/6 - (13/8+(1/(8*27))(34/8+(8/(8*125))(...((21*i-8)/8+((i^3)/(8*(2i+1)^3)))))) N (=4) The first 10N digits after the decimal point of f(10N) 0.9s for N=4, 129.0s for N=5 using c16.c
C17 S= -4*Zeta(2) - 2*Zeta(3) + 4*Zeta(2)*Zeta(3) + 2*Zeta(5) N (=4) The first 10N decimal digits after the decimal point of S 115.5s for N=5 using c17best.c
C18 Catalan G = Sum{n=0}{\infty}(-1)^i/(2i+1)^2 N (=4) The first 10N decimal digits after the decimal point of G 8.1s for N=5 using c18.c
C19 an=n^3+1, L= Sum{n=1}{\infty} (1/7)^(an) N (=4) The first 10N digits after the decimal point of L 3.4s for N=6 using c19.c
C20 X = sin(2*pi/17) N (=4) The 10Nth element of the regular continued fraction of X 4.3s for N=5 using c20b.c
C21 Equation exp(cos(x)) = x N (=4) The first 10N digits after the decimal point of x 14.8s for N=5 using c21.c
C22 J = integral(sin(sin(sin(x)))), x=0..1 N (=3) The first 10N digits after the decimal point of J 26.1s for N=3 using c22.c with n=218, m=26
C23 M1=Inverse of the 10N*10N Hankel matrix X

where

Xij=1/fib(i+j-1)    (i,j>0)

fib(k)=((1+sqrt(5))^k-(1-sqrt(5))^k)/(2^k*sqrt(5))
N (=2) The first 10 decimal digits of the element (10N -1,10N -3) of the matrix 18.5s for N=7 using c23-c.c
C24 M2=Inverse of I10N+X (sum of the identity and the 10Nx10N Hankel matrix X) where X is defined as in C23 N (=2) The first 10 decimal digits of the element (10N -1,10N) of the matrix 0.2s for N=2, 172.8s for N=3 using c24.c
Note: after the competition, new versions of the programs were made, and are available as a tar archive.