1 #include <cln/number.h>
5 #include <cln/random.h>
8 #include <cln/timing.h>
12 int main (int argc, char * argv[])
15 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
16 repetitions = atoi(argv[2]);
21 uintL len = atoi(argv[1]);
22 extern cl_LF compute_catalanconst_ramanujan (uintC len);
23 extern cl_LF compute_catalanconst_ramanujan_fast (uintC len);
24 extern cl_LF compute_catalanconst_expintegral1 (uintC len);
25 extern cl_LF compute_catalanconst_expintegral2 (uintC len);
26 extern cl_LF compute_catalanconst_cvz1 (uintC len);
27 extern cl_LF compute_catalanconst_cvz2 (uintC len);
29 ln(cl_I_to_LF(1000,len+10)); // fill cache
31 for (int rep = repetitions; rep > 0; rep--)
32 { p = compute_catalanconst_ramanujan(len); }
36 for (int rep = repetitions; rep > 0; rep--)
37 { p = compute_catalanconst_ramanujan_fast(len); }
42 for (int rep = repetitions; rep > 0; rep--)
43 { p = compute_catalanconst_expintegral1(len); }
47 for (int rep = repetitions; rep > 0; rep--)
48 { p = compute_catalanconst_expintegral2(len); }
53 for (int rep = repetitions; rep > 0; rep--)
54 { p = compute_catalanconst_cvz1(len); }
58 for (int rep = repetitions; rep > 0; rep--)
59 { p = compute_catalanconst_cvz2(len); }