Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Dec 9, 2024
1 parent 0e396ac commit 0783571
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/src/arrow/testing/gtest_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,14 @@ template <typename Float>
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);
Expand Down

0 comments on commit 0783571

Please sign in to comment.