diff --git a/TestFramework/Testing.h b/TestFramework/Testing.h index 42f341cf..9202d7ce 100644 --- a/TestFramework/Testing.h +++ b/TestFramework/Testing.h @@ -564,7 +564,8 @@ static void testStart() /* some good macros to compare floating point numbers */ #import #import -#define EQ(x, y) (fabs((x) - (y)) <= fabs((x) + (y)) * (FLT_EPSILON * 100)) +#define EQ(x, y) \ + (((x) >= ((y) - FLT_EPSILON*100)) && ((x) <= ((y) + FLT_EPSILON*100))) #define LE(x, y) ((x)<(y) || EQ(x, y)) #define GE(x, y) ((y)<(x) || EQ(x, y)) #define LT(x, y) (!GE(x, y))