Skip to content
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

ans_check<T>() should switch to absolute tolerance based floating point comparison for values close to 0 #53

Closed
rigarash opened this issue May 18, 2021 · 0 comments
Assignees
Labels
Doing enhancement New feature or request
Milestone

Comments

@rigarash
Copy link
Contributor

rigarash commented May 18, 2021

Currently, we use ans_check() helper function[1] for comparing floating point values using relative tolerance.
However, using relative tolerance does not work with results close to 0.
Therefore, we need to switch from absolute tolerance to relative tolerance seamlessly[2].

[1] https://github.com/ricosjp/monolish/blob/master/test/test_utils.hpp#L20
[2] https://www.boost.org/doc/libs/1_76_0/libs/test/doc/html/boost_test/testing_tools/extended_comparison/floating_point/floating_points_comparison_impl.html

@rigarash rigarash added enhancement New feature or request Doing labels May 18, 2021
@rigarash rigarash self-assigned this May 18, 2021
@rigarash rigarash changed the title Torrence-based floating point comparison Tolerance-based floating point comparison for values close to 0 May 18, 2021
@rigarash rigarash changed the title Tolerance-based floating point comparison for values close to 0 ans_check<T>() should switch to absolute tolerance based floating point comparison for values close to 0 May 18, 2021
@t-hishinuma t-hishinuma added this to the 0.14.1 milestone May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doing enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants