From 41df7f7f3ec1c00835568d089b191a0f868a8e85 Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Thu, 27 Oct 2011 09:59:34 +0000 Subject: [PATCH] Code formatting. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1189695 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/math/linear/SingularValueDecomposition.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java b/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java index 06dee004e..c80c22e9f 100644 --- a/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java +++ b/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java @@ -363,9 +363,12 @@ public class SingularValueDecomposition { // Perform one qr step. case 3: { // Calculate the shift. - final double scale = FastMath.max(FastMath.max(FastMath.max(FastMath.max( - FastMath.abs(singularValues[p - 1]), FastMath.abs(singularValues[p - 2])), FastMath.abs(e[p - 2])), - FastMath.abs(singularValues[k])), FastMath.abs(e[k])); + final double maxPm1Pm2 = FastMath.max(FastMath.abs(singularValues[p - 1]), + FastMath.abs(singularValues[p - 2])); + final double scale = FastMath.max(FastMath.max(FastMath.max(maxPm1Pm2, + FastMath.abs(e[p - 2])), + FastMath.abs(singularValues[k])), + FastMath.abs(e[k])); final double sp = singularValues[p - 1] / scale; final double spm1 = singularValues[p - 2] / scale; final double epm1 = e[p - 2] / scale;