aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/interpolate_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_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_3d_3tl.cc')
-rw-r--r--Carpet/CarpetLib/src/interpolate_3d_3tl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/interpolate_3d_3tl.cc b/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
index ce8249998..f6dc7790d 100644
--- a/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
+++ b/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
@@ -122,7 +122,7 @@ namespace CarpetLib {
RT const eps = 1.0e-10;
- 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 < min (min (t1, t2), t3) - eps or t > max (max (t1, t2), t3) + eps) {