Set output float precision & relative epsilon for DD comparison #252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An attempted fix for #246, which was first noticed in #240. With some trial and error I set a precision of
.10g
(10 significant figures in exponential/scientific notation) for floating point numbers.I also had to change the
gdxdiff
options to additionally use a tolerance in relative difference when comparing the output DD files to the ground truth, otherwise the higher precision output above increased the DD diff. We now use1e-6
for both absoluteEps
and relativeRelEps
difference tolerance. If I understand correctly howgdxdiff
works, this feels like a reasonable tolerance:Finally, we were reporting the number of lines in the output of
gdxdiff
, but that's only the number of sets/parameters that are different, and doesn't track improvements in number of rows different. I'm now passing the output ofgdxdiff
togdxdump
so that the "GDX Diff" column is more accurate and tracks number of rows in the diff.