From a8aa10bd21daf06502e8e1eb6c594e643b41bb27 Mon Sep 17 00:00:00 2001 From: Peter Cao Date: Mon, 19 Oct 2009 09:50:02 -0500 Subject: [svn-r17680] Use absolute comparison for use-system-epsilon and default option. --- tools/lib/h5diff_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 77ee74a..848ba90 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -5595,7 +5595,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio return TRUE; if (options->use_system_epsilon) { - if ( ABS( (value-expected) / expected) < DBL_EPSILON) + if ( ABS( (value-expected) ) < DBL_EPSILON) return TRUE; } @@ -5652,7 +5652,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options) return TRUE; if (options->use_system_epsilon) { - if ( ABS( (value-expected) / expected) < FLT_EPSILON) + if ( ABS( (value-expected) ) < FLT_EPSILON) return TRUE; } -- cgit v0.12