]> www.ginac.de Git - cln.git/blob - tests/timefact.cc
* All Files have been modified for inclusion of namespace cln;
[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 <stdlib.h>
7 #include <string.h>
8 #include <cln/timing.h>
9
10 int main (int argc, char * argv[])
11 {
12         int repetitions = 1;
13         if ((argc >= 3) && !strcmp(argv[1],"-r")) {
14                 repetitions = atoi(argv[2]);
15                 argc -= 2; argv += 2;
16         }
17         if (argc < 2)
18                 exit(1);
19         cl_I m = cl_I(argv[1]);
20         { CL_TIMING;
21           for (int rep = repetitions; rep > 0; rep--)
22             cl_I f = factorial(FN_to_L(m));
23         }
24 }