This is an automated email from the ASF dual-hosted git repository. erans pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-numbers.git
commit 3d5fab4fefecd75a672f0e316231d26b66bcdf98 Author: Eitan Adler <li...@eitanadler.com> AuthorDate: Fri Jun 7 05:16:31 2019 -0700 BigFraction: use factory method --- .../numbers/arrays/LinearCombinationTest.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/LinearCombinationTest.java b/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/LinearCombinationTest.java index 51d210e..3919198 100644 --- a/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/LinearCombinationTest.java +++ b/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/LinearCombinationTest.java @@ -35,15 +35,15 @@ public class LinearCombinationTest { @Test public void testTwoSums() { - final BigFraction[] aF = new BigFraction[] { - new BigFraction(-1321008684645961L, 268435456L), - new BigFraction(-5774608829631843L, 268435456L), - new BigFraction(-7645843051051357L, 8589934592L) + final BigFraction[] aF = { + BigFraction.of(-1321008684645961L, 268435456L), + BigFraction.of(-5774608829631843L, 268435456L), + BigFraction.of(-7645843051051357L, 8589934592L) }; - final BigFraction[] bF = new BigFraction[] { - new BigFraction(-5712344449280879L, 2097152L), - new BigFraction(-4550117129121957L, 2097152L), - new BigFraction(8846951984510141L, 131072L) + final BigFraction[] bF = { + BigFraction.of(-5712344449280879L, 2097152L), + BigFraction.of(-4550117129121957L, 2097152L), + BigFraction.of(8846951984510141L, 131072L) }; final int len = aF.length; @@ -113,12 +113,12 @@ public class LinearCombinationTest { @Test public void testHuge() { int scale = 971; - final double[] a = new double[] { + final double[] a = { -1321008684645961.0 / 268435456.0, -5774608829631843.0 / 268435456.0, -7645843051051357.0 / 8589934592.0 }; - final double[] b = new double[] { + final double[] b = { -5712344449280879.0 / 2097152.0, -4550117129121957.0 / 2097152.0, 8846951984510141.0 / 131072.0 @@ -145,7 +145,7 @@ public class LinearCombinationTest { @Test public void testInfinite() { - final double[][] a = new double[][] { + final double[][] a = { { 1, 2, 3, 4 }, { 1, Double.POSITIVE_INFINITY, 3, 4 }, { 1, 2, Double.POSITIVE_INFINITY, 4 }, @@ -155,7 +155,7 @@ public class LinearCombinationTest { { 1, 2, 3, 4 }, { 1, 2, 3, 4 } }; - final double[][] b = new double[][] { + final double[][] b = { { 1, -2, 3, 4 }, { 1, -2, 3, 4 }, { 1, -2, 3, 4 },