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_eulerconst (uintC len);
23 extern cl_LF compute_eulerconst_expintegral (uintC len);
24 extern cl_LF compute_eulerconst_expintegral1 (uintC len);
25 extern cl_LF compute_eulerconst_expintegral2 (uintC len);
26 extern cl_LF compute_eulerconst_besselintegral1 (uintC len);
27 extern cl_LF compute_eulerconst_besselintegral2 (uintC len);
28 extern cl_LF compute_eulerconst_besselintegral3 (uintC len);
29 extern cl_LF compute_eulerconst_besselintegral4 (uintC len);
31 ln(cl_I_to_LF(1000,len+10)); // fill cache
34 for (int rep = repetitions; rep > 0; rep--)
35 { p = compute_eulerconst(len); }
40 for (int rep = repetitions; rep > 0; rep--)
41 { p = compute_eulerconst_expintegral(len); }
45 for (int rep = repetitions; rep > 0; rep--)
46 { p = compute_eulerconst_expintegral1(len); }
50 for (int rep = repetitions; rep > 0; rep--)
51 { p = compute_eulerconst_expintegral2(len); }
56 for (int rep = repetitions; rep > 0; rep--)
57 { p = compute_eulerconst_besselintegral1(len); }
62 for (int rep = repetitions; rep > 0; rep--)
63 { p = compute_eulerconst_besselintegral2(len); }
67 for (int rep = repetitions; rep > 0; rep--)
68 { p = compute_eulerconst_besselintegral3(len); }
73 for (int rep = repetitions; rep > 0; rep--)
74 { p = compute_eulerconst_besselintegral4(len); }