1 #include <cln/number.h>
5 #include <cln/random.h>
8 #include <cln/timing.h>
11 int main (int argc, char * argv[])
14 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
15 repetitions = atoi(argv[2]);
20 uintL len = atoi(argv[1]);
21 extern cl_LF compute_eulerconst (uintC len);
22 extern cl_LF compute_eulerconst_expintegral (uintC len);
23 extern cl_LF compute_eulerconst_expintegral1 (uintC len);
24 extern cl_LF compute_eulerconst_expintegral2 (uintC len);
25 extern cl_LF compute_eulerconst_besselintegral1 (uintC len);
26 extern cl_LF compute_eulerconst_besselintegral2 (uintC len);
27 extern cl_LF compute_eulerconst_besselintegral3 (uintC len);
28 extern cl_LF compute_eulerconst_besselintegral4 (uintC len);
30 ln(cl_I_to_LF(1000,len+10)); // fill cache
33 for (int rep = repetitions; rep > 0; rep--)
34 { p = compute_eulerconst(len); }
39 for (int rep = repetitions; rep > 0; rep--)
40 { p = compute_eulerconst_expintegral(len); }
44 for (int rep = repetitions; rep > 0; rep--)
45 { p = compute_eulerconst_expintegral1(len); }
49 for (int rep = repetitions; rep > 0; rep--)
50 { p = compute_eulerconst_expintegral2(len); }
55 for (int rep = repetitions; rep > 0; rep--)
56 { p = compute_eulerconst_besselintegral1(len); }
61 for (int rep = repetitions; rep > 0; rep--)
62 { p = compute_eulerconst_besselintegral2(len); }
66 for (int rep = repetitions; rep > 0; rep--)
67 { p = compute_eulerconst_besselintegral3(len); }
72 for (int rep = repetitions; rep > 0; rep--)
73 { p = compute_eulerconst_besselintegral4(len); }