Skip to content

Commit cdee998

Browse files
committed
Fix 740
1 parent 1c48e61 commit cdee998

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/testutils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ int main(int argc, char *argv[]) {
8383
}
8484
constexpr FLT EPSILON = std::numeric_limits<FLT>::epsilon();
8585
FLT relerr = 2.0 * EPSILON; // 1 ULP, fine since 1.0 rep exactly
86-
if (abs(infnorm(M, &a[0]) - 1.0) > relerr) return 1;
87-
if (abs(twonorm(M, &a[0]) - sqrt((FLT)M)) > relerr * sqrt((FLT)M)) return 1;
86+
if (std::abs(infnorm(M, &a[0]) - 1.0) > relerr) return 1;
87+
if (std::abs(twonorm(M, &a[0]) - std::sqrt((FLT)M)) > relerr * std::sqrt((FLT)M)) return 1;
8888
b[0] = CPX(0.0, 0.0); // perturb b from a
89-
if (abs(errtwonorm(M, &a[0], &b[0]) - 1.0) > relerr) return 1;
90-
if (abs(sqrt((FLT)M) * relerrtwonorm(M, &a[0], &b[0]) - 1.0) > relerr) return 1;
89+
if (std::abs(errtwonorm(M, &a[0], &b[0]) - 1.0) > relerr) return 1;
90+
if (std::abs(std::sqrt((FLT)M) * relerrtwonorm(M, &a[0], &b[0]) - 1.0) > relerr) return 1;
9191

9292
#ifdef SINGLE
9393
printf("testutilsf passed.\n");

0 commit comments

Comments
 (0)