]> www.ginac.de Git - cln.git/blob - tests/timefact.cc
Enable modifying operators by default.
[cln.git] / tests / timefact.cc
1 #include <cln/number.h>
2 #include <cln/io.h>
3 #include <cln/integer.h>
4 #include <cln/random.h>
5 #include "cl_I.h"
6 #include <cstdlib>
7 #include <cstring>
8 #include <cln/timing.h>
9 using namespace cln;
10
11 int main (int argc, char * argv[])
12 {
13         int repetitions = 1;
14         if ((argc >= 3) && !strcmp(argv[1],"-r")) {
15                 repetitions = atoi(argv[2]);
16                 argc -= 2; argv += 2;
17         }
18         if (argc < 2)
19                 exit(1);
20         cl_I m = cl_I(argv[1]);
21         { CL_TIMING;
22           for (int rep = repetitions; rep > 0; rep--)
23             cl_I f = factorial(FN_to_V(m));
24         }
25 }