Skip to content

Commit 0783571

Browse files
committed
Apply suggestion
1 parent 0e396ac commit 0783571

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/src/arrow/testing/gtest_util_test.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,14 @@ template <typename Float>
208208
void CheckNotWithinUlp(Float x, Float y, int n_ulp) {
209209
CheckNotWithinUlpSingle(x, y, n_ulp);
210210
CheckNotWithinUlpSingle(y, x, n_ulp);
211+
CheckNotWithinUlpSingle(-x, -y, n_ulp);
212+
CheckNotWithinUlpSingle(-y, -x, n_ulp);
211213
if (n_ulp > 1) {
212214
CheckNotWithinUlpSingle(x, y, n_ulp - 1);
213215
CheckNotWithinUlpSingle(y, x, n_ulp - 1);
216+
CheckNotWithinUlpSingle(-x, -y, n_ulp - 1);
217+
CheckNotWithinUlpSingle(-y, -x, n_ulp - 1);
214218
}
215-
CheckNotWithinUlpSingle(-x, -y, n_ulp);
216-
CheckNotWithinUlpSingle(-y, -x, n_ulp);
217219

218220
for (int exp : {1, -1, 10, -10}) {
219221
Float x_scaled = std::ldexp(x, exp);

0 commit comments

Comments
 (0)