fixed bug in DEBUG_APPROX_DOUBLE

This commit is contained in:
Bill March
2008-06-02 22:12:12 +00:00
parent 4a6642d7e0
commit dd64a0db56
+1 -1
View File
@@ -308,7 +308,7 @@ const T *poison_ptr(T *&x) {
* @param y right-hand side of the equality test
*/
#define DEBUG_APPROX_DOUBLE(x, y, eps) \
DEBUG_ASSERT_MSG(fabs(STATIC_CAST(double, (x) - (y))) > eps, \
DEBUG_ASSERT_MSG(fabs(STATIC_CAST(double, (x) - (y))) < eps, \
"DEBUG_APPROX_DOUBLE failed: %s = %g not within %g of %s = %g\n", \
#x, STATIC_CAST(double, x), STATIC_CAST(double, eps), \
#y, STATIC_CAST(double, y))