diff options
-rw-r--r-- | src/ReductionAvg.c | 2 | ||||
-rw-r--r-- | src/ReductionNorm1.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ReductionAvg.c b/src/ReductionAvg.c index dc320ae..d0e39aa 100644 --- a/src/ReductionAvg.c +++ b/src/ReductionAvg.c @@ -328,7 +328,7 @@ static int ReductionAvg (int N_dims, int operator_handle, { if (weight_on == 1) { - if (ABS(weight_sum) > 1e-12) + if (ABS(weight_sum) > SMALL_NUMBER) { for (i = 0; i< M_output_numbers; i++) { diff --git a/src/ReductionNorm1.c b/src/ReductionNorm1.c index bc2fd02..92299d4 100644 --- a/src/ReductionNorm1.c +++ b/src/ReductionNorm1.c @@ -332,7 +332,7 @@ static int ReductionL1 (int N_dims, int operator_handle, { if (weight_on == 1) { - if (ABS(weight_sum) > 1e-12) + if (ABS(weight_sum) > SMALL_NUMBER) { for (i = 0; i< M_output_numbers; i++) { |