From 64e28189243d1ee4568b84dc2bfeff67350da3e9 Mon Sep 17 00:00:00 2001 From: aherbert Date: Fri, 15 Jul 2022 17:17:40 +0100 Subject: [PATCH] Use complex multiply by scalar --- .../commons/math4/legacy/analysis/solvers/LaguerreSolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/solvers/LaguerreSolver.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/solvers/LaguerreSolver.java index c6cc839aa..e0dcc37b7 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/solvers/LaguerreSolver.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/solvers/LaguerreSolver.java @@ -344,7 +344,7 @@ public class LaguerreSolver extends AbstractPolynomialSolver { dv = pv.add(z.multiply(dv)); pv = coefficients[j].add(z.multiply(pv)); } - d2v = d2v.multiply(Complex.ofCartesian(2.0, 0.0)); + d2v = d2v.multiply(2); // Check for convergence. final double tolerance = JdkMath.max(relativeAccuracy * z.abs(),