Skip to content

Commit

Permalink
fixed files form Math #3
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 608779d commit 416c77d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/Math/3/org/apache/commons/math3/util/MathArrays.java
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,10 @@ public static double linearCombination(final double[] a, final double[] b)
throw new DimensionMismatchException(len, b.length);
}

if (len == 1) {
// Revert to scalar multiplication.
return a[0] * b[0];
}

final double[] prodHigh = new double[len];
double prodLowSum = 0;
Expand Down

0 comments on commit 416c77d

Please sign in to comment.