From 2ada82fa06e4264ab2dab735fca746478cadac5c Mon Sep 17 00:00:00 2001 From: swhite Date: Tue, 7 Dec 2004 22:46:00 +0000 Subject: data.cc abs min max to fabs fmin fmax Repeated comments like Catch broken compilers that only know min(int), when the arguments of the functions could only be floating-point. So...changed to fabs fmin fmax and got rid of the Catch. darcs-hash:20041207224657-32473-0f54e7b139bd275e8906f6169400f214e968b1c5.gz --- Carpet/CarpetLib/src/data.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'Carpet/CarpetLib/src/data.cc') diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc index 4acc32e39..0385803aa 100644 --- a/Carpet/CarpetLib/src/data.cc +++ b/Carpet/CarpetLib/src/data.cc @@ -943,10 +943,8 @@ void data CCTK_REAL min_time = times[0]; CCTK_REAL max_time = times[0]; for (size_t tl=1; tl 1.2); - min_time = min(min_time, times[tl]); - max_time = max(max_time, times[tl]); + min_time = fmin(min_time, times[tl]); + max_time = fmax(max_time, times[tl]); } if (time < min_time - eps || time > max_time + eps) { ostringstream buf; @@ -959,9 +957,7 @@ void data // Is it necessary to interpolate in time? if (times.size() > 1) { for (size_t tl=0; tl 1.4); - if (abs(times[tl] - time) < eps) { + if (fabs(times[tl] - time) < eps) { // It is not. vector*> my_gsrcs(1); vector my_times(1); @@ -980,7 +976,7 @@ void data // Restrict assert (times.size() == 1); - assert (abs(times[0] - time) < eps); + assert (fabs(times[0] - time) < eps); switch (transport_operator) { @@ -1020,7 +1016,7 @@ void data case 0: assert (times.size() == 1); - assert (abs(times[0] - time) < eps); + assert (fabs(times[0] - time) < eps); assert (srcs.size()>=1); switch (order_space) { case 0: @@ -1203,7 +1199,7 @@ void data switch (order_time) { case 0: assert (times.size() == 1); - assert (abs(times[0] - time) < eps); + assert (fabs(times[0] - time) < eps); switch (order_space) { case 0: case 1: @@ -1293,7 +1289,7 @@ void data switch (order_time) { case 0: assert (times.size() == 1); - assert (abs(times[0] - time) < eps); + assert (fabs(times[0] - time) < eps); switch (order_space) { case 0: case 1: -- cgit v1.2.3