about summary refs log tree commit diff
path: root/other/pamarith.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/pamarith.c')
-rw-r--r--other/pamarith.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/other/pamarith.c b/other/pamarith.c
index d79f1e60..7d973222 100644
--- a/other/pamarith.c
+++ b/other/pamarith.c
@@ -508,7 +508,7 @@ sampleMean(sample       const operands[],
         if (UINT_MAX - operands[i] < sum)
             pm_error("Arithmetic overflow adding samples for mean");
     }
-    return (sum + operandCt/2) / operandCt;
+    return ROUNDDIV(sum, operandCt);
 }
 
 
@@ -656,7 +656,7 @@ applyUnNormalizedFunction(enum function const function,
         break;
     case FN_DIVIDE:
         result = (operands[1] > operands[0]) ?
-            (operands[0] * maxval + operands[1]/2) / operands[1] : maxval;
+            ROUNDDIV(operands[0] * maxval, operands[1]) : maxval;
         break;
 
     case FN_AND: