From dd64a0db5624a55cdec620356ecdb3fcdc465b54 Mon Sep 17 00:00:00 2001 From: Bill March Date: Mon, 2 Jun 2008 22:12:12 +0000 Subject: [PATCH] fixed bug in DEBUG_APPROX_DOUBLE --- fastlib2/fastlib/base/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlib2/fastlib/base/debug.h b/fastlib2/fastlib/base/debug.h index 1cf5b89b02..653ff9c112 100644 --- a/fastlib2/fastlib/base/debug.h +++ b/fastlib2/fastlib/base/debug.h @@ -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))