1 #include <cln/number.h>
5 #include <cln/random.h>
8 #include <cln/timing.h>
9 #include "float/lfloat/cl_LF.h"
14 int main (int argc, char * argv[])
17 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
18 repetitions = atoi(argv[2]);
23 uintL len = atoi(argv[1]);
24 extern cl_LF compute_catalanconst_ramanujan (uintC len);
25 extern cl_LF compute_catalanconst_ramanujan_fast (uintC len);
26 extern cl_LF compute_catalanconst_expintegral1 (uintC len);
27 extern cl_LF compute_catalanconst_expintegral2 (uintC len);
28 extern cl_LF compute_catalanconst_cvz1 (uintC len);
29 extern cl_LF compute_catalanconst_cvz2 (uintC len);
31 ln(cl_I_to_LF(1000,len+10)); // fill cache
33 for (int rep = repetitions; rep > 0; rep--)
34 { p = compute_catalanconst_ramanujan(len); }
38 for (int rep = repetitions; rep > 0; rep--)
39 { p = compute_catalanconst_ramanujan_fast(len); }
44 for (int rep = repetitions; rep > 0; rep--)
45 { p = compute_catalanconst_expintegral1(len); }
49 for (int rep = repetitions; rep > 0; rep--)
50 { p = compute_catalanconst_expintegral2(len); }
55 for (int rep = repetitions; rep > 0; rep--)
56 { p = compute_catalanconst_cvz1(len); }
60 for (int rep = repetitions; rep > 0; rep--)
61 { p = compute_catalanconst_cvz2(len); }