Skip to content

Commit

Permalink
Fixup cast tolerance to double before printing
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Jan 4, 2024
1 parent 9f5e38e commit cbf1c64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/unit_test/TestMathematicalFunctions.hpp
Expand Up @@ -293,7 +293,7 @@ struct FloatingPointComparison {
bool ar = absolute(fpv) < abs_tol;
if (!ar) {
Kokkos::printf("absolute value exceeds tolerance [|%e| > %e]\n",
(double)fpv, abs_tol);
(double)fpv, (double)abs_tol);
}

return ar;
Expand All @@ -314,7 +314,7 @@ struct FloatingPointComparison {
bool ar = abs_diff == 0 || rel_diff < rel_tol;
if (!ar) {
Kokkos::printf("relative difference exceeds tolerance [%e > %e]\n",
(double)rel_diff, rel_tol);
(double)rel_diff, (double)rel_tol);
}

return ar;
Expand Down

0 comments on commit cbf1c64

Please sign in to comment.