Rhys,
"--use-system-epsilon" and "--delta=something" use different code.
"--use-system-epsilon" considers two NaNs of the same type are equal,
which is correct.
"--delta=something" considers two NaN of the same type are different,
which is wrong. We will need to fix it.
This behavior was documented at
http://www.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Diff
"
h5diff and NaNs:
h5diff detects when a value in a dataset is a NaN (a "not a number"
value), but does not differentiate among various types of NaNs. Thus,
when one NaN is compared with another NaN, h5diff treats them as equal;
when a NaN is compared with a valid number, h5diff treats them as not
equal.
"
On 7/14/2011 3:24 PM, Rhys Ulerich wrote:
Hi Peter,
Atop h5diff 1.8.5-patch1 I've noticed that comparing NaN against NaN
passes when using --use-system-epsilon. It fail when using
--delta=something.
It may be the case that your system epsilon is different from DBL_EPSILON....
-d D, --delta=D
Print difference if (|a-b|> D). D must be a positive number.
Can not use with '-p' or '--use-system-epsilon'.
...
--use-system-epsilon
Print difference if (|a-b|> EPSILON), EPSILON is system defined value.
My question wasn't about the magnitude of EPSILON used. Changing the
magnitude of the EPSILON used in the comparison (|a-b|> EPSILON)
cannot explain the differences in NaN handling I described above.
Something else must be different between --use-system-epsilon and
--delta=something (for appropriately chosen "something"). Maybe --nan
is implied? Maybe the comparison is "inverted" for
--use-system-epsilon so that a NaN causes the check to succeed while
the "regular" check for --delta=something fails for a NaN value?
Thanks for the response,
Rhys
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org