-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Test fails when it should pass for certain real numbers #37
Comments
My mistake, the Approx strictness was higher than I expected. |
You can set the tolerance level (epsilon) for each Approx call by using the syntax: I'll soon be adding the ability to specify epsilons for a range of Approx's (or all of them). Make sure you have the latest Catch (as of last friday/ IIRC) because I did change Approx to be slightly less strict (now 100x epsilon for float) |
In fact I've just pushed up another commit for this. Approx is a class, and usually when you use it you construct a single, temporary, instance on the fly. |
Sorry, I should have acknowledged your commit. It works very well, thanks. |
Thanks for letting me know, @samaursa (eventually ;-) ) |
REQUIRE(atan2(-862.42, 78.5149) == -1.480006);
The above code fails, with the output:
atan2(-862.42, 78.5149) == -1.48001 failed for: -1.48001 == -1.48001
I am not sure why, considering they are equal. I initially tried it with Approx, but the result was the same.
The text was updated successfully, but these errors were encountered: