andishgar commented on issue #48376: URL: https://github.com/apache/arrow/issues/48376#issuecomment-3619340158
@kou, another issue (this is not related to the title of the issue): I think there is little point in using the GTest macros `ASSERT_DOUBLE_EQ` or `ASSERT_FLOAT_EQ`, as their implementation relies on a constant ULP distance of 4. For reference, see the links below: https://github.com/google/googletest/blob/1b96fa13f549387b7549cc89e1a785cf143a1a50/googletest/include/gtest/internal/gtest-internal.h#L341 https://github.com/google/googletest/blob/1b96fa13f549387b7549cc89e1a785cf143a1a50/googletest/include/gtest/internal/gtest-internal.h#L285 On the other hand, I found in this [blog](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/multi-accuracy/) (note that the blog discusses ULP error, which is almost equivalent to ULP distance, with some exceptions around powers of two) that the correct ULP value for determining whether two numbers are equal depends entirely on the algorithm. Given these reasons, shouldn’t we consider replacing `ASSERT_DOUBLE_EQ` and `ASSERT_FLOAT_EQ` in Arrow with more robust tools? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
