aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-04-02 18:29:33 -0400
committerErik Schnetter <schnetter@gmail.com>2013-04-02 18:29:33 -0400
commit671c86c079faa37386f59eb3c814dc837c4df4c5 (patch)
tree0cf5baa5bb9dc44a05c0b8ea78d867c17d8c1e49 /Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc
parentc0c03fece68597fddfef57948334c5c99154f244 (diff)
Replace abs() by fabs()
Replace calls to abs() with floating arguments by calls to fabs(), to ensure the results are not accidentally truncated to integer.
Diffstat (limited to 'Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc')
-rw-r--r--Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc b/Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc
index 5d56ed3e8..ac04121c0 100644
--- a/Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc
+++ b/Carpet/CarpetLib/src/interpolate_eno_3d_3tl.cc
@@ -142,7 +142,7 @@ namespace CarpetLib {
RT const tmax = max3 (t1, t2, t3);
RT const eps = 1.0e-10 * (tmax - tmin);
- if (abs (t1 - t2) < eps or abs (t1 - t3) < eps or abs (t2 - t3) < eps) {
+ if (fabs (t1 - t2) < eps or fabs (t1 - t3) < eps or fabs (t2 - t3) < eps) {
CCTK_WARN (0, "Internal error: arrays have same time");
}
if (t < min3 (t1, t2, t3) - eps or t > max3 (t1, t2, t3) + eps) {