1 #include <cln/number.h>
3 #include <cln/integer.h>
4 #include <cln/lfloat.h>
5 #include "float/lfloat/cl_LF.h"
6 #include <cln/rational.h>
7 #include <cln/float_io.h>
8 #include <cln/random.h>
11 #include <cln/timing.h>
16 int main (int argc, char * argv[])
19 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
20 repetitions = atoi(argv[2]);
25 uintL m1 = atoi(argv[1]);
26 cl_I m2 = cl_I(argv[2]);
27 cl_I M2 = (cl_I)1 << (intDsize*m2);
28 cl_I m3 = cl_I(argv[3]);
29 cl_I M3 = (cl_I)1 << (intDsize*m3);
30 cl_LF x = The(cl_LF)(random_F(cl_I_to_LF(1,m1)));
33 do { u = random_I(M2); } while (zerop(u));
34 do { v = random_I(M3); } while (zerop(v) || gcd(u,v) > 1);
38 for (int rep = repetitions; rep > 0; rep--)
39 { p = cl_LF_I_div(The(cl_LF)(cl_LF_I_mul(x,u)),v); }
43 for (int rep = repetitions; rep > 0; rep--)
44 { p = x * cl_RA_to_LF(y,TheLfloat(x)->len); }