aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@d60812e6-3970-4df4-986e-c251b06effeb>2005-09-15 22:07:04 +0000
committeryye00 <yye00@d60812e6-3970-4df4-986e-c251b06effeb>2005-09-15 22:07:04 +0000
commit46bc9d232342d4741c86b591a39dc6d335f3636f (patch)
treed719a45c5bd5f8145666306030d698c3423e0154
parent17a112347443d764dc0fb4433c1989c8da52f54a (diff)
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
-rw-r--r--src/ReduceGA.c3
1 files changed, 2 insertions, 1 deletions
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++)
{