From 46bc9d232342d4741c86b591a39dc6d335f3636f Mon Sep 17 00:00:00 2001 From: yye00 Date: Thu, 15 Sep 2005 22:07:04 +0000 Subject: A minor modification for divide by zero weight sum git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@69 d60812e6-3970-4df4-986e-c251b06effeb --- src/ReduceGA.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ReduceGA.c b/src/ReduceGA.c index b643128..86530d0 100644 --- a/src/ReduceGA.c +++ b/src/ReduceGA.c @@ -18,6 +18,7 @@ #include "pugh_reductions.h" #define ABS(x) ((x) < 0 ? -(x) : (x)) +#define SMALL_NUMBER 0 static const char *rcsid = "$Id:"; @@ -794,7 +795,7 @@ static int ReduceGridArrays (const cGH *GH, { if (weight_on == 1) { - if (ABS(weight_sum) > 1e-12) + if (ABS(weight_sum) > SMALL_NUMBER) { for (i = 0; i< M_output_values; i++) { -- cgit v1.2.3