1 #include <cln/number.h>
3 #include <cln/integer.h>
4 #include <cln/modinteger.h>
5 #include <cln/univpoly.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]);
21 int n = atoi(argv[1]);
25 cl_modint_ring R1 = find_modint_ring(m);
26 cl_univpoly_ring PR1 = find_univpoly_ring(R1);
27 cl_UP p1 = PR1->create(n-1);
28 for (i = 0; i < n; i++)
29 p1.set_coeff(i, R1->canonhom((int)(1.618033989*i*i)));
34 cl_UP sp1 = PR1->zero();
36 for (int rep = repetitions; rep > 0; rep--)
44 // n modint modint2 neu
45 // 2 0.000123 0.000082 0.000086
46 // 5 0.00051 0.00031 0.00032
47 // 10 0.00169 0.00095 0.00100
48 // 25 0.0089 0.0049 0.0053
49 // 50 0.031 0.018 0.020
50 // 100 0.118 0.070 0.079