Now with GNU MultiPrecision (GMP) integers
[ipdf/code.git] / src / tests / realops.cpp
index 4ac54ff..b9ce441 100644 (file)
@@ -10,7 +10,7 @@ static double g_totalerror = 0;
 
 bool NotEqual(double a, double b, double threshold=1e-1)
 {
-       double error = (fabs(a-b) > threshold);
+       double error = fabs(a-b);
        g_totalerror += error;
        return (error > threshold);
 }
@@ -22,7 +22,7 @@ int main(int argc, char ** argv)
        unsigned failures = 0;
        for (unsigned i = 0; i < TEST_CASES; ++i)
        {
-               Debug("Test %u of %u", i, TEST_CASES);
+               //Debug("Test %u of %u", i, TEST_CASES);
                double da = (double)(rand() + 1) / (double)(rand() + 1);
                double db = (double)(rand() + 1) / (double)(rand() + 1);
                

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