X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Frealops.cpp;h=61d747cb13e29e672c6d366203e325b2964d3c7f;hp=83a52415239a0f82ac83d117b98cea614cf18680;hb=ac518ad085eb5bc84647e4aebe0c5ff06640cd0d;hpb=11d77365672a080a511cb83f3acaa3d879c96356 diff --git a/src/tests/realops.cpp b/src/tests/realops.cpp index 83a5241..61d747c 100644 --- a/src/tests/realops.cpp +++ b/src/tests/realops.cpp @@ -1,3 +1,7 @@ +/** + * Test mathematical operations on the Real type and consistency with double + */ + #include "main.h" #include "real.h" @@ -10,7 +14,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); }