From 0783571f4b43d0558bad6b6b5d0e2e8aff4a3b23 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 9 Dec 2024 09:25:58 +0100 Subject: [PATCH] Apply suggestion --- cpp/src/arrow/testing/gtest_util_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/testing/gtest_util_test.cc b/cpp/src/arrow/testing/gtest_util_test.cc index 5693de0de87b0..daf071c2b36f1 100644 --- a/cpp/src/arrow/testing/gtest_util_test.cc +++ b/cpp/src/arrow/testing/gtest_util_test.cc @@ -208,12 +208,14 @@ template void CheckNotWithinUlp(Float x, Float y, int n_ulp) { CheckNotWithinUlpSingle(x, y, n_ulp); CheckNotWithinUlpSingle(y, x, n_ulp); + CheckNotWithinUlpSingle(-x, -y, n_ulp); + CheckNotWithinUlpSingle(-y, -x, n_ulp); if (n_ulp > 1) { CheckNotWithinUlpSingle(x, y, n_ulp - 1); CheckNotWithinUlpSingle(y, x, n_ulp - 1); + CheckNotWithinUlpSingle(-x, -y, n_ulp - 1); + CheckNotWithinUlpSingle(-y, -x, n_ulp - 1); } - CheckNotWithinUlpSingle(-x, -y, n_ulp); - CheckNotWithinUlpSingle(-y, -x, n_ulp); for (int exp : {1, -1, 10, -10}) { Float x_scaled = std::ldexp(x, exp);