3 #include <cl_integer.h>
6 #include <cl_rational.h>
7 #include <cl_float_io.h>
11 #include <cl_timing.h>
13 int main (int argc, char * argv[])
16 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
17 repetitions = atoi(argv[2]);
22 uintL m1 = atoi(argv[1]);
23 cl_I m2 = cl_I(argv[2]);
24 cl_I M2 = (cl_I)1 << (intDsize*m2);
25 cl_I m3 = cl_I(argv[3]);
26 cl_I M3 = (cl_I)1 << (intDsize*m3);
27 cl_LF x = The(cl_LF)(random_F(cl_I_to_LF(1,m1)));
30 do { u = random_I(M2); } while (zerop(u));
31 do { v = random_I(M3); } while (zerop(v) || gcd(u,v) > 1);
35 for (int rep = repetitions; rep > 0; rep--)
36 { p = cl_LF_I_div(The(cl_LF)(cl_LF_I_mul(x,u)),v); }
40 for (int rep = repetitions; rep > 0; rep--)
41 { p = x * cl_RA_to_LF(y,TheLfloat(x)->len); }