Fix debugscript, some quadtree stuff and don't intersect vertical/horz lines when...
[ipdf/code.git] / src / tests / addsub.cpp
1 #include "stresstest.h"
2 #include "real.h"
3 #include "progressbar.h"
4
5 using namespace std;
6 using namespace IPDF;
7
8 int main(int argc, char ** argv)
9 {
10         DebugRealInfo();
11         Debug("Repeated Adds and Subtracts - Should give zero");
12         
13         clock_t first_clock = clock();
14         clock_t elapsed = 0;
15         for (int i = 1; i < 2; ++i)
16         {
17                 for (int j = 1; j < 100; ++j)
18                 {
19                         clock_t start = clock();
20                         Real result = AddSub<Real>(0, i, Real(1)/Real(j));
21                         clock_t end = clock();
22                         elapsed += end - start;         
23                         printf("%d\t%d\t%.30lf\t%li\t%li\n", i, j, Double(result), end-start, elapsed);
24                         
25                 }
26         }
27         Debug("AddSub Total Time: %li", clock() - first_clock);
28
29 }
30

UCC git Repository :: git.ucc.asn.au