3 #include <cl_integer.h>
4 #include <cl_modinteger.h>
5 #include <cl_univpoly.h>
10 int main (int argc, char * argv[])
13 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
14 repetitions = atoi(argv[2]);
20 int n = atoi(argv[1]);
24 cl_modint_ring R1 = cl_find_modint_ring(m);
25 cl_univpoly_ring PR1 = cl_find_univpoly_ring(R1);
26 cl_UP p1 = PR1->create(n-1);
27 for (i = 0; i < n; i++)
28 p1.set_coeff(i, R1->canonhom((int)(1.618033989*i*i)));
31 cl_stdout << p1 << endl;
33 cl_UP sp1 = PR1->zero();
35 for (int rep = repetitions; rep > 0; rep--)
39 cl_stdout << sp1 << endl;
43 // n modint modint2 neu
44 // 2 0.000123 0.000082 0.000086
45 // 5 0.00051 0.00031 0.00032
46 // 10 0.00169 0.00095 0.00100
47 // 25 0.0089 0.0049 0.0053
48 // 50 0.031 0.018 0.020
49 // 100 0.118 0.070 0.079