-
Notifications
You must be signed in to change notification settings - Fork 915
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
[BUG] expect_columns_equivalent handles infinity incorrectly. #5731
Comments
This issue has been labeled |
Yeah, I just tested the examples above. All passed with my fix. This can be closed when #7410 is merged. |
This PR fixes #5225 and fixes #5731 along with several improvements. In particular: * Fixes the function `stod` in `convert_floats.cu`, which incorrectly uses `max_mantissa`, thus produces incorrect results as mentioned in the issue #5225. Note that this PR still cannot produce perfectly matched results with `std::atof`, since handling float values near `inf` is very difficult. * Fixes the class `corresponding_rows_not_equivalent` which didn't handle `inf` and `nan`, thus it returned "equivalent" when comparing a valid float number with `inf`. * Adds a test case for those fixes. * Rewrite test cases for string=>float coversion to use `std::atof` results for comparison. Authors: - Nghia Truong (@ttnghia) Approvers: - Keith Kraus (@kkraus14) - Robert (Bobby) Evans (@revans2) - David (@davidwendt) - Vukasin Milovanovic (@vuule) URL: #7410
Describe the bug
When comparing any floating point value with (+/-) infinity,
expect_columns_equivalent
indicates the values are equivalent.Steps/Code to reproduce bug
Expected behavior
Any of these should fail:
All of these should pass:
Additional Context
expect_columns_equal
behaves as expected.The text was updated successfully, but these errors were encountered: