David's final changes: more profiler features, fixes.
[ipdf/code.git] / src / tests / muldiv.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         
12         Debug("Repeated Multiplications and Divisions - Should give one");
13         clock_t first_clock = clock();
14         clock_t elapsed = 0;
15         for (int i = 1; i < 100; ++i)
16         {
17                 for (int j = 1; j < 100; ++j)
18                 {
19                         clock_t start = clock();
20                         Real result = MulDiv<Real>(1, i, Real(1)/Real(j));
21                         clock_t end = clock();
22                         printf("%d\t%d\t%.30lf\t%li\t%li\n", i, j, Double(result), end-start, elapsed);
23                 }
24         }
25         Debug("MulDiv Total time: %li", clock() - first_clock);
26
27 }
28

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