]> www.ginac.de Git - cln.git/blob - tests/timeexp1.cc
Remove support for Watcom C++ compiler.
[cln.git] / tests / timeexp1.cc
1 #include <cln/number.h>
2 #include <cln/io.h>
3 #include <cln/float.h>
4 #include <cln/real.h>
5 #include <cln/random.h>
6 #include <cstdlib>
7 #include <cstring>
8 #include <cln/timing.h>
9 namespace cln
10 {
11 // FIXME: don't use internal functions!
12 extern cl_LF compute_exp1 (uintC len);
13 }
14
15 using namespace cln;
16
17 int main (int argc, char * argv[])
18 {
19         int repetitions = 1;
20         if ((argc >= 3) && !strcmp(argv[1],"-r")) {
21                 repetitions = atoi(argv[2]);
22                 argc -= 2; argv += 2;
23         }
24         if (argc < 2)
25                 exit(1);
26         uintL len = atoi(argv[1]);
27         cl_LF p;
28         { CL_TIMING;
29           for (int rep = repetitions; rep > 0; rep--)
30             { p = compute_exp1(len); }
31         }
32 //      cout << p << endl;
33 }