1 #include "stresstest.h"
3 #include "progressbar.h"
8 int main(int argc, char ** argv)
10 Debug("Repeated Adds and Subtracts - Should give zero");
12 for (int i = 1; i < 100; ++i)
14 for (int j = 1; j < 100; ++j)
16 Real result = AddSub(0, i, Real(1)/Real(j));
17 if (result != Real(0))
18 Warn("Result of %lf != %lf (zero)", Double(result), 0.0);
20 printf("%d\t%lf\t%lf", i, Real(1)/Real(j), Double(result));
24 Debug("Repeated Multiplications and Divisions - Should give one");
25 for (int i = 1; i < 100; ++i)
27 for (int j = 1; j < 100; ++j)
29 Real result = MulDiv(1, i, Real(1)/Real(j));
30 if (result != Real(1))
31 Warn("Result of %lf != %lf (one)", Double(result), 1.0);
33 printf("%d\t%lf\t%lf", i, Real(1)/Real(j), Double(result));