Skip to content

Commit

Permalink
Use std::abs to get correct overload
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed May 29, 2020
1 parent 63e2b43 commit 4f3f78f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/integrated/test-cyclic/test_cyclic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int main(int argc, char **argv) {
for(int i=0;i<n;i++) {
T val = ((mype*n + i) % 4) - 2.;
output << "\t" << i << " : " << val << " ?= " << x(s, i) << endl;
if(abs(val - x(s, i)) > tol) {
if(std::abs(val - x(s, i)) > tol) {
passed = 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integrated/test-invpar/test_invpar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main(int argc, char **argv) {
for (int z = 0; z < mesh->LocalNz; z++) {
output.write("result: [{:d},{:d}] : {:e}, {:e}, {:e}\n", y, z, input(2, y, z),
result(2, y, z), deriv(2, y, z));
if (abs(input(2, y, z) - deriv(2, y, z)) > tol)
if (std::abs(input(2, y, z) - deriv(2, y, z)) > tol)
passed = 0;
}
}
Expand Down

0 comments on commit 4f3f78f

Please sign in to comment.