diff options
author | Peter Cao <xcao@hdfgroup.org> | 2009-10-19 14:50:02 (GMT) |
---|---|---|
committer | Peter Cao <xcao@hdfgroup.org> | 2009-10-19 14:50:02 (GMT) |
commit | a8aa10bd21daf06502e8e1eb6c594e643b41bb27 (patch) | |
tree | 7fdaeebffc553ee69727e2896e5f3ffa0330d78a /tools | |
parent | b7e61c869be9ccfa0e65c7abec702ee422a84c7a (diff) | |
download | hdf5-a8aa10bd21daf06502e8e1eb6c594e643b41bb27.zip hdf5-a8aa10bd21daf06502e8e1eb6c594e643b41bb27.tar.gz hdf5-a8aa10bd21daf06502e8e1eb6c594e643b41bb27.tar.bz2 |
[svn-r17680] Use absolute comparison for use-system-epsilon and default option.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff_array.c | 4 |
1 files 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; } |