diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java index dda844355..7dae1e1dc 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java @@ -193,7 +193,7 @@ public class LegendreHighPrecisionRuleFactory extends BaseRuleFactory { weights[idx] = w; } // If "numberOfPoints" is odd, 0 is a root. - if (numberOfPoints % 2 == 1) { + if (numberOfPoints % 2 != 0) { double pmc = 1; for (int j = 1; j < numberOfPoints; j += 2) { pmc = -j * pmc / (j + 1);