-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOOST_CHECK_CLOSE(0, smallnumber) fails #162
Comments
Hi, There were many bug fixes since 1.60 (see here for more details). Would you please try again with the latest version of Boost? |
Sorry for the late investigation. It turns out that you cannot use You have 2 options:
Hope that helps! |
Thank you @raffienficiaud Mathematically speaking, it is legit to wonder if 0.0000001 is "close" to 0 (within a range). |
If you look at the equations for comparison here, then only equation (1) can work when one of the arguments On the other hand, this is done automatically with
so you should not be needing to write your own logic. |
Hello
With boost 1.60
BOOST_CHECK_CLOSE(-0, -4.37113883e-08, 1)
fails with :
difference{3.40282e+38} between -0 and -4.37113883e-08 exceeds 1%
Note the difference is super big.
Should nt it pass ?
Tks
The text was updated successfully, but these errors were encountered: