h5diff relative option (-p) produces unexpected behaviour for numbers of small absolute magnitude
- Dominant language
- C
- Stars
- 988
- Forks
- 355
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 12
Description
**Describe the bug**
When comparing two files and datasets within the two, using h5diff with the -p option (relative difference comparisons), I have encountered incorrect behaviour, in that significant differences, e.g., relative differences of order unity are not detected / flagged when the option is added (for example -p 1e-6) in datasets that have small absolute numbers, e.g., of order 1e-20. Leaving out the option finds the difference, but the help and documentation does not give any information on what the default comparison criterion is when no options are chosen in h5diff. Thus, 2 issues reported here: 1. incorrect behaviour when a relative difference is specified and the data are in fact different on that relative level, but the data is of low absolute magnitude; 2. the help/docs do not specify the default comparison method (i.e., when no options are specified) of h5diff.
**Expected behavior**
Should display difference at the requested relative accuracy level.
**Platform (please complete the following information)**
- HDF5 version: any
- OS and version: any
- Compiler and version: any
Contributor guide
Assessment
This issue has not been assessed yet.