You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much for implementing #1581; this feature request is a follow up to it.
The problem that I still have is best illustrated using an example:
../tests/regression_test_lusifer_psg_wz_scattering.cpp:65245: FAILED:
CHECK_THAT( d.at(j), Catch::WithinULP(densities.at(channel).at(j), 8) )
with expansion:
0.0 is within 8 ULPs of 0.0 ([0.00000000000000019, 0.00000000000000019])
which obviously is still not very meaningful, because my numbers are very small, and therefore I still don't see the relevant digits that differ.
Since it can happen in general, I think one should always print the numbers in scientific format instead (or check it the number is in the interval [0.1, 10), print it with the fixed format, else print it scientifically, but that's probably too complicated).
Note that if you decide to print floating point numbers in the scientific format, you should set the precision to max_digits - 1, where the -1 comes from the fact that the precision field changes its meaning to 'digits after the comma', see my question on stackoverflow, for example.
The text was updated successfully, but these errors were encountered:
To clarify: I suggest to show the numbers of the interval in scientific format.
As for the checked numbers themselves I am still a bit disappointed that they apparently can't be printed in the scientific format; would it be possible to globally change the behaviour of the printer (a desparate measure, but I'd be fine doing that in my own tests)?
Thank you very much for implementing #1581; this feature request is a follow up to it.
The problem that I still have is best illustrated using an example:
which obviously is still not very meaningful, because my numbers are very small, and therefore I still don't see the relevant digits that differ.
Since it can happen in general, I think one should always print the numbers in scientific format instead (or check it the number is in the interval [0.1, 10), print it with the fixed format, else print it scientifically, but that's probably too complicated).
Note that if you decide to print floating point numbers in the scientific format, you should set the precision to
max_digits - 1
, where the-1
comes from the fact that the precision field changes its meaning to 'digits after the comma', see my question on stackoverflow, for example.The text was updated successfully, but these errors were encountered: