1 #include <cln/number.h>
5 #include <cln/random.h>
8 #include <cln/timing.h>
9 #include "float/lfloat/cl_LF.h"
12 // FIXME: don't use internal functions.
13 extern cl_LF compute_eulerconst (uintC len);
14 extern cl_LF compute_eulerconst_expintegral (uintC len);
15 extern cl_LF compute_eulerconst_expintegral1 (uintC len);
16 extern cl_LF compute_eulerconst_expintegral2 (uintC len);
17 extern cl_LF compute_eulerconst_besselintegral1 (uintC len);
18 extern cl_LF compute_eulerconst_besselintegral2 (uintC len);
19 extern cl_LF compute_eulerconst_besselintegral3 (uintC len);
20 extern cl_LF compute_eulerconst_besselintegral4 (uintC len);
25 int main (int argc, char * argv[])
28 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
29 repetitions = atoi(argv[2]);
34 uintL len = atoi(argv[1]);
38 ln(cl_I_to_LF(1000,len+10)); // fill cache
41 for (int rep = repetitions; rep > 0; rep--)
42 { p = compute_eulerconst(len); }
47 for (int rep = repetitions; rep > 0; rep--)
48 { p = compute_eulerconst_expintegral(len); }
52 for (int rep = repetitions; rep > 0; rep--)
53 { p = compute_eulerconst_expintegral1(len); }
57 for (int rep = repetitions; rep > 0; rep--)
58 { p = compute_eulerconst_expintegral2(len); }
63 for (int rep = repetitions; rep > 0; rep--)
64 { p = compute_eulerconst_besselintegral1(len); }
69 for (int rep = repetitions; rep > 0; rep--)
70 { p = compute_eulerconst_besselintegral2(len); }
74 for (int rep = repetitions; rep > 0; rep--)
75 { p = compute_eulerconst_besselintegral3(len); }
80 for (int rep = repetitions; rep > 0; rep--)
81 { p = compute_eulerconst_besselintegral4(len); }