From 6ce950d5a36cbf61323cd83b9b68654637803639 Mon Sep 17 00:00:00 2001 From: aherbert Date: Fri, 25 Jun 2021 12:08:35 +0100 Subject: [PATCH] MATH-1576: Reinstate checkstyle Checkstyle has been suppressed for the legacy module. Fixed the new modules to pass the checkstyle configuration ported from Commons-Numbers. --- .../sofm/chineserings/ChineseRings.java | 24 +- .../chineserings/ChineseRingsClassifier.java | 16 +- .../sofm/chineserings/StandAlone.java | 27 +- .../sofm/chineserings/package-info.java | 22 + .../neuralnet/sofm/tsp/StandAlone.java | 8 +- .../neuralnet/sofm/tsp/package-info.java | 22 + .../commons/math4/examples/sofm/tsp/City.java | 12 +- .../math4/examples/sofm/tsp/StandAlone.java | 36 +- .../sofm/tsp/TravellingSalesmanSolver.java | 25 +- .../math4/examples/sofm/tsp/package-info.java | 22 + .../math4/legacy/core/FieldElement.java | 6 +- .../math4/legacy/core/IntegerSequence.java | 4 +- .../commons/math4/legacy/core/MathArrays.java | 42 +- .../math4/legacy/core/RealFieldElement.java | 7 +- .../commons/math4/legacy/core/dfp/Dfp.java | 511 +- .../commons/math4/legacy/core/dfp/DfpDec.java | 78 +- .../math4/legacy/core/dfp/DfpField.java | 67 +- .../math4/legacy/core/dfp/DfpMath.java | 40 +- .../legacy/core/jdkmath/AccurateMath.java | 1263 ++-- .../legacy/core/jdkmath/AccurateMathCalc.java | 156 +- .../jdkmath/AccurateMathLiteralArrays.java | 6154 +++++++++-------- .../legacy/core/jdkmath/package-info.java | 21 + .../math4/legacy/core/package-info.java | 21 + .../ExtendedFieldElementAbstractTest.java | 22 +- .../legacy/core/IntegerSequenceTest.java | 31 +- .../math4/legacy/core/MathArraysTest.java | 287 +- .../commons/math4/legacy/core/PairTest.java | 29 +- .../math4/legacy/core/dfp/DfpDecTest.java | 34 +- .../math4/legacy/core/dfp/DfpMathTest.java | 34 +- .../math4/legacy/core/dfp/DfpTest.java | 76 +- .../AccurateMathStrictComparisonTest.java | 82 +- .../legacy/core/jdkmath/AccurateMathTest.java | 239 +- .../exception/ConvergenceException.java | 2 +- .../exception/MathArithmeticException.java | 2 +- .../MathIllegalArgumentException.java | 2 +- .../exception/MathIllegalNumberException.java | 2 +- .../exception/MathIllegalStateException.java | 4 +- .../legacy/exception/MathInternalError.java | 2 +- .../exception/MathRuntimeException.java | 4 +- .../MathUnsupportedOperationException.java | 2 +- .../exception/MaxCountExceededException.java | 2 +- .../exception/NoBracketingException.java | 2 +- .../exception/NotFiniteNumberException.java | 4 +- .../exception/NullArgumentException.java | 4 +- .../math4/legacy/exception/ZeroException.java | 4 +- .../math4/legacy/exception/util/ArgUtils.java | 3 +- .../exception/util/ExceptionContext.java | 8 +- .../NotFiniteNumberExceptionTest.java | 25 +- .../exception/NullArgumentExceptionTest.java | 24 +- .../exception/util/ExceptionContextTest.java | 18 +- .../exception/util/LocalizedFormatsTest.java | 6 +- commons-math-legacy/pom.xml | 8 + .../math4/neuralnet/DistanceMeasure.java | 4 +- .../neuralnet/FeatureInitializerFactory.java | 5 +- .../commons/math4/neuralnet/MapRanking.java | 14 +- .../commons/math4/neuralnet/MapUtils.java | 2 +- .../neuralnet/internal/package-info.java | 22 + .../math4/neuralnet/oned/NeuronString.java | 2 +- .../neuralnet/sofm/KohonenUpdateAction.java | 4 +- .../sofm/LearningFactorFunctionFactory.java | 2 +- .../NeighbourhoodSizeFunctionFactory.java | 2 +- .../sofm/util/QuasiSigmoidDecayFunction.java | 2 +- .../neuralnet/twod/NeuronSquareMesh2D.java | 28 +- .../twod/util/UnifiedDistanceMatrix.java | 2 +- .../math4/neuralnet/MapRankingTest.java | 28 +- .../commons/math4/neuralnet/NetworkTest.java | 18 +- .../commons/math4/neuralnet/NeuronTest.java | 22 +- .../neuralnet/OffsetFeatureInitializer.java | 3 +- .../neuralnet/oned/NeuronStringTest.java | 26 +- .../sofm/KohonenUpdateActionTest.java | 6 +- .../LearningFactorFunctionFactoryTest.java | 20 +- .../NeighbourhoodSizeFunctionFactoryTest.java | 16 +- .../util/ExponentialDecayFunctionTest.java | 10 +- .../util/QuasiSigmoidDecayFunctionTest.java | 8 +- .../twod/NeuronSquareMesh2DTest.java | 138 +- .../twod/util/LocationFinderTest.java | 2 +- .../math4/transform/FastCosineTransform.java | 8 +- .../math4/transform/FastFourierTransform.java | 6 +- .../transform/FastHadamardTransform.java | 4 +- .../math4/transform/FastSineTransform.java | 8 +- .../math4/transform/TransformException.java | 2 +- .../math4/transform/TransformUtils.java | 3 +- .../transform/FastCosineTransformerTest.java | 35 +- .../transform/FastFourierTransformerTest.java | 60 +- .../FastHadamardTransformerTest.java | 27 +- .../transform/FastSineTransformerTest.java | 35 +- .../RealTransformerAbstractTest.java | 26 +- .../math4/transform/TransformUtilsTest.java | 8 +- .../checkstyle/checkstyle-legacy.xml | 260 + .../checkstyle-suppressions-legacy.xml | 26 + .../checkstyle/checkstyle-suppressions.xml | 32 +- src/main/resources/checkstyle/checkstyle.xml | 1 + 92 files changed, 5454 insertions(+), 5019 deletions(-) create mode 100644 commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/package-info.java create mode 100644 commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/package-info.java create mode 100644 commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/package-info.java create mode 100644 commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/package-info.java create mode 100644 commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/package-info.java create mode 100644 commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/internal/package-info.java create mode 100644 src/main/resources/checkstyle/checkstyle-legacy.xml create mode 100644 src/main/resources/checkstyle/checkstyle-suppressions-legacy.xml diff --git a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRings.java b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRings.java index 0090ebe87..fce55f2b0 100644 --- a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRings.java +++ b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRings.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -45,13 +45,13 @@ class ChineseRings { * @param numPointsRing1 Number of points in the first ring. * @param numPointsRing2 Number of points in the second ring. */ - public ChineseRings(Vector3D orientationRing1, - double radiusRing1, - double halfWidthRing1, - double radiusRing2, - double halfWidthRing2, - int numPointsRing1, - int numPointsRing2) { + ChineseRings(Vector3D orientationRing1, + double radiusRing1, + double halfWidthRing1, + double radiusRing2, + double halfWidthRing2, + int numPointsRing1, + int numPointsRing2) { // First ring (centered at the origin). final Vector3D[] firstRing = new Vector3D[numPointsRing1]; // Second ring (centered around the first ring). @@ -113,6 +113,8 @@ class ChineseRings { /** * Gets all the points. + * + * @return the points */ public Vector3D[] getPoints() { return points.clone(); @@ -125,24 +127,28 @@ class ChineseRings { */ public Iterable createIterable() { return new Iterable() { + @Override public Iterator iterator() { return new Iterator() { /** Data. */ - final Vector3D[] points = getPoints(); + private final Vector3D[] points = getPoints(); /** Number of samples. */ private int n = 0; /** {@inheritDoc} */ + @Override public boolean hasNext() { return n < points.length; } /** {@inheritDoc} */ + @Override public double[] next() { return points[n++].toArray(); } /** {@inheritDoc} */ + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRingsClassifier.java b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRingsClassifier.java index 7a07686fc..0e781bcb6 100644 --- a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRingsClassifier.java +++ b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/ChineseRingsClassifier.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,7 +26,6 @@ import org.apache.commons.geometry.euclidean.threed.Vector3D; import org.apache.commons.math4.neuralnet.SquareNeighbourhood; import org.apache.commons.math4.neuralnet.FeatureInitializer; import org.apache.commons.math4.neuralnet.FeatureInitializerFactory; -import org.apache.commons.math4.neuralnet.MapUtils; import org.apache.commons.math4.neuralnet.DistanceMeasure; import org.apache.commons.math4.neuralnet.EuclideanDistance; import org.apache.commons.math4.neuralnet.twod.NeuronSquareMesh2D; @@ -54,9 +53,9 @@ class ChineseRingsClassifier { * @param dim1 Number of rows of the SOFM. * @param dim2 Number of columns of the SOFM. */ - public ChineseRingsClassifier(ChineseRings rings, - int dim1, - int dim2) { + ChineseRingsClassifier(ChineseRings rings, + int dim1, + int dim2) { this.rings = rings; sofm = new NeuronSquareMesh2D(dim1, false, dim2, false, @@ -164,24 +163,27 @@ class ChineseRingsClassifier { private Iterator createRandomIterator(final long numSamples) { return new Iterator() { /** Data. */ - final Vector3D[] points = rings.getPoints(); + private final Vector3D[] points = rings.getPoints(); /** RNG. */ - final UniformRandomProvider rng = RandomSource.create(RandomSource.KISS); + private final UniformRandomProvider rng = RandomSource.create(RandomSource.KISS); /** Number of samples. */ private long n = 0; /** {@inheritDoc} */ + @Override public boolean hasNext() { return n < numSamples; } /** {@inheritDoc} */ + @Override public double[] next() { ++n; return points[rng.nextInt(points.length)].toArray(); } /** {@inheritDoc} */ + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/StandAlone.java b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/StandAlone.java index 1c53d10fc..b2fdd1e63 100644 --- a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/StandAlone.java +++ b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/StandAlone.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,19 +35,23 @@ import org.apache.commons.math4.neuralnet.twod.NeuronSquareMesh2D; */ @Command(description = "Run the application", mixinStandardHelpOptions = true) -public class StandAlone implements Callable { +public final class StandAlone implements Callable { + /** The number of rows. */ @Option(names = { "-r" }, paramLabel = "numRows", description = "Number of rows of the 2D SOFM (default: ${DEFAULT-VALUE}).") - private int _numRows = 15; + private int numRows = 15; + /** The number of columns. */ @Option(names = { "-c" }, paramLabel = "numCols", description = "Number of columns of the 2D SOFM (default: ${DEFAULT-VALUE}).") - private int _numCols = 15; + private int numCols = 15; + /** The number of samples. */ @Option(names = { "-s" }, paramLabel = "numSamples", description = "Number of samples for the training (default: ${DEFAULT-VALUE}).") - private long _numSamples = 100000; + private long numSamples = 100000; + /** The output file. */ @Option(names = { "-o" }, paramLabel = "outputFile", required = true, description = "Output file name.") - private String _outputFile = null; + private String outputFile = null; /** * Program entry point. @@ -65,9 +69,9 @@ public class StandAlone implements Callable { 20, 1, 2000, 1500); - final ChineseRingsClassifier classifier = new ChineseRingsClassifier(rings, _numRows, _numCols); - classifier.createSequentialTask(_numSamples).run(); - printResult(_outputFile, classifier); + final ChineseRingsClassifier classifier = new ChineseRingsClassifier(rings, numRows, numCols); + classifier.createSequentialTask(numSamples).run(); + printResult(outputFile, classifier); return null; } @@ -81,10 +85,11 @@ public class StandAlone implements Callable { * @throws FileNotFoundException If the file cannot be created. */ private static void printResult(String fileName, - ChineseRingsClassifier sofm) throws FileNotFoundException, UnsupportedEncodingException { + ChineseRingsClassifier sofm) + throws FileNotFoundException, UnsupportedEncodingException { final NeuronSquareMesh2D.DataVisualization result = sofm.computeQualityIndicators(); - try (final PrintWriter out = new PrintWriter(fileName, StandardCharsets.UTF_8.name())) { + try (PrintWriter out = new PrintWriter(fileName, StandardCharsets.UTF_8.name())) { out.println("# Number of samples: " + result.getNumberOfSamples()); out.println("# Quantization error: " + result.getMeanQuantizationError()); out.println("# Topographic error: " + result.getMeanTopographicError()); diff --git a/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/package-info.java b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/package-info.java new file mode 100644 index 000000000..f6b3dd477 --- /dev/null +++ b/commons-math-examples/examples-sofm/chinese-rings/src/main/java/org/apache/commons/math4/examples/sofm/chineserings/package-info.java @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Self-organized feature map (SOFM) used for classification. + */ + +package org.apache.commons.math4.examples.sofm.chineserings; diff --git a/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/StandAlone.java b/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/StandAlone.java index 3fea19381..0601380ac 100644 --- a/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/StandAlone.java +++ b/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/StandAlone.java @@ -16,11 +16,13 @@ */ package org.apache.commons.math3.examples.neuralnet.sofm.tsp; -import org.apache.commons.rng.simple.RandomSource; - /** + * Application class. */ -public class StandAlone { +public final class StandAlone { + /** No instances. */ + private StandAlone() {} + /** * Program entry point. * diff --git a/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/package-info.java b/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/package-info.java new file mode 100644 index 000000000..573aab5c6 --- /dev/null +++ b/commons-math-examples/examples-sofm/src/main/java/org/apache/commons/math4/examples/neuralnet/sofm/tsp/package-info.java @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Self-organized feature map (ANN) sample codes. + */ + +package org.apache.commons.math3.examples.neuralnet.sofm.tsp; diff --git a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/City.java b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/City.java index da10eea89..f55c3e49c 100644 --- a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/City.java +++ b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/City.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,11 +26,11 @@ import java.util.HashSet; */ public class City { /** Identifier. */ - final String name; + private final String name; /** x-coordinate. */ - final double x; + private final double x; /** y-coordinate. */ - final double y; + private final double y; /** * @param name Name. @@ -56,7 +56,7 @@ public class City { * @return the (x, y) coordinates. */ public double[] getCoordinates() { - return new double[] { x, y }; + return new double[] {x, y}; } /** @@ -116,7 +116,7 @@ public class City { ++count; } - return new double[] { xB / count, yB / count }; + return new double[] {xB / count, yB / count}; } /** diff --git a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/StandAlone.java b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/StandAlone.java index cb9934129..bbd768bc7 100644 --- a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/StandAlone.java +++ b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/StandAlone.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,22 +35,27 @@ import org.apache.commons.rng.simple.RandomSource; */ @Command(description = "Run the application", mixinStandardHelpOptions = true) -public class StandAlone implements Callable { +public final class StandAlone implements Callable { + /** The neurons per city. */ @Option(names = { "-n" }, paramLabel = "neuronsPerCity", description = "Average number of neurons per city (default: ${DEFAULT-VALUE}).") - private double _neuronsPerCity = 2.2; + private double neuronsPerCity = 2.2; + /** The number of samples. */ @Option(names = { "-s" }, paramLabel = "numSamples", description = "Number of samples for the training (default: ${DEFAULT-VALUE}).") - private long _numSamples = 2000L; + private long numSamples = 2000L; + /** The number of jobs. */ @Option(names = { "-j" }, paramLabel = "numJobs", description = "Number of concurrent tasks (default: ${DEFAULT-VALUE}).") - private int _numJobs = Runtime.getRuntime().availableProcessors(); + private int numJobs = Runtime.getRuntime().availableProcessors(); + /** The maximum number of trials. */ @Option(names = { "-m" }, paramLabel = "maxTrials", description = "Maximal number of trials (default: ${DEFAULT-VALUE}).") - private int _maxTrials = 10; + private int maxTrials = 10; + /** The output file. */ @Option(names = { "-o" }, paramLabel = "outputFile", required = true, description = "Output file name.") - private String _outputFile = null; + private String outputFile = null; /** * Program entry point. @@ -62,7 +67,7 @@ public class StandAlone implements Callable { } @Override - public Void call() throws Exception { + public Void call() throws FileNotFoundException, UnsupportedEncodingException { // Cities (in optimal travel order). final City[] cities = new City[] { new City("o0", 0, 0), @@ -87,11 +92,11 @@ public class StandAlone implements Callable { double minDist = Double.POSITIVE_INFINITY; int count = 0; - while (count++ < _maxTrials) { + while (count++ < maxTrials) { final City[] travel = TravellingSalesmanSolver.solve(cities, - _neuronsPerCity, - _numSamples, - _numJobs, + neuronsPerCity, + numSamples, + numJobs, rng); final int numCities = City.unique(travel).size(); if (numCities > maxCities) { @@ -108,7 +113,7 @@ public class StandAlone implements Callable { } } - printSummary(_outputFile, best, computeDistance(cities)); + printSummary(outputFile, best, computeDistance(cities)); return null; } @@ -146,8 +151,9 @@ public class StandAlone implements Callable { */ private static void printSummary(String fileName, City[] travel, - double optimalDistance) throws FileNotFoundException, UnsupportedEncodingException { - try (final PrintWriter out = new PrintWriter(fileName, StandardCharsets.UTF_8.name())) { + double optimalDistance) + throws FileNotFoundException, UnsupportedEncodingException { + try (PrintWriter out = new PrintWriter(fileName, StandardCharsets.UTF_8.name())) { out.println("# Number of unique cities: " + City.unique(travel).size()); out.println("# Travel distance: " + computeDistance(travel)); out.println("# Optimal travel distance: " + optimalDistance); diff --git a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java index d7311fc16..5168d69d5 100644 --- a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java +++ b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/TravellingSalesmanSolver.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -51,7 +51,8 @@ import org.apache.commons.math4.neuralnet.sofm.LearningFactorFunction; * "Travelling Salesman's Problem" (i.e. trying to find the sequence of * cities that minimizes the travel distance) using a 1D SOFM. */ -public class TravellingSalesmanSolver { +public final class TravellingSalesmanSolver { + /** The ID for the first neuron. */ private static final long FIRST_NEURON_ID = 0; /** SOFM. */ private final Network net; @@ -121,7 +122,7 @@ public class TravellingSalesmanSolver { for (Future f : execOutput) { f.get(); } - } catch (InterruptedException|ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } // Terminate all threads. @@ -172,7 +173,7 @@ public class TravellingSalesmanSolver { * in random order. * * @param numSamples Number of samples. - * @param cities Cities. + * @param uniqueCities Cities. * @param random RNG. * @return the iterator. */ @@ -300,13 +301,13 @@ public class TravellingSalesmanSolver { */ class HarmonicOscillator implements DoubleUnaryOperator { /** Amplitude. */ - final double amplitude; + private final double amplitude; /** Angular speed. */ - final double omega; + private final double omega; /** Phase. */ - final double phase; + private final double phase; /** Offset. */ - final double offset; + private final double offset; /** * @param amplitude Amplitude. @@ -314,10 +315,10 @@ class HarmonicOscillator implements DoubleUnaryOperator { * @param phase Phase. * @param offset Offset (ordinate). */ - public HarmonicOscillator(double amplitude, - double omega, - double phase, - double offset) { + HarmonicOscillator(double amplitude, + double omega, + double phase, + double offset) { this.amplitude = amplitude; this.omega = omega; this.phase = phase; diff --git a/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/package-info.java b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/package-info.java new file mode 100644 index 000000000..5a92146e5 --- /dev/null +++ b/commons-math-examples/examples-sofm/tsp/src/main/java/org/apache/commons/math4/examples/sofm/tsp/package-info.java @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Traveling Salesman Problem. + */ + +package org.apache.commons.math4.examples.sofm.tsp; diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/FieldElement.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/FieldElement.java index e2ee0fe13..a0de70c66 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/FieldElement.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/FieldElement.java @@ -49,10 +49,8 @@ public interface FieldElement { T negate(); /** Compute n × this. Multiplication by an integer number is defined - * as the following sum - *
- * n × this = ∑i=1n this. - *
+ * as the following sum: + *

n × this = ∑i=1n this. * @param n Number of times {@code this} must be added to itself. * @return A new element representing n × this. */ diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/IntegerSequence.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/IntegerSequence.java index 1e2d88a9f..692ce4619 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/IntegerSequence.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/IntegerSequence.java @@ -29,7 +29,7 @@ import org.apache.commons.math4.legacy.exception.ZeroException; * * @since 3.6 */ -public class IntegerSequence { +public final class IntegerSequence { /** * Utility class contains only static methods. */ @@ -128,7 +128,7 @@ public class IntegerSequence { * custom {@link MaxCountExceededCallback callback}, in order to e.g. * select which exception must be thrown. */ - public static class Incrementor implements Iterator { + public static final class Incrementor implements Iterator { /** Default callback. */ private static final MaxCountExceededCallback CALLBACK = new MaxCountExceededCallback() { diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java index 14ca99433..e5546b9ec 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java @@ -18,12 +18,8 @@ package org.apache.commons.math4.legacy.core; import java.lang.reflect.Array; -import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; import java.util.Iterator; -import java.util.List; import java.util.TreeSet; import org.apache.commons.numbers.core.Precision; @@ -46,7 +42,7 @@ import org.apache.commons.math4.legacy.core.jdkmath.AccurateMath; * * @since 3.0 */ -public class MathArrays { +public final class MathArrays { /** * Private constructor. @@ -245,13 +241,13 @@ public class MathArrays { * @throws DimensionMismatchException if the array lengths differ. */ public static double distance(int[] p1, int[] p2) { - checkEqualLength(p1, p2); - double sum = 0; - for (int i = 0; i < p1.length; i++) { - final double dp = p1[i] - p2[i]; - sum += dp * dp; - } - return AccurateMath.sqrt(sum); + checkEqualLength(p1, p2); + double sum = 0; + for (int i = 0; i < p1.length; i++) { + final double dp = p1[i] - p2[i]; + sum += dp * dp; + } + return AccurateMath.sqrt(sum); } /** @@ -335,7 +331,7 @@ public class MathArrays { } } else { if (comp > 0) { - return false; + return false; } } break; @@ -570,7 +566,7 @@ public class MathArrays { * @since 3.4 */ public static void checkNotNaN(final double[] in) { - for(int i = 0; i < in.length; i++) { + for (int i = 0; i < in.length; i++) { if (Double.isNaN(in[i])) { throw new NotANumberException(); } @@ -600,7 +596,7 @@ public class MathArrays { * @since 3.1 */ public static void checkNonNegative(final long[][] in) { - for (int i = 0; i < in.length; i ++) { + for (int i = 0; i < in.length; i++) { for (int j = 0; j < in[i].length; j++) { if (in[i][j] < 0) { throw new NotPositiveException(in[i][j]); @@ -620,7 +616,7 @@ public class MathArrays { * and equal elements. */ public static boolean equals(float[] x, float[] y) { - if ((x == null) || (y == null)) { + if (x == null || y == null) { return !((x == null) ^ (y == null)); } if (x.length != y.length) { @@ -646,7 +642,7 @@ public class MathArrays { * @since 2.2 */ public static boolean equalsIncludingNaN(float[] x, float[] y) { - if ((x == null) || (y == null)) { + if (x == null || y == null) { return !((x == null) ^ (y == null)); } if (x.length != y.length) { @@ -671,7 +667,7 @@ public class MathArrays { * dimension and equal elements. */ public static boolean equals(double[] x, double[] y) { - if ((x == null) || (y == null)) { + if (x == null || y == null) { return !((x == null) ^ (y == null)); } if (x.length != y.length) { @@ -697,7 +693,7 @@ public class MathArrays { * @since 2.2 */ public static boolean equalsIncludingNaN(double[] x, double[] y) { - if ((x == null) || (y == null)) { + if (x == null || y == null) { return !((x == null) ^ (y == null)); } if (x.length != y.length) { @@ -1049,10 +1045,12 @@ public class MathArrays { throw new MathIllegalArgumentException(LocalizedFormats.NAN_ELEMENT_AT_INDEX, Integer.valueOf(i)); } if (Double.isInfinite(weight)) { - throw new MathIllegalArgumentException(LocalizedFormats.INFINITE_ARRAY_ELEMENT, Double.valueOf(weight), Integer.valueOf(i)); + throw new MathIllegalArgumentException(LocalizedFormats.INFINITE_ARRAY_ELEMENT, + Double.valueOf(weight), Integer.valueOf(i)); } if (weight < 0) { - throw new MathIllegalArgumentException(LocalizedFormats.NEGATIVE_ELEMENT_AT_INDEX, Integer.valueOf(i), Double.valueOf(weight)); + throw new MathIllegalArgumentException(LocalizedFormats.NEGATIVE_ELEMENT_AT_INDEX, + Integer.valueOf(i), Double.valueOf(weight)); } if (!containsPositiveWeight && weight > 0.0) { containsPositiveWeight = true; @@ -1077,7 +1075,7 @@ public class MathArrays { * @throws NullPointerException if any of the arrays are null * @since 3.6 */ - public static double[] concatenate(double[] ...x) { + public static double[] concatenate(double[]... x) { int combinedLength = 0; for (double[] a : x) { combinedLength += a.length; diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/RealFieldElement.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/RealFieldElement.java index 2d8b0a433..4383ea57c 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/RealFieldElement.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/RealFieldElement.java @@ -87,7 +87,8 @@ public interface RealFieldElement extends FieldElement { */ T floor(); - /** Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers. + /** Get the whole number that is the nearest to the instance, or the even one if x is exactly + * half way between two integers. * @return a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5 */ T rint(); @@ -405,7 +406,7 @@ public interface RealFieldElement extends FieldElement { * @param e2 second element * @return max(a1, e2) */ - public static > T max(final T e1, final T e2) { + static > T max(final T e1, final T e2) { return e1.subtract(e2).getReal() >= 0 ? e1 : e2; } @@ -415,7 +416,7 @@ public interface RealFieldElement extends FieldElement { * @param e2 second element * @return min(a1, e2) */ - public static > T min(final T e1, final T e2) { + static > T min(final T e1, final T e2) { return e1.subtract(e2).getReal() >= 0 ? e2 : e1; } } diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/Dfp.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/Dfp.java index d6ece898d..57bb828cc 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/Dfp.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/Dfp.java @@ -103,10 +103,10 @@ public class Dfp implements RealFieldElement { public static final int MIN_EXP = -32767; /** The maximum exponent before overflow is signaled and results flushed - * to infinity */ + * to infinity. */ public static final int MAX_EXP = 32768; - /** The amount under/overflows are scaled by before going to trap handler */ + /** The amount under/overflows are scaled by before going to trap handler. */ public static final int ERR_SCALE = 32760; /** Indicator value for normal finite numbers. */ @@ -279,7 +279,7 @@ public class Dfp implements RealFieldElement { exponent++; // Normalize the subnormal number - while ( (mantissa & 0x0010000000000000L) == 0) { + while ((mantissa & 0x0010000000000000L) == 0) { exponent--; mantissa <<= 1; } @@ -302,7 +302,7 @@ public class Dfp implements RealFieldElement { } Dfp xdfp = new Dfp(field, mantissa); - xdfp = xdfp.divide(new Dfp(field, 4503599627370496l)).add(field.getOne()); // Divide by 2^52, then add one + xdfp = xdfp.divide(new Dfp(field, 4503599627370496L)).add(field.getOne()); // Divide by 2^52, then add one xdfp = xdfp.multiply(DfpMath.pow(field.getTwo(), exponent)); if ((bits & 0x8000000000000000L) != 0) { @@ -313,7 +313,6 @@ public class Dfp implements RealFieldElement { sign = xdfp.sign; exp = xdfp.exp; nans = xdfp.nans; - } /** Copy constructor. @@ -375,13 +374,11 @@ public class Dfp implements RealFieldElement { if (p != -1) { // scientific notation fpdecimal = s.substring(0, p); - String fpexp = s.substring(p+1); + String fpexp = s.substring(p + 1); boolean negative = false; - for (int i=0; i { striped[1] = '0'; striped[2] = '0'; striped[3] = '0'; - int significantDigits=0; - for(;;) { + int significantDigits = 0; + for (;;) { if (p == (fpdecimal.length())) { break; } // Don't want to run pass the end of the array - if (q == mant.length*rsize+offset+1) { + if (q == mant.length * rsize + offset + 1) { break; } @@ -486,12 +483,12 @@ public class Dfp implements RealFieldElement { // Implicit decimal point at end of number if not present if (!decimalFound) { - decimalPos = q-offset; + decimalPos = q - offset; } // Find the number of significant trailing zeros - q = offset; // set q to point to first sig digit - p = significantDigits-1+offset; + q = offset; // set q to point to first sig digit + p = significantDigits - 1 + offset; while (p > q) { if (striped[p] != '0') { @@ -515,21 +512,20 @@ public class Dfp implements RealFieldElement { // Ok, now we know how many trailing zeros there are, // and where the least significant digit is for (i = mant.length - 1; i >= 0; i--) { - mant[i] = (striped[q] - '0') * 1000 + - (striped[q+1] - '0') * 100 + - (striped[q+2] - '0') * 10 + - (striped[q+3] - '0'); + mant[i] = (striped[q] - '0') * 1000 + + (striped[q + 1] - '0') * 100 + + (striped[q + 2] - '0') * 10 + + (striped[q + 3] - '0'); q += 4; } - exp = (decimalPos+sciexp) / rsize; + exp = (decimalPos + sciexp) / rsize; if (q < striped.length) { // Is there possible another digit? - round((striped[q] - '0')*1000); + round((striped[q] - '0') * 1000); } - } /** Creates an instance with a non-finite value. @@ -602,7 +598,6 @@ public class Dfp implements RealFieldElement { } return new Dfp(d); - } /** Create an instance from a String representation. @@ -624,7 +619,8 @@ public class Dfp implements RealFieldElement { return field.newDfp(sig, code); } - /** Get the {@link org.apache.commons.math4.legacy.core.Field Field} (really a {@link DfpField}) to which the instance belongs. + /** Get the {@link org.apache.commons.math4.legacy.core.Field Field} (really a + * {@link DfpField}) to which the instance belongs. *

* The field is linked to the number of digits and acts as a factory * for {@link Dfp} instances. @@ -668,7 +664,7 @@ public class Dfp implements RealFieldElement { */ protected void shiftLeft() { for (int i = mant.length - 1; i > 0; i--) { - mant[i] = mant[i-1]; + mant[i] = mant[i - 1]; } mant[0] = 0; exp--; @@ -680,7 +676,7 @@ public class Dfp implements RealFieldElement { */ protected void shiftRight() { for (int i = 0; i < mant.length - 1; i++) { - mant[i] = mant[i+1]; + mant[i] = mant[i + 1]; } mant[mant.length - 1] = 0; exp++; @@ -744,7 +740,6 @@ public class Dfp implements RealFieldElement { } return lostdigit; - } /** Check if instance is less than x. @@ -809,7 +804,6 @@ public class Dfp implements RealFieldElement { } return (sign < 0) || ((mant[mant.length - 1] == 0) && !isInfinite()); - } /** Check if instance is strictly less than 0. @@ -824,7 +818,6 @@ public class Dfp implements RealFieldElement { } return (sign < 0) && ((mant[mant.length - 1] != 0) || isInfinite()); - } /** Check if instance is greater than or equal to 0. @@ -839,7 +832,6 @@ public class Dfp implements RealFieldElement { } return (sign > 0) || ((mant[mant.length - 1] == 0) && !isInfinite()); - } /** Check if instance is strictly greater than 0. @@ -854,7 +846,6 @@ public class Dfp implements RealFieldElement { } return (sign > 0) && ((mant[mant.length - 1] != 0) || isInfinite()); - } /** Get the absolute value of instance. @@ -894,7 +885,6 @@ public class Dfp implements RealFieldElement { } return (mant[mant.length - 1] == 0) && !isInfinite(); - } /** Check if instance is equal to x. @@ -914,7 +904,6 @@ public class Dfp implements RealFieldElement { } return false; - } /** @@ -941,7 +930,7 @@ public class Dfp implements RealFieldElement { /** Compare two instances. * @param a first instance in comparison * @param b second instance in comparison - * @return -1 if ab and 0 if a==b + * @return -1 if {@code a < b}, 1 if {@code a > b} and 0 if {@code a == b} * Note this method does not properly handle NaNs or numbers with different precision. */ private static int compare(final Dfp a, final Dfp b) { @@ -973,7 +962,7 @@ public class Dfp implements RealFieldElement { } // Handle special case when a or b is zero, by ignoring the exponents - if (b.mant[b.mant.length-1] != 0 && a.mant[b.mant.length-1] != 0) { + if (b.mant[b.mant.length - 1] != 0 && a.mant[b.mant.length - 1] != 0) { if (a.exp < b.exp) { return -a.sign; } @@ -995,7 +984,6 @@ public class Dfp implements RealFieldElement { } return 0; - } /** Round to nearest integer using the round-half-even method. @@ -1040,12 +1028,11 @@ public class Dfp implements RealFieldElement { final Dfp result = this.subtract(this.divide(d).rint().multiply(d)); // IEEE 854-1987 says that if the result is zero, then it carries the sign of this - if (result.mant[mant.length-1] == 0) { + if (result.mant[mant.length - 1] == 0) { result.sign = sign; } return result; - } /** Does the integer conversions with the specified rounding. @@ -1063,7 +1050,7 @@ public class Dfp implements RealFieldElement { return newInstance(this); } - if (mant[mant.length-1] == 0) { + if (mant[mant.length - 1] == 0) { // a is zero return newInstance(this); } @@ -1089,45 +1076,45 @@ public class Dfp implements RealFieldElement { * a with the fractional part lopped off. */ Dfp result = newInstance(this); - for (int i = 0; i < mant.length-result.exp; i++) { + for (int i = 0; i < mant.length - result.exp; i++) { changed |= result.mant[i] != 0; result.mant[i] = 0; } if (changed) { switch (rmode) { - case ROUND_FLOOR: - if (result.sign == -1) { - // then we must increment the mantissa by one - result = result.add(newInstance(-1)); - } - break; + case ROUND_FLOOR: + if (result.sign == -1) { + // then we must increment the mantissa by one + result = result.add(newInstance(-1)); + } + break; - case ROUND_CEIL: - if (result.sign == 1) { - // then we must increment the mantissa by one - result = result.add(getOne()); - } - break; + case ROUND_CEIL: + if (result.sign == 1) { + // then we must increment the mantissa by one + result = result.add(getOne()); + } + break; - case ROUND_HALF_EVEN: - default: - final Dfp half = newInstance("0.5"); - Dfp a = subtract(result); // difference between this and result - a.sign = 1; // force positive (take abs) - if (a.greaterThan(half)) { - a = newInstance(getOne()); - a.sign = sign; - result = result.add(a); - } + case ROUND_HALF_EVEN: + default: + final Dfp half = newInstance("0.5"); + Dfp a = subtract(result); // difference between this and result + a.sign = 1; // force positive (take abs) + if (a.greaterThan(half)) { + a = newInstance(getOne()); + a.sign = sign; + result = result.add(a); + } - /* If exactly equal to 1/2 and odd then increment */ - if (a.equals(half) && result.exp > 0 && (result.mant[mant.length-result.exp]&1) != 0) { - a = newInstance(getOne()); - a.sign = sign; - result = result.add(a); - } - break; + /* If exactly equal to 1/2 and odd then increment */ + if (a.equals(half) && result.exp > 0 && (result.mant[mant.length - result.exp] & 1) != 0) { + a = newInstance(getOne()); + a.sign = sign; + result = result.add(a); + } + break; } field.setIEEEFlagsBits(DfpField.FLAG_INEXACT); // signal inexact @@ -1191,13 +1178,13 @@ public class Dfp implements RealFieldElement { * @since 3.2 */ public int intLog10() { - if (mant[mant.length-1] > 1000) { + if (mant[mant.length - 1] > 1000) { return exp * 4 - 1; } - if (mant[mant.length-1] > 100) { + if (mant[mant.length - 1] > 100) { return exp * 4 - 2; } - if (mant[mant.length-1] > 10) { + if (mant[mant.length - 1] > 10) { return exp * 4 - 3; } return exp * 4 - 4; @@ -1217,16 +1204,16 @@ public class Dfp implements RealFieldElement { } switch ((e % 4 + 4) % 4) { - case 0: - break; - case 1: - d = d.multiply(10); - break; - case 2: - d = d.multiply(100); - break; - default: - d = d.multiply(1000); + case 0: + break; + case 1: + d = d.multiply(10); + break; + case 2: + d = d.multiply(100); + break; + default: + d = d.multiply(1000); } return d; @@ -1240,9 +1227,9 @@ public class Dfp implements RealFieldElement { */ protected int complement(int extra) { - extra = RADIX-extra; + extra = RADIX - extra; for (int i = 0; i < mant.length; i++) { - mant[i] = RADIX-mant[i]-1; + mant[i] = RADIX - mant[i] - 1; } int rh = extra / RADIX; @@ -1322,14 +1309,16 @@ public class Dfp implements RealFieldElement { rsign = asign; } - /* Handle special case when a or b is zero, by setting the exponent - of the zero number equal to the other one. This avoids an alignment - which would cause catastropic loss of precision */ - if (b.mant[mant.length-1] == 0) { + /* + * Handle special case when a or b is zero, by setting the exponent of the zero + * number equal to the other one. This avoids an alignment which would cause + * catastropic loss of precision + */ + if (b.mant[mant.length - 1] == 0) { b.exp = a.exp; } - if (a.mant[mant.length-1] == 0) { + if (a.mant[mant.length - 1] == 0) { a.exp = b.exp; } @@ -1354,7 +1343,7 @@ public class Dfp implements RealFieldElement { /* add the mantissas */ int rh = 0; /* acts as a carry */ for (int i = 0; i < mant.length; i++) { - final int r = a.mant[i]+b.mant[i]+rh; + final int r = a.mant[i] + b.mant[i] + rh; rh = r / RADIX; result.mant[i] = r - rh * RADIX; } @@ -1367,7 +1356,7 @@ public class Dfp implements RealFieldElement { if (rh != 0 && (asign == bsign)) { final int lostdigit = result.mant[0]; result.shiftRight(); - result.mant[mant.length-1] = rh; + result.mant[mant.length - 1] = rh; final int excp = result.round(lostdigit); if (excp != 0) { result = dotrap(excp, ADD_TRAP, x, result); @@ -1376,19 +1365,19 @@ public class Dfp implements RealFieldElement { /* normalize the result */ for (int i = 0; i < mant.length; i++) { - if (result.mant[mant.length-1] != 0) { + if (result.mant[mant.length - 1] != 0) { break; } result.shiftLeft(); if (i == 0) { - result.mant[0] = aextradigit+bextradigit; + result.mant[0] = aextradigit + bextradigit; aextradigit = 0; bextradigit = 0; } } /* result is zero if after normalization the most sig. digit is zero */ - if (result.mant[mant.length-1] == 0) { + if (result.mant[mant.length - 1] == 0) { result.exp = 0; if (asign != bsign) { @@ -1412,7 +1401,7 @@ public class Dfp implements RealFieldElement { @Override public Dfp negate() { Dfp result = newInstance(this); - result.sign = (byte) - result.sign; + result.sign = (byte) -result.sign; return result; } @@ -1432,38 +1421,38 @@ public class Dfp implements RealFieldElement { protected int round(int n) { boolean inc = false; switch (field.getRoundingMode()) { - case ROUND_DOWN: - inc = false; - break; + case ROUND_DOWN: + inc = false; + break; - case ROUND_UP: - inc = n != 0; // round up if n!=0 - break; + case ROUND_UP: + inc = n != 0; // round up if n!=0 + break; - case ROUND_HALF_UP: - inc = n >= 5000; // round half up - break; + case ROUND_HALF_UP: + inc = n >= 5000; // round half up + break; - case ROUND_HALF_DOWN: - inc = n > 5000; // round half down - break; + case ROUND_HALF_DOWN: + inc = n > 5000; // round half down + break; - case ROUND_HALF_EVEN: - inc = n > 5000 || (n == 5000 && (mant[0] & 1) == 1); // round half-even - break; + case ROUND_HALF_EVEN: + inc = n > 5000 || (n == 5000 && (mant[0] & 1) == 1); // round half-even + break; - case ROUND_HALF_ODD: - inc = n > 5000 || (n == 5000 && (mant[0] & 1) == 0); // round half-odd - break; + case ROUND_HALF_ODD: + inc = n > 5000 || (n == 5000 && (mant[0] & 1) == 0); // round half-odd + break; - case ROUND_CEIL: - inc = sign == 1 && n != 0; // round ceil - break; + case ROUND_CEIL: + inc = sign == 1 && n != 0; // round ceil + break; - case ROUND_FLOOR: - default: - inc = sign == -1 && n != 0; // round floor - break; + case ROUND_FLOOR: + default: + inc = sign == -1 && n != 0; // round floor + break; } if (inc) { @@ -1477,7 +1466,7 @@ public class Dfp implements RealFieldElement { if (rh != 0) { shiftRight(); - mant[mant.length-1] = rh; + mant[mant.length - 1] = rh; } } @@ -1531,13 +1520,13 @@ public class Dfp implements RealFieldElement { return x; } - if (nans == INFINITE && x.nans == FINITE && x.mant[mant.length-1] != 0) { + if (nans == INFINITE && x.nans == FINITE && x.mant[mant.length - 1] != 0) { result = newInstance(this); result.sign = (byte) (sign * x.sign); return result; } - if (x.nans == INFINITE && nans == FINITE && mant[mant.length-1] != 0) { + if (x.nans == INFINITE && nans == FINITE && mant[mant.length - 1] != 0) { result = newInstance(x); result.sign = (byte) (sign * x.sign); return result; @@ -1549,8 +1538,8 @@ public class Dfp implements RealFieldElement { return result; } - if ( (x.nans == INFINITE && nans == FINITE && mant[mant.length-1] == 0) || - (nans == INFINITE && x.nans == FINITE && x.mant[mant.length-1] == 0) ) { + if ((x.nans == INFINITE && nans == FINITE && mant[mant.length - 1] == 0) || + (nans == INFINITE && x.nans == FINITE && x.mant[mant.length - 1] == 0)) { field.setIEEEFlagsBits(DfpField.FLAG_INVALID); result = newInstance(getZero()); result.nans = QNAN; @@ -1559,18 +1548,18 @@ public class Dfp implements RealFieldElement { } } - int[] product = new int[mant.length*2]; // Big enough to hold even the largest result + int[] product = new int[mant.length * 2]; // Big enough to hold even the largest result for (int i = 0; i < mant.length; i++) { - int rh = 0; // acts as a carry - for (int j=0; j { // Fixup the exponent. result.exp = exp + x.exp + md - 2 * mant.length + 1; - result.sign = (byte)((sign == x.sign)?1:-1); + result.sign = (byte) ((sign == x.sign) ? 1 : -1); - if (result.mant[mant.length-1] == 0) { + if (result.mant[mant.length - 1] == 0) { // if result is zero, set exp to zero result.exp = 0; } final int excp; - if (md > (mant.length-1)) { - excp = result.round(product[md-mant.length]); + if (md > (mant.length - 1)) { + excp = result.round(product[md - mant.length]); } else { excp = result.round(0); // has no effect except to check status } @@ -1672,10 +1661,10 @@ public class Dfp implements RealFieldElement { if (rh != 0) { lostdigit = result.mant[0]; result.shiftRight(); - result.mant[mant.length-1] = rh; + result.mant[mant.length - 1] = rh; } - if (result.mant[mant.length-1] == 0) { // if result is zero, set exp to zero + if (result.mant[mant.length - 1] == 0) { // if result is zero, set exp to zero result.exp = 0; } @@ -1693,16 +1682,16 @@ public class Dfp implements RealFieldElement { */ @Override public Dfp divide(Dfp divisor) { - int dividend[]; // current status of the dividend - int quotient[]; // quotient - int remainder[];// remainder - int qd; // current quotient digit we're working with - int nsqd; // number of significant quotient digits we have - int trial=0; // trial quotient digit - int minadj; // minimum adjustment + int[] dividend; // current status of the dividend + int[] quotient; // quotient + int[] remainder; // remainder + int qd; // current quotient digit we're working with + int nsqd; // number of significant quotient digits we have + int trial = 0; // trial quotient digit + int minadj; // minimum adjustment boolean trialgood; // Flag to indicate a good trail digit - int md=0; // most sig digit in result - int excp; // exceptions + int md = 0; // most sig digit in result + int excp; // exceptions // make sure we don't mix number with different precision if (field.getRadixDigits() != divisor.field.getRadixDigits()) { @@ -1746,7 +1735,7 @@ public class Dfp implements RealFieldElement { } /* Test for divide by zero */ - if (divisor.mant[mant.length-1] == 0) { + if (divisor.mant[mant.length - 1] == 0) { field.setIEEEFlagsBits(DfpField.FLAG_DIV_ZERO); result = newInstance(getZero()); result.sign = (byte) (sign * divisor.sign); @@ -1755,19 +1744,18 @@ public class Dfp implements RealFieldElement { return result; } - dividend = new int[mant.length+1]; // one extra digit needed - quotient = new int[mant.length+2]; // two extra digits needed 1 for overflow, 1 for rounding - remainder = new int[mant.length+1]; // one extra digit needed + dividend = new int[mant.length + 1]; // one extra digit needed + quotient = new int[mant.length + 2]; // two extra digits needed 1 for overflow, 1 for rounding + remainder = new int[mant.length + 1]; // one extra digit needed /* Initialize our most significant digits to zero */ dividend[mant.length] = 0; quotient[mant.length] = 0; - quotient[mant.length+1] = 0; + quotient[mant.length + 1] = 0; remainder[mant.length] = 0; - /* copy our mantissa into the dividend, initialize the - quotient while we are at it */ + /* copy our mantissa into the dividend, initialize the quotient while we are at it */ for (int i = 0; i < mant.length; i++) { dividend[i] = mant[i]; @@ -1777,32 +1765,32 @@ public class Dfp implements RealFieldElement { /* outer loop. Once per quotient digit */ nsqd = 0; - for (qd = mant.length+1; qd >= 0; qd--) { + for (qd = mant.length + 1; qd >= 0; qd--) { /* Determine outer limits of our quotient digit */ // r = most sig 2 digits of dividend - final int divMsb = dividend[mant.length]*RADIX+dividend[mant.length-1]; - int min = divMsb / (divisor.mant[mant.length-1]+1); - int max = (divMsb + 1) / divisor.mant[mant.length-1]; + final int divMsb = dividend[mant.length] * RADIX + dividend[mant.length - 1]; + int min = divMsb / (divisor.mant[mant.length - 1] + 1); + int max = (divMsb + 1) / divisor.mant[mant.length - 1]; trialgood = false; while (!trialgood) { // try the mean - trial = (min+max)/2; + trial = (min + max) / 2; /* Multiply by divisor and store as remainder */ int rh = 0; for (int i = 0; i < mant.length + 1; i++) { - int dm = (i { /* Lets analyze what we have here */ if (rh == 0) { // trial is too big -- negative remainder - max = trial-1; + max = trial - 1; continue; } /* find out how far off the remainder is telling us we are */ - minadj = (remainder[mant.length] * RADIX)+remainder[mant.length-1]; - minadj /= divisor.mant[mant.length-1] + 1; + minadj = (remainder[mant.length] * RADIX) + remainder[mant.length - 1]; + minadj /= divisor.mant[mant.length - 1] + 1; if (minadj >= 2) { - min = trial+minadj; // update the minimum + min = trial + minadj; // update the minimum continue; } - /* May have a good one here, check more thoroughly. Basically - its a good one if it is less than the divisor */ + /* May have a good one here, check more thoroughly. Basically its a good + * one if it is less than the divisor */ trialgood = false; // assume false for (int i = mant.length - 1; i >= 0; i--) { if (divisor.mant[i] > remainder[i]) { @@ -1840,8 +1828,8 @@ public class Dfp implements RealFieldElement { trialgood = false; } - if (trialgood == false) { - min = trial+1; + if (!trialgood) { + min = trial + 1; } } @@ -1878,20 +1866,20 @@ public class Dfp implements RealFieldElement { } /* Copy the digits into the result */ - for (int i=0; i (mant.length-1)) { - excp = result.round(quotient[md-mant.length]); + if (md > (mant.length - 1)) { + excp = result.round(quotient[md - mant.length]); } else { excp = result.round(0); } @@ -1943,14 +1931,14 @@ public class Dfp implements RealFieldElement { Dfp result = newInstance(this); int rl = 0; - for (int i = mant.length-1; i >= 0; i--) { - final int r = rl*RADIX + result.mant[i]; + for (int i = mant.length - 1; i >= 0; i--) { + final int r = rl * RADIX + result.mant[i]; final int rh = r / divisor; rl = r - rh * divisor; result.mant[i] = rh; } - if (result.mant[mant.length-1] == 0) { + if (result.mant[mant.length - 1] == 0) { // normalize result.shiftLeft(); final int r = rl * RADIX; // compute the next digit and put it in @@ -1982,7 +1970,7 @@ public class Dfp implements RealFieldElement { public Dfp sqrt() { // check for unusual cases - if (nans == FINITE && mant[mant.length-1] == 0) { + if (nans == FINITE && mant[mant.length - 1] == 0) { // if zero return newInstance(this); } @@ -2026,18 +2014,18 @@ public class Dfp implements RealFieldElement { } /* Coarsely estimate the mantissa */ - switch (x.mant[mant.length-1] / 2000) { - case 0: - x.mant[mant.length-1] = x.mant[mant.length-1]/2+1; - break; - case 2: - x.mant[mant.length-1] = 1500; - break; - case 3: - x.mant[mant.length-1] = 2200; - break; - default: - x.mant[mant.length-1] = 3000; + switch (x.mant[mant.length - 1] / 2000) { + case 0: + x.mant[mant.length - 1] = x.mant[mant.length - 1] / 2 + 1; + break; + case 2: + x.mant[mant.length - 1] = 1500; + break; + case 3: + x.mant[mant.length - 1] = 2200; + break; + default: + x.mant[mant.length - 1] = 3000; } Dfp dx = newInstance(x); @@ -2063,7 +2051,7 @@ public class Dfp implements RealFieldElement { // if dx is zero, break. Note testing the most sig digit // is a sufficient test since dx is normalized - if (dx.mant[mant.length-1] == 0) { + if (dx.mant[mant.length - 1] == 0) { break; } } @@ -2098,8 +2086,8 @@ public class Dfp implements RealFieldElement { * @return string representation of the instance in scientific notation */ protected String dfp2sci() { - char rawdigits[] = new char[mant.length * 4]; - char outputbuffer[] = new char[mant.length * 4 + 20]; + char[] rawdigits = new char[mant.length * 4]; + char[] outputbuffer = new char[mant.length * 4 + 20]; int p; int q; int e; @@ -2110,7 +2098,7 @@ public class Dfp implements RealFieldElement { p = 0; for (int i = mant.length - 1; i >= 0; i--) { rawdigits[p++] = (char) ((mant[i] / 1000) + '0'); - rawdigits[p++] = (char) (((mant[i] / 100) %10) + '0'); + rawdigits[p++] = (char) (((mant[i] / 100) % 10) + '0'); rawdigits[p++] = (char) (((mant[i] / 10) % 10) + '0'); rawdigits[p++] = (char) (((mant[i]) % 10) + '0'); } @@ -2134,7 +2122,7 @@ public class Dfp implements RealFieldElement { outputbuffer[q++] = rawdigits[p++]; outputbuffer[q++] = '.'; - while (p { outputbuffer[q++] = '0'; outputbuffer[q++] = 'e'; outputbuffer[q++] = '0'; - return new String(outputbuffer, 0, 5); + return String.valueOf(outputbuffer, 0, 5); } outputbuffer[q++] = 'e'; @@ -2157,8 +2145,9 @@ public class Dfp implements RealFieldElement { } // Find the largest p such that p < e - for (p = 1000000000; p > ae; p /= 10) { - // nothing to do + p = 1000000000; + while (p > ae) { + p /= 10; } if (e < 0) { @@ -2171,15 +2160,14 @@ public class Dfp implements RealFieldElement { p /= 10; } - return new String(outputbuffer, 0, q); - + return String.valueOf(outputbuffer, 0, q); } /** Convert an instance to a string using normal notation. * @return string representation of the instance in normal notation */ protected String dfp2string() { - char buffer[] = new char[mant.length*4 + 20]; + char[] buffer = new char[mant.length * 4 + 20]; int p = 1; int q; int e = exp; @@ -2235,7 +2223,7 @@ public class Dfp implements RealFieldElement { } // Suppress trailing zeros - while (buffer[p-1] == '0') { + while (buffer[p - 1] == '0') { p--; } @@ -2244,8 +2232,7 @@ public class Dfp implements RealFieldElement { buffer[--q] = '-'; } - return new String(buffer, q, p - q); - + return String.valueOf(buffer, q, p - q); } /** Raises a trap. This does not set the corresponding flag however. @@ -2259,55 +2246,55 @@ public class Dfp implements RealFieldElement { Dfp def = result; switch (type) { - case DfpField.FLAG_INVALID: + case DfpField.FLAG_INVALID: + def = newInstance(getZero()); + def.sign = result.sign; + def.nans = QNAN; + break; + + case DfpField.FLAG_DIV_ZERO: + if (nans == FINITE && mant[mant.length - 1] != 0) { + // normal case, we are finite, non-zero def = newInstance(getZero()); - def.sign = result.sign; - def.nans = QNAN; - break; - - case DfpField.FLAG_DIV_ZERO: - if (nans == FINITE && mant[mant.length-1] != 0) { - // normal case, we are finite, non-zero - def = newInstance(getZero()); - def.sign = (byte)(sign*oper.sign); - def.nans = INFINITE; - } - - if (nans == FINITE && mant[mant.length-1] == 0) { - // 0/0 - def = newInstance(getZero()); - def.nans = QNAN; - } - - if (nans == INFINITE || nans == QNAN) { - def = newInstance(getZero()); - def.nans = QNAN; - } - - if (nans == INFINITE || nans == SNAN) { - def = newInstance(getZero()); - def.nans = QNAN; - } - break; - - case DfpField.FLAG_UNDERFLOW: - if ( (result.exp+mant.length) < MIN_EXP) { - def = newInstance(getZero()); - def.sign = result.sign; - } else { - def = newInstance(result); // gradual underflow - } - result.exp += ERR_SCALE; - break; - - case DfpField.FLAG_OVERFLOW: - result.exp -= ERR_SCALE; - def = newInstance(getZero()); - def.sign = result.sign; + def.sign = (byte) (sign * oper.sign); def.nans = INFINITE; - break; + } - default: def = result; break; + if (nans == FINITE && mant[mant.length - 1] == 0) { + // 0/0 + def = newInstance(getZero()); + def.nans = QNAN; + } + + if (nans == INFINITE || nans == QNAN) { + def = newInstance(getZero()); + def.nans = QNAN; + } + + if (nans == INFINITE || nans == SNAN) { + def = newInstance(getZero()); + def.nans = QNAN; + } + break; + + case DfpField.FLAG_UNDERFLOW: + if ((result.exp + mant.length) < MIN_EXP) { + def = newInstance(getZero()); + def.sign = result.sign; + } else { + def = newInstance(result); // gradual underflow + } + result.exp += ERR_SCALE; + break; + + case DfpField.FLAG_OVERFLOW: + result.exp -= ERR_SCALE; + def = newInstance(getZero()); + def.sign = result.sign; + def.nans = INFINITE; + break; + + default: def = result; break; } return trap(type, what, oper, def, result); @@ -2381,11 +2368,11 @@ public class Dfp implements RealFieldElement { Dfp result; if (up) { inc = newInstance(getOne()); - inc.exp = this.exp-mant.length+1; + inc.exp = this.exp - mant.length + 1; inc.sign = this.sign; if (this.equals(getZero())) { - inc.exp = MIN_EXP-mant.length; + inc.exp = MIN_EXP - mant.length; } result = add(inc); @@ -2395,13 +2382,13 @@ public class Dfp implements RealFieldElement { inc.sign = this.sign; if (this.equals(inc)) { - inc.exp = this.exp-mant.length; + inc.exp = this.exp - mant.length; } else { - inc.exp = this.exp-mant.length+1; + inc.exp = this.exp - mant.length + 1; } if (this.equals(getZero())) { - inc.exp = MIN_EXP-mant.length; + inc.exp = MIN_EXP - mant.length; } result = this.subtract(inc); @@ -2412,13 +2399,12 @@ public class Dfp implements RealFieldElement { result = dotrap(DfpField.FLAG_INEXACT, NEXT_AFTER_TRAP, x, result); } - if (result.equals(getZero()) && this.equals(getZero()) == false) { + if (result.equals(getZero()) && !this.equals(getZero())) { field.setIEEEFlagsBits(DfpField.FLAG_INEXACT); result = dotrap(DfpField.FLAG_INEXACT, NEXT_AFTER_TRAP, x, result); } return result; - } /** Convert the instance into a double. @@ -2479,9 +2465,9 @@ public class Dfp implements RealFieldElement { } - y = y.multiply(newInstance(4503599627370496l)).rint(); + y = y.multiply(newInstance(4503599627370496L)).rint(); String str = y.toString(); - str = str.substring(0, str.length()-1); + str = str.substring(0, str.length() - 1); long mantissa = Long.parseLong(str); if (mantissa == 4503599627370496L) { @@ -2508,7 +2494,6 @@ public class Dfp implements RealFieldElement { } return x; - } /** Convert the instance into a split double. @@ -2516,7 +2501,7 @@ public class Dfp implements RealFieldElement { * @see #toDouble() */ public double[] toSplitDouble() { - double split[] = new double[2]; + double[] split = new double[2]; long mask = 0xffffffffc0000000L; split[0] = Double.longBitsToDouble(Double.doubleToLongBits(toDouble()) & mask); diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpDec.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpDec.java index 4e1205342..a083bc2cf 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpDec.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpDec.java @@ -163,7 +163,7 @@ public class DfpDec extends Dfp { @Override protected int round(int in) { - int msb = mant[mant.length-1]; + int msb = mant[mant.length - 1]; if (msb == 0) { // special case -- this == zero return 0; @@ -173,7 +173,7 @@ public class DfpDec extends Dfp { int lsbthreshold = 1000; while (lsbthreshold > msb) { lsbthreshold /= 10; - cmaxdigits --; + cmaxdigits--; } @@ -196,12 +196,12 @@ public class DfpDec extends Dfp { final int n; if (lsbthreshold == 1) { // look to the next digit for rounding - n = (mant[lsd-1] / 1000) % 10; - mant[lsd-1] %= 1000; - discarded |= mant[lsd-1]; + n = (mant[lsd - 1] / 1000) % 10; + mant[lsd - 1] %= 1000; + discarded |= mant[lsd - 1]; } else { n = (lsb * 10 / lsbthreshold) % 10; - discarded |= lsb % (lsbthreshold/10); + discarded |= lsb % (lsbthreshold / 10); } for (int i = 0; i < lsd; i++) { @@ -213,42 +213,42 @@ public class DfpDec extends Dfp { final boolean inc; switch (getField().getRoundingMode()) { - case ROUND_DOWN: - inc = false; - break; + case ROUND_DOWN: + inc = false; + break; - case ROUND_UP: - inc = (n != 0) || (discarded != 0); // round up if n!=0 - break; + case ROUND_UP: + inc = (n != 0) || (discarded != 0); // round up if n!=0 + break; - case ROUND_HALF_UP: - inc = n >= 5; // round half up - break; + case ROUND_HALF_UP: + inc = n >= 5; // round half up + break; - case ROUND_HALF_DOWN: - inc = n > 5; // round half down - break; + case ROUND_HALF_DOWN: + inc = n > 5; // round half down + break; - case ROUND_HALF_EVEN: - inc = (n > 5) || - (n == 5 && discarded != 0) || - (n == 5 && discarded == 0 && ((lsb / lsbthreshold) & 1) == 1); // round half-even - break; + case ROUND_HALF_EVEN: + inc = (n > 5) || + (n == 5 && discarded != 0) || + (n == 5 && discarded == 0 && ((lsb / lsbthreshold) & 1) == 1); // round half-even + break; - case ROUND_HALF_ODD: - inc = (n > 5) || - (n == 5 && discarded != 0) || - (n == 5 && discarded == 0 && ((lsb / lsbthreshold) & 1) == 0); // round half-odd - break; + case ROUND_HALF_ODD: + inc = (n > 5) || + (n == 5 && discarded != 0) || + (n == 5 && discarded == 0 && ((lsb / lsbthreshold) & 1) == 0); // round half-odd + break; - case ROUND_CEIL: - inc = (sign == 1) && (n != 0 || discarded != 0); // round ceil - break; + case ROUND_CEIL: + inc = (sign == 1) && (n != 0 || discarded != 0); // round ceil + break; - case ROUND_FLOOR: - default: - inc = (sign == -1) && (n != 0 || discarded != 0); // round floor - break; + case ROUND_FLOOR: + default: + inc = (sign == -1) && (n != 0 || discarded != 0); // round floor + break; } if (inc) { @@ -262,7 +262,7 @@ public class DfpDec extends Dfp { if (rh != 0) { shiftRight(); - mant[mant.length-1]=rh; + mant[mant.length - 1] = rh; } } @@ -323,7 +323,7 @@ public class DfpDec extends Dfp { inc = copysign(inc, this); if (this.equals(getZero())) { - inc = power10K(MIN_EXP-mant.length-1); + inc = power10K(MIN_EXP - mant.length - 1); } if (inc.equals(getZero())) { @@ -342,7 +342,7 @@ public class DfpDec extends Dfp { } if (this.equals(getZero())) { - inc = power10K(MIN_EXP-mant.length-1); + inc = power10K(MIN_EXP - mant.length - 1); } if (inc.equals(getZero())) { @@ -357,7 +357,7 @@ public class DfpDec extends Dfp { result = dotrap(DfpField.FLAG_INEXACT, trapName, x, result); } - if (result.equals(getZero()) && this.equals(getZero()) == false) { + if (result.equals(getZero()) && !this.equals(getZero())) { getField().setIEEEFlagsBits(DfpField.FLAG_INEXACT); result = dotrap(DfpField.FLAG_INEXACT, trapName, x, result); } diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpField.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpField.java index 10b30cd3a..5adbbe6f6 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpField.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpField.java @@ -529,48 +529,47 @@ public class DfpField implements Field { * @return an array of two {@link Dfp Dfp} instances which sum equals a */ private Dfp[] split(final String a) { - Dfp result[] = new Dfp[2]; - boolean leading = true; - int sp = 0; - int sig = 0; + Dfp[] result = new Dfp[2]; + boolean leading = true; + int sp = 0; + int sig = 0; - char[] buf = new char[a.length()]; + char[] buf = new char[a.length()]; - for (int i = 0; i < buf.length; i++) { - buf[i] = a.charAt(i); + for (int i = 0; i < buf.length; i++) { + buf[i] = a.charAt(i); - if (buf[i] >= '1' && buf[i] <= '9') { - leading = false; + if (buf[i] >= '1' && buf[i] <= '9') { + leading = false; + } + + if (buf[i] == '.') { + sig += (400 - sig) % 4; + leading = false; + } + + if (sig == (radixDigits / 2) * 4) { + sp = i; + break; + } + + if (buf[i] >= '0' && buf[i] <= '9' && !leading) { + sig++; + } } - if (buf[i] == '.') { - sig += (400 - sig) % 4; - leading = false; + result[0] = new Dfp(this, String.valueOf(buf, 0, sp)); + + for (int i = 0; i < buf.length; i++) { + buf[i] = a.charAt(i); + if (buf[i] >= '0' && buf[i] <= '9' && i < sp) { + buf[i] = '0'; + } } - if (sig == (radixDigits / 2) * 4) { - sp = i; - break; - } - - if (buf[i] >= '0' && buf[i] <= '9' && !leading) { - sig ++; - } - } - - result[0] = new Dfp(this, new String(buf, 0, sp)); - - for (int i = 0; i < buf.length; i++) { - buf[i] = a.charAt(i); - if (buf[i] >= '0' && buf[i] <= '9' && i < sp) { - buf[i] = '0'; - } - } - - result[1] = new Dfp(this, new String(buf)); - - return result; + result[1] = new Dfp(this, String.valueOf(buf)); + return result; } /** Recompute the high precision string constants. diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpMath.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpMath.java index b1b98561d..2c41bc648 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpMath.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/dfp/DfpMath.java @@ -21,7 +21,7 @@ package org.apache.commons.math4.legacy.core.dfp; * The constants are defined in {@link DfpField} * @since 2.2 */ -public class DfpMath { +public final class DfpMath { /** Name for traps triggered by pow. */ private static final String POW_TRAP = "pow"; @@ -42,7 +42,7 @@ public class DfpMath { * @return an array of two {@link Dfp} which sum is a */ protected static Dfp[] split(final DfpField field, final String a) { - Dfp result[] = new Dfp[2]; + Dfp[] result = new Dfp[2]; char[] buf; boolean leading = true; int sp = 0; @@ -68,11 +68,11 @@ public class DfpMath { } if (buf[i] >= '0' && buf[i] <= '9' && !leading) { - sig ++; + sig++; } } - result[0] = field.newDfp(new String(buf, 0, sp)); + result[0] = field.newDfp(String.valueOf(buf, 0, sp)); for (int i = 0; i < buf.length; i++) { buf[i] = a.charAt(i); @@ -81,7 +81,7 @@ public class DfpMath { } } - result[1] = field.newDfp(new String(buf)); + result[1] = field.newDfp(String.valueOf(buf)); return result; } @@ -199,7 +199,6 @@ public class DfpMath { } return result[0]; - } /** Raises base to the power a by successive squaring. @@ -207,8 +206,7 @@ public class DfpMath { * @param a power * @return basea */ - public static Dfp pow(Dfp base, int a) - { + public static Dfp pow(Dfp base, int a) { boolean invert = false; Dfp result = base.getOne(); @@ -235,7 +233,7 @@ public class DfpMath { prevtrial = trial; r = r.multiply(r); trial *= 2; - } while (a>trial); + } while (a > trial); r = prevr; trial = prevtrial; @@ -250,7 +248,6 @@ public class DfpMath { } return base.newInstance(result); - } /** Computes e to the given power. @@ -359,14 +356,14 @@ public class DfpMath { // X is now in the range of 2/3 < x < 4/3 Dfp[] spz = logInternal(spx); - spx[0] = a.newInstance(new StringBuilder().append(p2+4*lr).toString()); + spx[0] = a.newInstance(new StringBuilder().append(p2 + 4 * lr).toString()); spx[1] = a.getZero(); spy = splitMult(a.getField().getLn2Split(), spx); spz[0] = spz[0].add(spy[0]); spz[1] = spz[1].add(spy[1]); - spx[0] = a.newInstance(new StringBuilder().append(4*lr).toString()); + spx[0] = a.newInstance(new StringBuilder().append(4 * lr).toString()); spx[1] = a.getZero(); spy = splitMult(a.getField().getLn5Split(), spx); @@ -374,7 +371,6 @@ public class DfpMath { spz[1] = spz[1].add(spy[1]); return a.newInstance(spz[0].add(spz[1])); - } /** Computes the natural log of a number between 0 and 2. @@ -434,7 +430,7 @@ public class DfpMath { * @param a number from which logarithm is requested, in split form * @return log(a) */ - protected static Dfp[] logInternal(final Dfp a[]) { + protected static Dfp[] logInternal(final Dfp[] a) { /* Now we want to compute x = (a-1)/(a+1) but this is prone to * loss of precision. So instead, compute x = (a/4 - 1/4) / (a/4 + 1/4) @@ -669,7 +665,7 @@ public class DfpMath { * @param a number from which sine is desired, in split form * @return sin(a) */ - protected static Dfp sinInternal(Dfp a[]) { + protected static Dfp sinInternal(Dfp[] a) { Dfp c = a[0].add(a[1]); Dfp y = c; @@ -682,7 +678,7 @@ public class DfpMath { x = x.multiply(c); x = x.negate(); - fact = fact.divide((i-1)*i); // 1 over fact + fact = fact.divide((i - 1) * i); // 1 over fact y = y.add(x.multiply(fact)); if (y.equals(py)) { break; @@ -699,7 +695,7 @@ public class DfpMath { * @param a number from which cosine is desired, in split form * @return cos(a) */ - protected static Dfp cosInternal(Dfp a[]) { + protected static Dfp cosInternal(Dfp[] a) { final Dfp one = a[0].getOne(); @@ -759,7 +755,7 @@ public class DfpMath { if (x.lessThan(pi.divide(4))) { y = sinInternal(split(x)); } else { - final Dfp c[] = new Dfp[2]; + final Dfp[] c = new Dfp[2]; final Dfp[] piSplit = a.getField().getPiSplit(); c[0] = piSplit[0].divide(2).subtract(x); c[1] = piSplit[1].divide(2); @@ -803,13 +799,13 @@ public class DfpMath { Dfp y; if (x.lessThan(pi.divide(4))) { - Dfp c[] = new Dfp[2]; + Dfp[] c = new Dfp[2]; c[0] = x; c[1] = zero; y = cosInternal(c); } else { - final Dfp c[] = new Dfp[2]; + final Dfp[] c = new Dfp[2]; final Dfp[] piSplit = a.getField().getPiSplit(); c[0] = piSplit[0].divide(2).subtract(x); c[1] = piSplit[1].divide(2); @@ -857,7 +853,7 @@ public class DfpMath { } - /** computes the arc tangent of the argument + /** Computes the arc tangent of the argument. * * Uses the typical taylor series * @@ -893,7 +889,7 @@ public class DfpMath { } if (x.greaterThan(ty)) { - Dfp sty[] = new Dfp[2]; + Dfp[] sty = new Dfp[2]; sub = true; sty[0] = sqr2Split[0].subtract(one); diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMath.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMath.java index a6307fb36..cf86c9327 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMath.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMath.java @@ -85,7 +85,7 @@ import org.apache.commons.math4.legacy.exception.util.LocalizedFormats; * * @since 2.2 */ -public class AccurateMath { +public final class AccurateMath { /** Archimede's constant PI, ratio of circle circumference to diameter. */ public static final double PI = 105414357.0 / 33554432.0 + 1.984187159361080883e-9; @@ -101,7 +101,7 @@ public class AccurateMath { /** Exponential fractions table length. */ static final int EXP_FRAC_TABLE_LEN = 1025; // 0, 1/1024, ... 1024/1024 - /** StrictMath.log(Double.MAX_VALUE): {@value} */ + /** StrictMath.log(Double.MAX_VALUE): {@value}. */ private static final double LOG_MAX_VALUE = StrictMath.log(Double.MAX_VALUE); /** Indicator for tables initialization. @@ -120,7 +120,7 @@ public class AccurateMath { private static final double LN_2_B = 1.17304635250823482e-7; /** Coefficients for log, when input 0.99 < x < 1.01. */ - private static final double LN_QUICK_COEF[][] = { + private static final double[][] LN_QUICK_COEF = { {1.0, 5.669184079525E-24}, {-0.25, -0.25}, {0.3333333134651184, 1.986821492305628E-8}, @@ -133,7 +133,7 @@ public class AccurateMath { }; /** Coefficients for log in the range of 1.0 < x < 1.0 + 2^-10. */ - private static final double LN_HI_PREC_COEF[][] = { + private static final double[][] LN_HI_PREC_COEF = { {1.0, -6.032174644509064E-23}, {-0.25, -0.25}, {0.3333333134651184, 1.9868161777724352E-8}, @@ -146,7 +146,7 @@ public class AccurateMath { private static final int SINE_TABLE_LEN = 14; /** Sine table (high bits). */ - private static final double SINE_TABLE_A[] = + private static final double[] SINE_TABLE_A = { +0.0d, +0.1246747374534607d, @@ -165,7 +165,7 @@ public class AccurateMath { }; /** Sine table (low bits). */ - private static final double SINE_TABLE_B[] = + private static final double[] SINE_TABLE_B = { +0.0d, -4.068233003401932E-9d, @@ -184,7 +184,7 @@ public class AccurateMath { }; /** Cosine table (high bits). */ - private static final double COSINE_TABLE_A[] = + private static final double[] COSINE_TABLE_A = { +1.0d, +0.9921976327896118d, @@ -203,7 +203,7 @@ public class AccurateMath { }; /** Cosine table (low bits). */ - private static final double COSINE_TABLE_B[] = + private static final double[] COSINE_TABLE_B = { +0.0d, +3.4439717236742845E-8d, @@ -223,7 +223,7 @@ public class AccurateMath { /** Tangent table, used by atan() (high bits). */ - private static final double TANGENT_TABLE_A[] = + private static final double[] TANGENT_TABLE_A = { +0.0d, +0.1256551444530487d, @@ -242,7 +242,7 @@ public class AccurateMath { }; /** Tangent table, used by atan() (low bits). */ - private static final double TANGENT_TABLE_B[] = + private static final double[] TANGENT_TABLE_B = { +0.0d, -7.877917738262007E-9d, @@ -261,7 +261,7 @@ public class AccurateMath { }; /** Bits of 1/(2*pi), need for reducePayneHanek(). */ - private static final long RECIP_2PI[] = new long[] { + private static final long[] RECIP_2PI = new long[] { (0x28be60dbL << 32) | 0x9391054aL, (0x7f09d5f4L << 32) | 0x7d4d3770L, (0x36d8a566L << 32) | 0x4f10e410L, @@ -279,10 +279,10 @@ public class AccurateMath { (0xd3d18fd9L << 32) | 0xa797fa8bL, (0x5d49eeb1L << 32) | 0xfaf97c5eL, (0xcf41ce7dL << 32) | 0xe294a4baL, - 0x9afed7ecL << 32 }; + (0x9afed7ecL << 32)}; /** Bits of pi/4, need for reducePayneHanek(). */ - private static final long PI_O_4_BITS[] = new long[] { + private static final long[] PI_O_4_BITS = new long[] { (0xc90fdaa2L << 32) | 0x2168c234L, (0xc4c6628bL << 32) | 0x80dc1cd1L }; @@ -290,14 +290,15 @@ public class AccurateMath { * This is used by sinQ, because its faster to do a table lookup than * a multiply in this time-critical routine */ - private static final double EIGHTHS[] = {0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.375, 1.5, 1.625}; + private static final double[] EIGHTHS = { + 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.375, 1.5, 1.625}; - /** Table of 2^((n+2)/3) */ - private static final double CBRTTWO[] = { 0.6299605249474366, - 0.7937005259840998, - 1.0, - 1.2599210498948732, - 1.5874010519681994 }; + /** Table of 2^((n+2)/3). */ + private static final double[] CBRTTWO = {0.6299605249474366, + 0.7937005259840998, + 1.0, + 1.2599210498948732, + 1.5874010519681994}; /* * There are 52 bits in the mantissa of a double. @@ -312,14 +313,14 @@ public class AccurateMath { */ private static final long HEX_40000000 = 0x40000000L; // 1073741824L - /** Mask used to clear low order 30 bits */ - private static final long MASK_30BITS = -1L - (HEX_40000000 -1); // 0xFFFFFFFFC0000000L; + /** Mask used to clear low order 30 bits. */ + private static final long MASK_30BITS = -1L - (HEX_40000000 - 1); // 0xFFFFFFFFC0000000L; /** Mask used to clear the non-sign part of an int. */ private static final int MASK_NON_SIGN_INT = 0x7fffffff; /** Mask used to clear the non-sign part of a long. */ - private static final long MASK_NON_SIGN_LONG = 0x7fffffffffffffffl; + private static final long MASK_NON_SIGN_LONG = 0x7fffffffffffffffL; /** Mask used to extract exponent from double bits. */ private static final long MASK_DOUBLE_EXPONENT = 0x7ff0000000000000L; @@ -330,7 +331,7 @@ public class AccurateMath { /** Mask used to add implicit high order bit for normalized double. */ private static final long IMPLICIT_HIGH_BIT = 0x0010000000000000L; - /** 2^52 - double numbers this large must be integral (no fraction) or NaN or Infinite */ + /** 2^52 - double numbers this large must be integral (no fraction) or NaN or Infinite. */ private static final double TWO_POWER_52 = 4503599627370496.0; /** Constant: {@value}. */ @@ -369,7 +370,7 @@ public class AccurateMath { private static final double F_1_4 = 1d / 4d; /** - * Private Constructor + * Private Constructor. */ private AccurateMath() {} @@ -383,7 +384,7 @@ public class AccurateMath { * @return the high order part of the mantissa */ private static double doubleHighPart(double d) { - if (d > -Precision.SAFE_MIN && d < Precision.SAFE_MIN){ + if (d > -Precision.SAFE_MIN && d < Precision.SAFE_MIN) { return d; // These are un-normalised - don't try to convert } long xl = Double.doubleToRawLongBits(d); // can take raw bits because just gonna convert it back @@ -405,68 +406,68 @@ public class AccurateMath { * @return hyperbolic cosine of x */ public static double cosh(double x) { - if (Double.isNaN(x)) { - return x; - } + if (Double.isNaN(x)) { + return x; + } - // cosh[z] = (exp(z) + exp(-z))/2 + // cosh[z] = (exp(z) + exp(-z))/2 - // for numbers with magnitude 20 or so, - // exp(-z) can be ignored in comparison with exp(z) + // for numbers with magnitude 20 or so, + // exp(-z) can be ignored in comparison with exp(z) - if (x > 20) { - if (x >= LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(0.5 * x); - return (0.5 * t) * t; - } else { - return 0.5 * exp(x); - } - } else if (x < -20) { - if (x <= -LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(-0.5 * x); - return (0.5 * t) * t; - } else { - return 0.5 * exp(-x); - } - } + if (x > 20) { + if (x >= LOG_MAX_VALUE) { + // Avoid overflow (MATH-905). + final double t = exp(0.5 * x); + return (0.5 * t) * t; + } else { + return 0.5 * exp(x); + } + } else if (x < -20) { + if (x <= -LOG_MAX_VALUE) { + // Avoid overflow (MATH-905). + final double t = exp(-0.5 * x); + return (0.5 * t) * t; + } else { + return 0.5 * exp(-x); + } + } - final double hiPrec[] = new double[2]; - if (x < 0.0) { - x = -x; - } - exp(x, 0.0, hiPrec); + final double[] hiPrec = new double[2]; + if (x < 0.0) { + x = -x; + } + exp(x, 0.0, hiPrec); - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); + double ya = hiPrec[0] + hiPrec[1]; + double yb = -(ya - hiPrec[0] - hiPrec[1]); - double temp = ya * HEX_40000000; - double yaa = ya + temp - temp; - double yab = ya - yaa; + double temp = ya * HEX_40000000; + double yaa = ya + temp - temp; + double yab = ya - yaa; - // recip = 1/y - double recip = 1.0/ya; - temp = recip * HEX_40000000; - double recipa = recip + temp - temp; - double recipb = recip - recipa; + // recip = 1/y + double recip = 1.0 / ya; + temp = recip * HEX_40000000; + double recipa = recip + temp - temp; + double recipb = recip - recipa; - // Correct for rounding in division - recipb += (1.0 - yaa*recipa - yaa*recipb - yab*recipa - yab*recipb) * recip; - // Account for yb - recipb += -yb * recip * recip; + // Correct for rounding in division + recipb += (1.0 - yaa * recipa - yaa * recipb - yab * recipa - yab * recipb) * recip; + // Account for yb + recipb += -yb * recip * recip; - // y = y + 1/y - temp = ya + recipa; - yb += -(temp - ya - recipa); - ya = temp; - temp = ya + recipb; - yb += -(temp - ya - recipb); - ya = temp; + // y = y + 1/y + temp = ya + recipa; + yb += -(temp - ya - recipa); + ya = temp; + temp = ya + recipb; + yb += -(temp - ya - recipb); + ya = temp; - double result = ya + yb; - result *= 0.5; - return result; + double result = ya + yb; + result *= 0.5; + return result; } /** Compute the hyperbolic sine of a number. @@ -474,124 +475,123 @@ public class AccurateMath { * @return hyperbolic sine of x */ public static double sinh(double x) { - boolean negate = false; - if (Double.isNaN(x)) { - return x; - } + boolean negate = false; + if (Double.isNaN(x)) { + return x; + } - // sinh[z] = (exp(z) - exp(-z) / 2 + // sinh[z] = (exp(z) - exp(-z) / 2 - // for values of z larger than about 20, - // exp(-z) can be ignored in comparison with exp(z) + // for values of z larger than about 20, + // exp(-z) can be ignored in comparison with exp(z) - if (x > 20) { - if (x >= LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(0.5 * x); - return (0.5 * t) * t; - } else { - return 0.5 * exp(x); - } - } else if (x < -20) { - if (x <= -LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(-0.5 * x); - return (-0.5 * t) * t; - } else { - return -0.5 * exp(-x); - } - } + if (x > 20) { + if (x >= LOG_MAX_VALUE) { + // Avoid overflow (MATH-905). + final double t = exp(0.5 * x); + return (0.5 * t) * t; + } else { + return 0.5 * exp(x); + } + } else if (x < -20) { + if (x <= -LOG_MAX_VALUE) { + // Avoid overflow (MATH-905). + final double t = exp(-0.5 * x); + return (-0.5 * t) * t; + } else { + return -0.5 * exp(-x); + } + } - if (x == 0) { - return x; - } + if (x == 0) { + return x; + } - if (x < 0.0) { - x = -x; - negate = true; - } + if (x < 0.0) { + x = -x; + negate = true; + } - double result; + double result; - if (x > 0.25) { - double hiPrec[] = new double[2]; - exp(x, 0.0, hiPrec); + if (x > 0.25) { + double[] hiPrec = new double[2]; + exp(x, 0.0, hiPrec); - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); + double ya = hiPrec[0] + hiPrec[1]; + double yb = -(ya - hiPrec[0] - hiPrec[1]); - double temp = ya * HEX_40000000; - double yaa = ya + temp - temp; - double yab = ya - yaa; + double temp = ya * HEX_40000000; + double yaa = ya + temp - temp; + double yab = ya - yaa; - // recip = 1/y - double recip = 1.0/ya; - temp = recip * HEX_40000000; - double recipa = recip + temp - temp; - double recipb = recip - recipa; + // recip = 1/y + double recip = 1.0 / ya; + temp = recip * HEX_40000000; + double recipa = recip + temp - temp; + double recipb = recip - recipa; - // Correct for rounding in division - recipb += (1.0 - yaa*recipa - yaa*recipb - yab*recipa - yab*recipb) * recip; - // Account for yb - recipb += -yb * recip * recip; + // Correct for rounding in division + recipb += (1.0 - yaa * recipa - yaa * recipb - yab * recipa - yab * recipb) * recip; + // Account for yb + recipb += -yb * recip * recip; - recipa = -recipa; - recipb = -recipb; + recipa = -recipa; + recipb = -recipb; - // y = y + 1/y - temp = ya + recipa; - yb += -(temp - ya - recipa); - ya = temp; - temp = ya + recipb; - yb += -(temp - ya - recipb); - ya = temp; + // y = y + 1/y + temp = ya + recipa; + yb += -(temp - ya - recipa); + ya = temp; + temp = ya + recipb; + yb += -(temp - ya - recipb); + ya = temp; - result = ya + yb; - result *= 0.5; - } - else { - double hiPrec[] = new double[2]; - expm1(x, hiPrec); + result = ya + yb; + result *= 0.5; + } else { + double[] hiPrec = new double[2]; + expm1(x, hiPrec); - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); + double ya = hiPrec[0] + hiPrec[1]; + double yb = -(ya - hiPrec[0] - hiPrec[1]); - /* Compute expm1(-x) = -expm1(x) / (expm1(x) + 1) */ - double denom = 1.0 + ya; - double denomr = 1.0 / denom; - double denomb = -(denom - 1.0 - ya) + yb; - double ratio = ya * denomr; - double temp = ratio * HEX_40000000; - double ra = ratio + temp - temp; - double rb = ratio - ra; + /* Compute expm1(-x) = -expm1(x) / (expm1(x) + 1) */ + double denom = 1.0 + ya; + double denomr = 1.0 / denom; + double denomb = -(denom - 1.0 - ya) + yb; + double ratio = ya * denomr; + double temp = ratio * HEX_40000000; + double ra = ratio + temp - temp; + double rb = ratio - ra; - temp = denom * HEX_40000000; - double za = denom + temp - temp; - double zb = denom - za; + temp = denom * HEX_40000000; + double za = denom + temp - temp; + double zb = denom - za; - rb += (ya - za*ra - za*rb - zb*ra - zb*rb) * denomr; + rb += (ya - za * ra - za * rb - zb * ra - zb * rb) * denomr; - // Adjust for yb - rb += yb*denomr; // numerator - rb += -ya * denomb * denomr * denomr; // denominator + // Adjust for yb + rb += yb * denomr; // numerator + rb += -ya * denomb * denomr * denomr; // denominator - // y = y - 1/y - temp = ya + ra; - yb += -(temp - ya - ra); - ya = temp; - temp = ya + rb; - yb += -(temp - ya - rb); - ya = temp; + // y = y - 1/y + temp = ya + ra; + yb += -(temp - ya - ra); + ya = temp; + temp = ya + rb; + yb += -(temp - ya - rb); + ya = temp; - result = ya + yb; - result *= 0.5; - } + result = ya + yb; + result *= 0.5; + } - if (negate) { - result = -result; - } + if (negate) { + result = -result; + } - return result; + return result; } /** Compute the hyperbolic tangent of a number. @@ -599,123 +599,122 @@ public class AccurateMath { * @return hyperbolic tangent of x */ public static double tanh(double x) { - boolean negate = false; + boolean negate = false; - if (Double.isNaN(x)) { - return x; - } + if (Double.isNaN(x)) { + return x; + } - // tanh[z] = sinh[z] / cosh[z] - // = (exp(z) - exp(-z)) / (exp(z) + exp(-z)) - // = (exp(2x) - 1) / (exp(2x) + 1) + // tanh[z] = sinh[z] / cosh[z] + // = (exp(z) - exp(-z)) / (exp(z) + exp(-z)) + // = (exp(2x) - 1) / (exp(2x) + 1) - // for magnitude > 20, sinh[z] == cosh[z] in double precision + // for magnitude > 20, sinh[z] == cosh[z] in double precision - if (x > 20.0) { - return 1.0; - } + if (x > 20.0) { + return 1.0; + } - if (x < -20) { - return -1.0; - } + if (x < -20) { + return -1.0; + } - if (x == 0) { - return x; - } + if (x == 0) { + return x; + } - if (x < 0.0) { - x = -x; - negate = true; - } + if (x < 0.0) { + x = -x; + negate = true; + } - double result; - if (x >= 0.5) { - double hiPrec[] = new double[2]; - // tanh(x) = (exp(2x) - 1) / (exp(2x) + 1) - exp(x*2.0, 0.0, hiPrec); + double result; + if (x >= 0.5) { + double[] hiPrec = new double[2]; + // tanh(x) = (exp(2x) - 1) / (exp(2x) + 1) + exp(x * 2.0, 0.0, hiPrec); - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); + double ya = hiPrec[0] + hiPrec[1]; + double yb = -(ya - hiPrec[0] - hiPrec[1]); - /* Numerator */ - double na = -1.0 + ya; - double nb = -(na + 1.0 - ya); - double temp = na + yb; - nb += -(temp - na - yb); - na = temp; + /* Numerator */ + double na = -1.0 + ya; + double nb = -(na + 1.0 - ya); + double temp = na + yb; + nb += -(temp - na - yb); + na = temp; - /* Denominator */ - double da = 1.0 + ya; - double db = -(da - 1.0 - ya); - temp = da + yb; - db += -(temp - da - yb); - da = temp; + /* Denominator */ + double da = 1.0 + ya; + double db = -(da - 1.0 - ya); + temp = da + yb; + db += -(temp - da - yb); + da = temp; - temp = da * HEX_40000000; - double daa = da + temp - temp; - double dab = da - daa; + temp = da * HEX_40000000; + double daa = da + temp - temp; + double dab = da - daa; - // ratio = na/da - double ratio = na/da; - temp = ratio * HEX_40000000; - double ratioa = ratio + temp - temp; - double ratiob = ratio - ratioa; + // ratio = na/da + double ratio = na / da; + temp = ratio * HEX_40000000; + double ratioa = ratio + temp - temp; + double ratiob = ratio - ratioa; - // Correct for rounding in division - ratiob += (na - daa*ratioa - daa*ratiob - dab*ratioa - dab*ratiob) / da; + // Correct for rounding in division + ratiob += (na - daa * ratioa - daa * ratiob - dab * ratioa - dab * ratiob) / da; - // Account for nb - ratiob += nb / da; - // Account for db - ratiob += -db * na / da / da; + // Account for nb + ratiob += nb / da; + // Account for db + ratiob += -db * na / da / da; - result = ratioa + ratiob; - } - else { - double hiPrec[] = new double[2]; - // tanh(x) = expm1(2x) / (expm1(2x) + 2) - expm1(x*2.0, hiPrec); + result = ratioa + ratiob; + } else { + double[] hiPrec = new double[2]; + // tanh(x) = expm1(2x) / (expm1(2x) + 2) + expm1(x * 2.0, hiPrec); - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); + double ya = hiPrec[0] + hiPrec[1]; + double yb = -(ya - hiPrec[0] - hiPrec[1]); - /* Numerator */ - double na = ya; - double nb = yb; + /* Numerator */ + double na = ya; + double nb = yb; - /* Denominator */ - double da = 2.0 + ya; - double db = -(da - 2.0 - ya); - double temp = da + yb; - db += -(temp - da - yb); - da = temp; + /* Denominator */ + double da = 2.0 + ya; + double db = -(da - 2.0 - ya); + double temp = da + yb; + db += -(temp - da - yb); + da = temp; - temp = da * HEX_40000000; - double daa = da + temp - temp; - double dab = da - daa; + temp = da * HEX_40000000; + double daa = da + temp - temp; + double dab = da - daa; - // ratio = na/da - double ratio = na/da; - temp = ratio * HEX_40000000; - double ratioa = ratio + temp - temp; - double ratiob = ratio - ratioa; + // ratio = na/da + double ratio = na / da; + temp = ratio * HEX_40000000; + double ratioa = ratio + temp - temp; + double ratiob = ratio - ratioa; - // Correct for rounding in division - ratiob += (na - daa*ratioa - daa*ratiob - dab*ratioa - dab*ratiob) / da; + // Correct for rounding in division + ratiob += (na - daa * ratioa - daa * ratiob - dab * ratioa - dab * ratiob) / da; - // Account for nb - ratiob += nb / da; - // Account for db - ratiob += -db * na / da / da; + // Account for nb + ratiob += nb / da; + // Account for db + ratiob += -db * na / da / da; - result = ratioa + ratiob; - } + result = ratioa + ratiob; + } - if (negate) { - result = -result; - } + if (negate) { + result = -result; + } - return result; + return result; } /** Compute the inverse hyperbolic cosine of a number. @@ -900,7 +899,7 @@ public class AccurateMath { if (intVal < -709) { /* This will produce a subnormal output */ - final double result = exp(x+40.19140625, extra, hiPrec) / 285040095144011776.0; + final double result = exp(x + 40.19140625, extra, hiPrec) / 285040095144011776.0; if (hiPrec != null) { hiPrec[0] /= 285040095144011776.0; hiPrec[1] /= 285040095144011776.0; @@ -910,7 +909,7 @@ public class AccurateMath { if (intVal == -709) { /* exp(1.494140625) is nearly a machine number... */ - final double result = exp(x+1.494140625, extra, hiPrec) / 4.455505956692756620; + final double result = exp(x + 1.494140625, extra, hiPrec) / 4.455505956692756620; if (hiPrec != null) { hiPrec[0] /= 4.455505956692756620; hiPrec[1] /= 4.455505956692756620; @@ -931,8 +930,8 @@ public class AccurateMath { } - intPartA = ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX+intVal]; - intPartB = ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX+intVal]; + intPartA = ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX + intVal]; + intPartB = ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX + intVal]; /* Get the fractional part of x, find the greatest multiple of 2^-10 less than * x and look up the exp function of it. @@ -983,34 +982,35 @@ public class AccurateMath { final double result; if (extra != 0.0) { - result = tempC*extra*z + tempC*extra + tempC*z + tempB + tempA; + result = tempC * extra * z + tempC * extra + tempC * z + tempB + tempA; } else { - result = tempC*z + tempB + tempA; + result = tempC * z + tempB + tempA; } if (hiPrec != null) { // If requesting high precision hiPrec[0] = tempA; - hiPrec[1] = tempC*extra*z + tempC*extra + tempC*z + tempB; + hiPrec[1] = tempC * extra * z + tempC * extra + tempC * z + tempB; } return result; } - /** Compute exp(x) - 1 + /**Compute exp(x) - 1. + * * @param x number to compute shifted exponential * @return exp(x) - 1 */ public static double expm1(double x) { - return expm1(x, null); + return expm1(x, null); } - /** Internal helper method for expm1 + /** Internal helper method for expm1. * @param x number to compute shifted exponential * @param hiPrecOut receive high precision result for -1.0 < x < 1.0 * @return exp(x) - 1 */ - private static double expm1(double x, double hiPrecOut[]) { + private static double expm1(double x, double[] hiPrecOut) { if (Double.isNaN(x) || x == 0.0) { // NaN or zero return x; } @@ -1018,7 +1018,7 @@ public class AccurateMath { if (x <= -1.0 || x >= 1.0) { // If not between +/- 1.0 //return exp(x) - 1.0; - double hiPrec[] = new double[2]; + double[] hiPrec = new double[2]; exp(x, 0.0, hiPrec); if (x > 0.0) { return -1.0 + hiPrec[0] + hiPrec[1]; @@ -1040,21 +1040,19 @@ public class AccurateMath { negative = true; } - { - int intFrac = (int) (x * 1024.0); - double tempA = ExpFracTable.EXP_FRAC_TABLE_A[intFrac] - 1.0; - double tempB = ExpFracTable.EXP_FRAC_TABLE_B[intFrac]; + int intFrac = (int) (x * 1024.0); + double tempA = ExpFracTable.EXP_FRAC_TABLE_A[intFrac] - 1.0; + double tempB = ExpFracTable.EXP_FRAC_TABLE_B[intFrac]; - double temp = tempA + tempB; - tempB = -(temp - tempA - tempB); - tempA = temp; + double temp = tempA + tempB; + tempB = -(temp - tempA - tempB); + tempA = temp; - temp = tempA * HEX_40000000; - baseA = tempA + temp - temp; - baseB = tempB + (tempA - baseA); + temp = tempA * HEX_40000000; + baseA = tempA + temp - temp; + baseB = tempB + (tempA - baseA); - epsilon = x - intFrac/1024.0; - } + epsilon = x - intFrac / 1024.0; /* Compute expm1(epsilon) */ @@ -1066,7 +1064,7 @@ public class AccurateMath { zb *= epsilon; double za = epsilon; - double temp = za + zb; + temp = za + zb; zb = -(temp - za - zb); za = temp; @@ -1087,7 +1085,7 @@ public class AccurateMath { ya = temp; temp = ya + zb * baseB; - yb += -(temp - ya - zb*baseB); + yb += -(temp - ya - zb * baseB); ya = temp; //ya = ya + za + baseA; @@ -1169,7 +1167,7 @@ public class AccurateMath { * @return log(x) */ private static double log(final double x, final double[] hiPrec) { - if (x==0) { // Handle special case of +0/-0 + if (x == 0) { // Handle special case of +0/-0 return Double.NEGATIVE_INFINITY; } long bits = Double.doubleToRawLongBits(x); @@ -1193,7 +1191,7 @@ public class AccurateMath { } /* Extract the exponent */ - int exp = (int)(bits >> 52)-1023; + int exp = (int) (bits >> 52) - 1023; if ((bits & 0x7ff0000000000000L) == 0) { // Subnormal! @@ -1208,7 +1206,7 @@ public class AccurateMath { /* Normalize the subnormal number. */ bits <<= 1; - while ( (bits & 0x0010000000000000L) == 0) { + while ((bits & 0x0010000000000000L) == 0) { --exp; bits <<= 1; } @@ -1290,11 +1288,11 @@ public class AccurateMath { /* Need a more accurate epsilon, so adjust the division. */ final double numer = bits & 0x3ffffffffffL; final double denom = TWO_POWER_52 + (bits & 0x000ffc0000000000L); - aa = numer - xa*denom - xb * denom; + aa = numer - xa * denom - xb * denom; xb += aa / denom; /* Remez polynomial evaluation */ - final double[] lnCoef_last = LN_HI_PREC_COEF[LN_HI_PREC_COEF.length-1]; + final double[] lnCoef_last = LN_HI_PREC_COEF[LN_HI_PREC_COEF.length - 1]; double ya = lnCoef_last[0]; double yb = lnCoef_last[1]; @@ -1355,10 +1353,10 @@ public class AccurateMath { */ //return lnzb + lnm[1] + ln2B*exp + lnza + lnm[0] + ln2A*exp; - double a = LN_2_A*exp; + double a = LN_2_A * exp; double b = 0.0; - double c = a+lnm[0]; - double d = -(c-a-lnm[0]); + double c = a + lnm[0]; + double d = -(c - a - lnm[0]); a = c; b += d; @@ -1367,8 +1365,8 @@ public class AccurateMath { a = c; b += d; - c = a + LN_2_B*exp; - d = -(c - a - LN_2_B*exp); + c = a + LN_2_B * exp; + d = -(c - a - LN_2_B * exp); a = c; b += d; @@ -1433,10 +1431,10 @@ public class AccurateMath { * @return log10(x) */ public static double log10(final double x) { - final double hiPrec[] = new double[2]; + final double[] hiPrec = new double[2]; final double lores = log(x, hiPrec); - if (Double.isInfinite(lores)){ // don't allow this to be converted to NaN + if (Double.isInfinite(lores)) { // don't allow this to be converted to NaN return lores; } @@ -1573,7 +1571,7 @@ public class AccurateMath { final double yb = y - ya; /* Compute ln(x) */ - final double lns[] = new double[2]; + final double[] lns = new double[2]; final double lores = log(x, lns); if (Double.isInfinite(lores)) { // don't allow this to be converted to NaN return lores; @@ -1592,7 +1590,7 @@ public class AccurateMath { final double aa = lna * ya; final double ab = lna * yb + lnb * ya + lnb * yb; - lna = aa+ab; + lna = aa + ab; lnb = -(lna - aa - ab); double z = 1.0 / 120.0; @@ -1776,9 +1774,8 @@ public class AccurateMath { * @param x a number smaller than 1/16 * @return sin(x) - x */ - private static double polySine(final double x) - { - double x2 = x*x; + private static double polySine(final double x) { + double x2 = x * x; double p = 2.7553817452272217E-6; p = p * x2 + -1.9841269659586505E-4; @@ -1798,7 +1795,7 @@ public class AccurateMath { * @return cos(x) - 1 */ private static double polyCosine(double x) { - double x2 = x*x; + double x2 = x * x; double p = 2.479773539153719E-5; p = p * x2 + -0.0013888888689039883; @@ -1879,44 +1876,44 @@ public class AccurateMath { b = b + sintA * cosEpsB + costA * sinEpsB; /* - t = sintA*cosEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; + t = sintA*cosEpsB; + c = a + t; + d = -(c - a - t); + a = c; + b = b + d; - t = costA*sinEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; + t = costA*sinEpsB; + c = a + t; + d = -(c - a - t); + a = c; + b = b + d; */ b = b + sintB + costB * sinEpsA + sintB * cosEpsB + costB * sinEpsB; /* - t = sintB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; + t = sintB; + c = a + t; + d = -(c - a - t); + a = c; + b = b + d; - t = costB*sinEpsA; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; + t = costB*sinEpsA; + c = a + t; + d = -(c - a - t); + a = c; + b = b + d; - t = sintB*cosEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; + t = sintB*cosEpsB; + c = a + t; + d = -(c - a - t); + a = c; + b = b + d; - t = costB*sinEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; + t = costB*sinEpsB; + c = a + t; + d = -(c - a - t); + a = c; + b = b + d; */ if (xb != 0.0) { @@ -2015,14 +2012,14 @@ public class AccurateMath { a = c; b += d; - t = costA*sinEpsA; + t = costA * sinEpsA; c = a + t; d = -(c - a - t); a = c; b += d; - b += sintA*cosEpsB + costA*sinEpsB; - b += sintB + costB*sinEpsA + sintB*cosEpsB + costB*sinEpsB; + b += sintA * cosEpsB + costA * sinEpsB; + b += sintB + costB * sinEpsA + sintB * cosEpsB + costB * sinEpsB; double sina = a + b; double sinb = -(sina - a - b); @@ -2031,20 +2028,20 @@ public class AccurateMath { a = b = c = d = 0.0; - t = costA*cosEpsA; + t = costA * cosEpsA; c = a + t; d = -(c - a - t); a = c; b += d; - t = -sintA*sinEpsA; + t = -sintA * sinEpsA; c = a + t; d = -(c - a - t); a = c; b += d; - b += costB*cosEpsA + costA*cosEpsB + costB*cosEpsB; - b -= sintB*sinEpsA + sintA*sinEpsB + sintB*sinEpsB; + b += costB * cosEpsA + costA * cosEpsB + costB * cosEpsB; + b -= sintB * sinEpsA + sintA * sinEpsB + sintB * sinEpsB; double cosa = a + b; double cosb = -(cosa - a - b); @@ -2066,7 +2063,7 @@ public class AccurateMath { // f(x) = 1/x, f'(x) = -1/x^2 - double est = sina/cosa; + double est = sina / cosa; /* Split the estimate to get more accurate read on division rounding */ temp = est * HEX_40000000; @@ -2078,14 +2075,14 @@ public class AccurateMath { double cosab = cosa - cosaa; //double err = (sina - est*cosa)/cosa; // Correction for division rounding - double err = (sina - esta*cosaa - esta*cosab - estb*cosaa - estb*cosab)/cosa; // Correction for division rounding - err += sinb/cosa; // Change in est due to sinb + double err = (sina - esta * cosaa - esta * cosab - estb * cosaa - estb * cosab) / cosa; // Correction for division rounding + err += sinb / cosa; // Change in est due to sinb err += -sina * cosb / cosa / cosa; // Change in est due to cosb if (xb != 0.0) { // tan' = 1 + tan^2 cot' = -(1 + cot^2) // Approximate impact of xb - double xbadj = xb + est*est*xb; + double xbadj = xb + est * est * xb; if (cotanFlag) { xbadj = -xbadj; } @@ -2093,7 +2090,7 @@ public class AccurateMath { err += xbadj; } - return est+err; + return est + err; } /** Reduce the input argument using the Payne and Hanek method. @@ -2107,8 +2104,7 @@ public class AccurateMath { * @param x number to reduce * @param result placeholder where to put the result */ - private static void reducePayneHanek(double x, double result[]) - { + private static void reducePayneHanek(double x, double[] result) { /* Convert input double to bits */ long inbits = Double.doubleToRawLongBits(x); int exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; @@ -2129,14 +2125,14 @@ public class AccurateMath { int shift = exponent - (idx << 6); if (shift != 0) { - shpi0 = (idx == 0) ? 0 : (RECIP_2PI[idx-1] << shift); - shpi0 |= RECIP_2PI[idx] >>> (64-shift); - shpiA = (RECIP_2PI[idx] << shift) | (RECIP_2PI[idx+1] >>> (64-shift)); - shpiB = (RECIP_2PI[idx+1] << shift) | (RECIP_2PI[idx+2] >>> (64-shift)); + shpi0 = (idx == 0) ? 0 : (RECIP_2PI[idx - 1] << shift); + shpi0 |= RECIP_2PI[idx] >>> (64 - shift); + shpiA = (RECIP_2PI[idx] << shift) | (RECIP_2PI[idx + 1] >>> (64 - shift)); + shpiB = (RECIP_2PI[idx + 1] << shift) | (RECIP_2PI[idx + 2] >>> (64 - shift)); } else { - shpi0 = (idx == 0) ? 0 : RECIP_2PI[idx-1]; + shpi0 = (idx == 0) ? 0 : RECIP_2PI[idx - 1]; shpiA = RECIP_2PI[idx]; - shpiB = RECIP_2PI[idx+1]; + shpiB = RECIP_2PI[idx + 1]; } /* Multiply input by shpiA */ @@ -2155,17 +2151,17 @@ public class AccurateMath { long prodA = ac + (ad >>> 32); boolean bita = (bd & 0x8000000000000000L) != 0; - boolean bitb = (ad & 0x80000000L ) != 0; + boolean bitb = (ad & 0x80000000L) != 0; boolean bitsum = (prodB & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prodA++; } bita = (prodB & 0x8000000000000000L) != 0; - bitb = (bc & 0x80000000L ) != 0; + bitb = (bc & 0x80000000L) != 0; prodB += bc << 32; prodA += bc >>> 32; @@ -2173,8 +2169,8 @@ public class AccurateMath { bitsum = (prodB & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prodA++; } @@ -2189,12 +2185,12 @@ public class AccurateMath { ac += (bc + ad) >>> 32; bita = (prodB & 0x8000000000000000L) != 0; - bitb = (ac & 0x8000000000000000L ) != 0; + bitb = (ac & 0x8000000000000000L) != 0; prodB += ac; bitsum = (prodB & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prodA++; } @@ -2241,17 +2237,17 @@ public class AccurateMath { long prod2A = ac + (ad >>> 32); bita = (bd & 0x8000000000000000L) != 0; - bitb = (ad & 0x80000000L ) != 0; + bitb = (ad & 0x80000000L) != 0; bitsum = (prod2B & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prod2A++; } bita = (prod2B & 0x8000000000000000L) != 0; - bitb = (bc & 0x80000000L ) != 0; + bitb = (bc & 0x80000000L) != 0; prod2B += bc << 32; prod2A += bc >>> 32; @@ -2259,8 +2255,8 @@ public class AccurateMath { bitsum = (prod2B & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prod2A++; } @@ -2275,12 +2271,12 @@ public class AccurateMath { ac += (bc + ad) >>> 32; bita = (prod2B & 0x8000000000000000L) != 0; - bitb = (ac & 0x8000000000000000L ) != 0; + bitb = (ac & 0x8000000000000000L) != 0; prod2B += ac; bitsum = (prod2B & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prod2A++; } @@ -2297,12 +2293,12 @@ public class AccurateMath { ac += (bc + ad) >>> 32; bita = (prod2B & 0x8000000000000000L) != 0; - bitb = (ac & 0x8000000000000000L ) != 0; + bitb = (ac & 0x8000000000000000L) != 0; prod2B += ac; bitsum = (prod2B & 0x8000000000000000L) != 0; /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { + if ((bita && bitb) || + ((bita || bitb) && !bitsum)) { prod2A++; } @@ -2356,7 +2352,7 @@ public class AccurateMath { // PI * (2**20) // Argument too big for CodyWaite reduction. Must use // PayneHanek. - double reduceResults[] = new double[3]; + double[] reduceResults = new double[3]; reducePayneHanek(xa, reduceResults); quadrant = ((int) reduceResults[0]) & 3; xa = reduceResults[1]; @@ -2373,16 +2369,16 @@ public class AccurateMath { } switch (quadrant) { - case 0: - return sinQ(xa, xb); - case 1: - return cosQ(xa, xb); - case 2: - return -sinQ(xa, xb); - case 3: - return -cosQ(xa, xb); - default: - return Double.NaN; + case 0: + return sinQ(xa, xb); + case 1: + return cosQ(xa, xb); + case 2: + return -sinQ(xa, xb); + case 3: + return -cosQ(xa, xb); + default: + return Double.NaN; } } @@ -2411,7 +2407,7 @@ public class AccurateMath { // PI * (2**20) // Argument too big for CodyWaite reduction. Must use // PayneHanek. - double reduceResults[] = new double[3]; + double[] reduceResults = new double[3]; reducePayneHanek(xa, reduceResults); quadrant = ((int) reduceResults[0]) & 3; xa = reduceResults[1]; @@ -2427,16 +2423,16 @@ public class AccurateMath { // quadrant = (quadrant + 2) % 4; switch (quadrant) { - case 0: - return cosQ(xa, xb); - case 1: - return -sinQ(xa, xb); - case 2: - return -cosQ(xa, xb); - case 3: - return sinQ(xa, xb); - default: - return Double.NaN; + case 0: + return cosQ(xa, xb); + case 1: + return -sinQ(xa, xb); + case 2: + return -cosQ(xa, xb); + case 3: + return sinQ(xa, xb); + default: + return Double.NaN; } } @@ -2476,7 +2472,7 @@ public class AccurateMath { // PI * (2**20) // Argument too big for CodyWaite reduction. Must use // PayneHanek. - double reduceResults[] = new double[3]; + double[] reduceResults = new double[3]; reducePayneHanek(xa, reduceResults); quadrant = ((int) reduceResults[0]) & 3; xa = reduceResults[1]; @@ -2518,7 +2514,7 @@ public class AccurateMath { } /** - * Arctangent function + * Arctangent function. * @param x a number * @return atan(x) */ @@ -2680,7 +2676,7 @@ public class AccurateMath { } /** - * Two arguments arctangent function + * Two arguments arctangent function. * @param y ordinate * @param x abscissa * @return phase angle of point (x,y) between {@code -PI} and {@code PI} @@ -2750,8 +2746,7 @@ public class AccurateMath { } } - if (x == Double.NEGATIVE_INFINITY) - { + if (x == Double.NEGATIVE_INFINITY) { if (y > 0.0 || 1 / y > 0.0) { return Math.PI; } @@ -2807,75 +2802,75 @@ public class AccurateMath { * @return arc sine of x */ public static double asin(double x) { - if (Double.isNaN(x)) { - return Double.NaN; - } + if (Double.isNaN(x)) { + return Double.NaN; + } - if (x > 1.0 || x < -1.0) { - return Double.NaN; - } + if (x > 1.0 || x < -1.0) { + return Double.NaN; + } - if (x == 1.0) { - return Math.PI/2.0; - } + if (x == 1.0) { + return Math.PI / 2.0; + } - if (x == -1.0) { - return -Math.PI/2.0; - } + if (x == -1.0) { + return -Math.PI / 2.0; + } - if (x == 0.0) { // Matches +/- 0.0; return correct sign - return x; - } + if (x == 0.0) { // Matches +/- 0.0; return correct sign + return x; + } - /* Compute asin(x) = atan(x/sqrt(1-x*x)) */ + /* Compute asin(x) = atan(x/sqrt(1-x*x)) */ - /* Split x */ - double temp = x * HEX_40000000; - final double xa = x + temp - temp; - final double xb = x - xa; + /* Split x */ + double temp = x * HEX_40000000; + final double xa = x + temp - temp; + final double xb = x - xa; - /* Square it */ - double ya = xa*xa; - double yb = xa*xb*2.0 + xb*xb; + /* Square it */ + double ya = xa * xa; + double yb = xa * xb * 2.0 + xb * xb; - /* Subtract from 1 */ - ya = -ya; - yb = -yb; + /* Subtract from 1 */ + ya = -ya; + yb = -yb; - double za = 1.0 + ya; - double zb = -(za - 1.0 - ya); + double za = 1.0 + ya; + double zb = -(za - 1.0 - ya); - temp = za + yb; - zb += -(temp - za - yb); - za = temp; + temp = za + yb; + zb += -(temp - za - yb); + za = temp; - /* Square root */ - double y; - y = sqrt(za); - temp = y * HEX_40000000; - ya = y + temp - temp; - yb = y - ya; + /* Square root */ + double y; + y = sqrt(za); + temp = y * HEX_40000000; + ya = y + temp - temp; + yb = y - ya; - /* Extend precision of sqrt */ - yb += (za - ya*ya - 2*ya*yb - yb*yb) / (2.0*y); + /* Extend precision of sqrt */ + yb += (za - ya * ya - 2 * ya * yb - yb * yb) / (2.0 * y); - /* Contribution of zb to sqrt */ - double dx = zb / (2.0*y); + /* Contribution of zb to sqrt */ + double dx = zb / (2.0 * y); - // Compute ratio r = x/y - double r = x/y; - temp = r * HEX_40000000; - double ra = r + temp - temp; - double rb = r - ra; + // Compute ratio r = x/y + double r = x / y; + temp = r * HEX_40000000; + double ra = r + temp - temp; + double rb = r - ra; - rb += (x - ra*ya - ra*yb - rb*ya - rb*yb) / y; // Correct for rounding in division - rb += -x * dx / y / y; // Add in effect additional bits of sqrt. + rb += (x - ra * ya - ra * yb - rb * ya - rb * yb) / y; // Correct for rounding in division + rb += -x * dx / y / y; // Add in effect additional bits of sqrt. - temp = ra + rb; - rb = -(temp - ra - rb); - ra = temp; + temp = ra + rb; + rb = -(temp - ra - rb); + ra = temp; - return atan(ra, rb, false); + return atan(ra, rb, false); } /** Compute the arc cosine of a number. @@ -2883,81 +2878,81 @@ public class AccurateMath { * @return arc cosine of x */ public static double acos(double x) { - if (Double.isNaN(x)) { - return Double.NaN; - } + if (Double.isNaN(x)) { + return Double.NaN; + } - if (x > 1.0 || x < -1.0) { - return Double.NaN; - } + if (x > 1.0 || x < -1.0) { + return Double.NaN; + } - if (x == -1.0) { - return Math.PI; - } + if (x == -1.0) { + return Math.PI; + } - if (x == 1.0) { - return 0.0; - } + if (x == 1.0) { + return 0.0; + } - if (x == 0) { - return Math.PI/2.0; - } + if (x == 0) { + return Math.PI / 2.0; + } - /* Compute acos(x) = atan(sqrt(1-x*x)/x) */ + /* Compute acos(x) = atan(sqrt(1-x*x)/x) */ - /* Split x */ - double temp = x * HEX_40000000; - final double xa = x + temp - temp; - final double xb = x - xa; + /* Split x */ + double temp = x * HEX_40000000; + final double xa = x + temp - temp; + final double xb = x - xa; - /* Square it */ - double ya = xa*xa; - double yb = xa*xb*2.0 + xb*xb; + /* Square it */ + double ya = xa * xa; + double yb = xa * xb * 2.0 + xb * xb; - /* Subtract from 1 */ - ya = -ya; - yb = -yb; + /* Subtract from 1 */ + ya = -ya; + yb = -yb; - double za = 1.0 + ya; - double zb = -(za - 1.0 - ya); + double za = 1.0 + ya; + double zb = -(za - 1.0 - ya); - temp = za + yb; - zb += -(temp - za - yb); - za = temp; + temp = za + yb; + zb += -(temp - za - yb); + za = temp; - /* Square root */ - double y = sqrt(za); - temp = y * HEX_40000000; - ya = y + temp - temp; - yb = y - ya; + /* Square root */ + double y = sqrt(za); + temp = y * HEX_40000000; + ya = y + temp - temp; + yb = y - ya; - /* Extend precision of sqrt */ - yb += (za - ya*ya - 2*ya*yb - yb*yb) / (2.0*y); + /* Extend precision of sqrt */ + yb += (za - ya * ya - 2 * ya * yb - yb * yb) / (2.0 * y); - /* Contribution of zb to sqrt */ - yb += zb / (2.0*y); - y = ya+yb; - yb = -(y - ya - yb); + /* Contribution of zb to sqrt */ + yb += zb / (2.0 * y); + y = ya + yb; + yb = -(y - ya - yb); - // Compute ratio r = y/x - double r = y/x; + // Compute ratio r = y/x + double r = y / x; - // Did r overflow? - if (Double.isInfinite(r)) { // x is effectively zero - return Math.PI/2; // so return the appropriate value - } + // Did r overflow? + if (Double.isInfinite(r)) { // x is effectively zero + return Math.PI / 2; // so return the appropriate value + } - double ra = doubleHighPart(r); - double rb = r - ra; + double ra = doubleHighPart(r); + double rb = r - ra; - rb += (y - ra*xa - ra*xb - rb*xa - rb*xb) / x; // Correct for rounding in division - rb += yb / x; // Add in effect additional bits of sqrt. + rb += (y - ra * xa - ra * xb - rb * xa - rb * xb) / x; // Correct for rounding in division + rb += yb / x; // Add in effect additional bits of sqrt. - temp = ra + rb; - rb = -(temp - ra - rb); - ra = temp; + temp = ra + rb; + rb = -(temp - ra - rb); + ra = temp; - return atan(ra, rb, x<0); + return atan(ra, rb, x < 0); } /** Compute the cubic root of a number. @@ -2965,92 +2960,90 @@ public class AccurateMath { * @return cubic root of x */ public static double cbrt(double x) { - /* Convert input double to bits */ - long inbits = Double.doubleToRawLongBits(x); - int exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; - boolean subnormal = false; + /* Convert input double to bits */ + long inbits = Double.doubleToRawLongBits(x); + int exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; + boolean subnormal = false; - if (exponent == -1023) { - if (x == 0) { - return x; - } + if (exponent == -1023) { + if (x == 0) { + return x; + } - /* Subnormal, so normalize */ - subnormal = true; - x *= 1.8014398509481984E16; // 2^54 - inbits = Double.doubleToRawLongBits(x); - exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; - } + /* Subnormal, so normalize */ + subnormal = true; + x *= 1.8014398509481984E16; // 2^54 + inbits = Double.doubleToRawLongBits(x); + exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; + } - if (exponent == 1024) { - // Nan or infinity. Don't care which. - return x; - } + if (exponent == 1024) { + // Nan or infinity. Don't care which. + return x; + } - /* Divide the exponent by 3 */ - int exp3 = exponent / 3; + /* Divide the exponent by 3 */ + int exp3 = exponent / 3; - /* p2 will be the nearest power of 2 to x with its exponent divided by 3 */ - double p2 = Double.longBitsToDouble((inbits & 0x8000000000000000L) | - (long)(((exp3 + 1023) & 0x7ff)) << 52); + /* p2 will be the nearest power of 2 to x with its exponent divided by 3 */ + double p2 = Double.longBitsToDouble((inbits & 0x8000000000000000L) | (long) (((exp3 + 1023) & 0x7ff)) << 52); - /* This will be a number between 1 and 2 */ - final double mant = Double.longBitsToDouble((inbits & 0x000fffffffffffffL) | 0x3ff0000000000000L); + /* This will be a number between 1 and 2 */ + final double mant = Double.longBitsToDouble((inbits & 0x000fffffffffffffL) | 0x3ff0000000000000L); - /* Estimate the cube root of mant by polynomial */ - double est = -0.010714690733195933; - est = est * mant + 0.0875862700108075; - est = est * mant + -0.3058015757857271; - est = est * mant + 0.7249995199969751; - est = est * mant + 0.5039018405998233; + /* Estimate the cube root of mant by polynomial */ + double est = -0.010714690733195933; + est = est * mant + 0.0875862700108075; + est = est * mant + -0.3058015757857271; + est = est * mant + 0.7249995199969751; + est = est * mant + 0.5039018405998233; - est *= CBRTTWO[exponent % 3 + 2]; + est *= CBRTTWO[exponent % 3 + 2]; - // est should now be good to about 15 bits of precision. Do 2 rounds of - // Newton's method to get closer, this should get us full double precision - // Scale down x for the purpose of doing newtons method. This avoids over/under flows. - final double xs = x / (p2*p2*p2); - est += (xs - est*est*est) / (3*est*est); - est += (xs - est*est*est) / (3*est*est); + // est should now be good to about 15 bits of precision. Do 2 rounds of + // Newton's method to get closer, this should get us full double precision + // Scale down x for the purpose of doing newtons method. This avoids over/under flows. + final double xs = x / (p2 * p2 * p2); + est += (xs - est * est * est) / (3 * est * est); + est += (xs - est * est * est) / (3 * est * est); - // Do one round of Newton's method in extended precision to get the last bit right. - double temp = est * HEX_40000000; - double ya = est + temp - temp; - double yb = est - ya; + // Do one round of Newton's method in extended precision to get the last bitright. + double temp = est * HEX_40000000; + double ya = est + temp - temp; + double yb = est - ya; - double za = ya * ya; - double zb = ya * yb * 2.0 + yb * yb; - temp = za * HEX_40000000; - double temp2 = za + temp - temp; - zb += za - temp2; - za = temp2; + double za = ya * ya; + double zb = ya * yb * 2.0 + yb * yb; + temp = za * HEX_40000000; + double temp2 = za + temp - temp; + zb += za - temp2; + za = temp2; - zb = za * yb + ya * zb + zb * yb; - za *= ya; + zb = za * yb + ya * zb + zb * yb; + za *= ya; - double na = xs - za; - double nb = -(na - xs + za); - nb -= zb; + double na = xs - za; + double nb = -(na - xs + za); + nb -= zb; - est += (na+nb)/(3*est*est); + est += (na + nb) / (3 * est * est); - /* Scale by a power of two, so this is exact. */ - est *= p2; + /* Scale by a power of two, so this is exact. */ + est *= p2; - if (subnormal) { - est *= 3.814697265625E-6; // 2^-18 - } + if (subnormal) { + est *= 3.814697265625E-6; // 2^-18 + } - return est; + return est; } /** - * Convert degrees to radians, with error of less than 0.5 ULP + * Convert degrees to radians, with error of less than 0.5 ULP. * @param x angle in degrees * @return x converted into radians */ - public static double toRadians(double x) - { + public static double toRadians(double x) { if (Double.isInfinite(x) || x == 0.0) { // Matches +/- 0.0; return correct sign return x; } @@ -3070,12 +3063,11 @@ public class AccurateMath { } /** - * Convert radians to degrees, with error of less than 0.5 ULP + * Convert radians to degrees, with error of less than 0.5 ULP. * @param x angle in radians * @return x converted into degrees */ - public static double toDegrees(double x) - { + public static double toDegrees(double x) { if (Double.isInfinite(x) || x == 0.0) { // Matches +/- 0.0; return correct sign return x; } @@ -3357,7 +3349,6 @@ public class AccurateMath { * @return the next machine representable number in the specified direction */ public static double nextAfter(double d, double direction) { - // handling of some important special cases if (Double.isNaN(d) || Double.isNaN(direction)) { return Double.NaN; @@ -3378,7 +3369,6 @@ public class AccurateMath { } else { return Double.longBitsToDouble(sign | ((bits & 0x7fffffffffffffffL) - 1)); } - } /** @@ -3435,7 +3425,6 @@ public class AccurateMath { } else { return Float.intBitsToFloat(sign | ((bits & 0x7fffffff) - 1)); } - } /** Get the largest whole number smaller than x. @@ -3459,7 +3448,7 @@ public class AccurateMath { } if (y == 0) { - return x*y; + return x * y; } return y; @@ -3484,7 +3473,7 @@ public class AccurateMath { y += 1.0; if (y == 0) { - return x*y; + return x * y; } return y; @@ -3502,7 +3491,7 @@ public class AccurateMath { if (y == -1.0) { return -0.0; // Preserve sign of operand } - return y+1.0; + return y + 1.0; } if (d < 0.5) { return y; @@ -3519,7 +3508,7 @@ public class AccurateMath { */ public static long round(double x) { final long bits = Double.doubleToRawLongBits(x); - final int biasedExp = ((int)(bits>>52)) & 0x7ff; + final int biasedExp = ((int) (bits >> 52)) & 0x7ff; // Shift to get rid of bits past comma except first one: will need to // 1-shift to the right to end up with correct magnitude. final int shift = (52 - 1 + Double.MAX_EXPONENT) - biasedExp; @@ -3545,7 +3534,7 @@ public class AccurateMath { */ public static int round(final float x) { final int bits = Float.floatToRawIntBits(x); - final int biasedExp = (bits>>23) & 0xff; + final int biasedExp = (bits >> 23) & 0xff; // Shift to get rid of bits past comma except first one: will need to // 1-shift to the right to end up with correct magnitude. final int shift = (23 - 1 + Float.MAX_EXPONENT) - biasedExp; @@ -3565,7 +3554,7 @@ public class AccurateMath { } } - /** Compute the minimum of two values + /** Compute the minimum of two values. * @param a first value * @param b second value * @return a if a is lesser or equal to b, b otherwise @@ -3574,7 +3563,7 @@ public class AccurateMath { return (a <= b) ? a : b; } - /** Compute the minimum of two values + /** Compute the minimum of two values. * @param a first value * @param b second value * @return a if a is lesser or equal to b, b otherwise @@ -3583,7 +3572,7 @@ public class AccurateMath { return (a <= b) ? a : b; } - /** Compute the minimum of two values + /** Compute the minimum of two values. * @param a first value * @param b second value * @return a if a is lesser or equal to b, b otherwise @@ -3608,7 +3597,7 @@ public class AccurateMath { return b; } - /** Compute the minimum of two values + /** Compute the minimum of two values. * @param a first value * @param b second value * @return a if a is lesser or equal to b, b otherwise @@ -3633,7 +3622,7 @@ public class AccurateMath { return b; } - /** Compute the maximum of two values + /** Compute the maximum of two values. * @param a first value * @param b second value * @return b if a is lesser or equal to b, a otherwise @@ -3642,7 +3631,7 @@ public class AccurateMath { return (a <= b) ? b : a; } - /** Compute the maximum of two values + /** Compute the maximum of two values. * @param a first value * @param b second value * @return b if a is lesser or equal to b, a otherwise @@ -3651,7 +3640,7 @@ public class AccurateMath { return (a <= b) ? b : a; } - /** Compute the maximum of two values + /** Compute the maximum of two values. * @param a first value * @param b second value * @return b if a is lesser or equal to b, a otherwise @@ -3676,7 +3665,7 @@ public class AccurateMath { return a; } - /** Compute the maximum of two values + /** Compute the maximum of two values. * @param a first value * @param b second value * @return b if a is lesser or equal to b, a otherwise @@ -3721,7 +3710,6 @@ public class AccurateMath { } else if (Double.isNaN(x) || Double.isNaN(y)) { return Double.NaN; } else { - final int expX = getExponent(x); final int expY = getExponent(y); if (expX > expY + 27) { @@ -3731,7 +3719,6 @@ public class AccurateMath { // x is neglectible with respect to y return abs(y); } else { - // find an intermediate scale to avoid both overflow and underflow final int middleExp = (expX + expY) / 2; @@ -3744,9 +3731,7 @@ public class AccurateMath { // remove scaling return scalb(scaledH, middleExp); - } - } } @@ -3784,7 +3769,7 @@ public class AccurateMath { } } - /** Convert a long to integer, detecting overflows + /** Convert a long to integer, detecting overflows. * @param n number to convert to int * @return integer with same value as n if no overflows occur * @exception MathArithmeticException if n cannot fit into an int @@ -3804,13 +3789,10 @@ public class AccurateMath { * @since 3.4 */ public static int incrementExact(final int n) throws MathArithmeticException { - if (n == Integer.MAX_VALUE) { throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, n, 1); } - return n + 1; - } /** Increment a number, detecting overflows. @@ -3820,13 +3802,10 @@ public class AccurateMath { * @since 3.4 */ public static long incrementExact(final long n) throws MathArithmeticException { - if (n == Long.MAX_VALUE) { throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, n, 1); } - return n + 1; - } /** Decrement a number, detecting overflows. @@ -3836,13 +3815,10 @@ public class AccurateMath { * @since 3.4 */ public static int decrementExact(final int n) throws MathArithmeticException { - if (n == Integer.MIN_VALUE) { throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, n, 1); } - return n - 1; - } /** Decrement a number, detecting overflows. @@ -3852,13 +3828,10 @@ public class AccurateMath { * @since 3.4 */ public static long decrementExact(final long n) throws MathArithmeticException { - if (n == Long.MIN_VALUE) { throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, n, 1); } - return n - 1; - } /** Add two numbers, detecting overflows. @@ -3869,7 +3842,6 @@ public class AccurateMath { * @since 3.4 */ public static int addExact(final int a, final int b) throws MathArithmeticException { - // compute sum final int sum = a + b; @@ -3879,7 +3851,6 @@ public class AccurateMath { } return sum; - } /** Add two numbers, detecting overflows. @@ -3890,7 +3861,6 @@ public class AccurateMath { * @since 3.4 */ public static long addExact(final long a, final long b) throws MathArithmeticException { - // compute sum final long sum = a + b; @@ -3900,7 +3870,6 @@ public class AccurateMath { } return sum; - } /** Subtract two numbers, detecting overflows. @@ -3911,7 +3880,6 @@ public class AccurateMath { * @since 3.4 */ public static int subtractExact(final int a, final int b) { - // compute subtraction final int sub = a - b; @@ -3921,7 +3889,6 @@ public class AccurateMath { } return sub; - } /** Subtract two numbers, detecting overflows. @@ -3932,7 +3899,6 @@ public class AccurateMath { * @since 3.4 */ public static long subtractExact(final long a, final long b) { - // compute subtraction final long sub = a - b; @@ -3942,7 +3908,6 @@ public class AccurateMath { } return sub; - } /** Multiply two numbers, detecting overflows. @@ -3969,12 +3934,12 @@ public class AccurateMath { * @since 3.4 */ public static long multiplyExact(final long a, final long b) { - if (((b > 0l) && (a > Long.MAX_VALUE / b || a < Long.MIN_VALUE / b)) || - ((b < -1l) && (a > Long.MIN_VALUE / b || a < Long.MAX_VALUE / b)) || - ((b == -1l) && (a == Long.MIN_VALUE))) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_MULTIPLICATION, a, b); - } - return a * b; + if (((b > 0L) && (a > Long.MAX_VALUE / b || a < Long.MIN_VALUE / b)) || + ((b < -1L) && (a > Long.MIN_VALUE / b || a < Long.MAX_VALUE / b)) || + ((b == -1L) && (a == Long.MIN_VALUE))) { + throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_MULTIPLICATION, a, b); + } + return a * b; } /** Finds q such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. @@ -3991,7 +3956,6 @@ public class AccurateMath { * @since 3.4 */ public static int floorDiv(final int a, final int b) throws MathArithmeticException { - if (b == 0) { throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); } @@ -4004,7 +3968,6 @@ public class AccurateMath { // a and b have opposite signs and division is not exact return (a / b) - 1; } - } /** Finds q such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. @@ -4021,20 +3984,18 @@ public class AccurateMath { * @since 3.4 */ public static long floorDiv(final long a, final long b) throws MathArithmeticException { - - if (b == 0l) { + if (b == 0L) { throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); } final long m = a % b; - if ((a ^ b) >= 0l || m == 0l) { + if ((a ^ b) >= 0L || m == 0L) { // a an b have same sign, or division is exact return a / b; } else { // a and b have opposite signs and division is not exact - return (a / b) - 1l; + return (a / b) - 1L; } - } /** Finds r such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. @@ -4051,7 +4012,6 @@ public class AccurateMath { * @since 3.4 */ public static int floorMod(final int a, final int b) throws MathArithmeticException { - if (b == 0) { throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); } @@ -4064,7 +4024,6 @@ public class AccurateMath { // a and b have opposite signs and division is not exact return b + m; } - } /** Finds r such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. @@ -4081,20 +4040,18 @@ public class AccurateMath { * @since 3.4 */ public static long floorMod(final long a, final long b) { - - if (b == 0l) { + if (b == 0L) { throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); } final long m = a % b; - if ((a ^ b) >= 0l || m == 0l) { + if ((a ^ b) >= 0L || m == 0L) { // a an b have same sign, or division is exact return m; } else { // a and b have opposite signs and division is not exact return b + m; } - } /** @@ -4105,14 +4062,14 @@ public class AccurateMath { * @param sign the sign for the returned value * @return the magnitude with the same sign as the {@code sign} argument */ - public static double copySign(double magnitude, double sign){ + public static double copySign(double magnitude, double sign) { // The highest order bit is going to be zero if the // highest order bit of m and s is the same and one otherwise. // So (m^s) will be positive if both m and s have the same sign // and negative otherwise. final long m = Double.doubleToRawLongBits(magnitude); // don't care about NaN final long s = Double.doubleToRawLongBits(sign); - if ((m^s) >= 0) { + if ((m ^ s) >= 0) { return magnitude; } return -magnitude; // flip sign @@ -4126,14 +4083,14 @@ public class AccurateMath { * @param sign the sign for the returned value * @return the magnitude with the same sign as the {@code sign} argument */ - public static float copySign(float magnitude, float sign){ + public static float copySign(float magnitude, float sign) { // The highest order bit is going to be zero if the // highest order bit of m and s is the same and one otherwise. // So (m^s) will be positive if both m and s have the same sign // and negative otherwise. final int m = Float.floatToRawIntBits(magnitude); final int s = Float.floatToRawIntBits(sign); - if ((m^s) >= 0) { + if ((m ^ s) >= 0) { return magnitude; } return -magnitude; // flip sign @@ -4178,7 +4135,7 @@ public class AccurateMath { AccurateMathCalc.printarray(out, "EXP_INT_TABLE_B", EXP_INT_TABLE_LEN, ExpIntTable.EXP_INT_TABLE_B); AccurateMathCalc.printarray(out, "EXP_FRAC_TABLE_A", EXP_FRAC_TABLE_LEN, ExpFracTable.EXP_FRAC_TABLE_A); AccurateMathCalc.printarray(out, "EXP_FRAC_TABLE_B", EXP_FRAC_TABLE_LEN, ExpFracTable.EXP_FRAC_TABLE_B); - AccurateMathCalc.printarray(out, "LN_MANT",LN_MANT_LEN, lnMant.LN_MANT); + AccurateMathCalc.printarray(out, "LN_MANT", LN_MANT_LEN, lnMant.LN_MANT); AccurateMathCalc.printarray(out, "SINE_TABLE_A", SINE_TABLE_LEN, SINE_TABLE_A); AccurateMathCalc.printarray(out, "SINE_TABLE_B", SINE_TABLE_LEN, SINE_TABLE_B); AccurateMathCalc.printarray(out, "COSINE_TABLE_A", SINE_TABLE_LEN, COSINE_TABLE_A); @@ -4193,7 +4150,7 @@ public class AccurateMath { * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX]. */ private static final double[] EXP_INT_TABLE_A; - /** Exponential evaluated at integer values, + /** Exponential evaluated at integer values. * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX] */ private static final double[] EXP_INT_TABLE_B; @@ -4203,8 +4160,8 @@ public class AccurateMath { EXP_INT_TABLE_A = new double[AccurateMath.EXP_INT_TABLE_LEN]; EXP_INT_TABLE_B = new double[AccurateMath.EXP_INT_TABLE_LEN]; - final double tmp[] = new double[2]; - final double recip[] = new double[2]; + final double[] tmp = new double[2]; + final double[] recip = new double[2]; // Populate expIntTable for (int i = 0; i < AccurateMath.EXP_INT_TABLE_MAX_INDEX; i++) { @@ -4243,7 +4200,7 @@ public class AccurateMath { EXP_FRAC_TABLE_A = new double[AccurateMath.EXP_FRAC_TABLE_LEN]; EXP_FRAC_TABLE_B = new double[AccurateMath.EXP_FRAC_TABLE_LEN]; - final double tmp[] = new double[2]; + final double[] tmp = new double[2]; // Populate expFracTable final double factor = 1d / (EXP_FRAC_TABLE_LEN - 1); @@ -4270,7 +4227,7 @@ public class AccurateMath { // Populate lnMant table for (int i = 0; i < LN_MANT.length; i++) { - final double d = Double.longBitsToDouble( (((long) i) << 42) | 0x3ff0000000000000L ); + final double d = Double.longBitsToDouble((((long) i) << 42) | 0x3ff0000000000000L); LN_MANT[i] = AccurateMathCalc.slowLog(d); } } else { @@ -4281,11 +4238,11 @@ public class AccurateMath { /** Enclose the Cody/Waite reduction (used in "sin", "cos" and "tan"). */ private static class CodyWaite { - /** k */ + /** k. */ private final int finalK; - /** remA */ + /** remA. */ private final double finalRemA; - /** remB */ + /** remB. */ private final double finalRemB; /** diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathCalc.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathCalc.java index bb189f211..69cc11b72 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathCalc.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathCalc.java @@ -23,7 +23,7 @@ import org.apache.commons.math4.legacy.exception.DimensionMismatchException; /** Class used to compute the classical functions tables. * @since 3.0 */ -class AccurateMathCalc { +final class AccurateMathCalc { /** * 0x40000000 - used to split a double into two parts, both with the low order bits cleared. @@ -32,7 +32,7 @@ class AccurateMathCalc { private static final long HEX_40000000 = 0x40000000L; // 1073741824L /** Factorial table, for Taylor series expansions. 0!, 1!, 2!, ... 19! */ - private static final double FACT[] = new double[] + private static final double[] FACT = new double[] { +1.0d, // 0 +1.0d, // 1 @@ -57,7 +57,7 @@ class AccurateMathCalc { }; /** Coefficients for slowLog. */ - private static final double LN_SPLIT_COEF[][] = { + private static final double[][] LN_SPLIT_COEF = { {2.0, 0.0}, {0.6666666269302368, 3.9736429850260626E-8}, {0.3999999761581421, 2.3841857910019882E-8}, @@ -101,7 +101,7 @@ class AccurateMathCalc { private static void buildSinCosTables(double[] SINE_TABLE_A, double[] SINE_TABLE_B, double[] COSINE_TABLE_A, double[] COSINE_TABLE_B, int SINE_TABLE_LEN, double[] TANGENT_TABLE_A, double[] TANGENT_TABLE_B) { - final double result[] = new double[2]; + final double[] result = new double[2]; /* Use taylor series for 0 <= x <= 6/8 */ for (int i = 0; i < 7; i++) { @@ -118,18 +118,18 @@ class AccurateMathCalc { /* Use angle addition formula to complete table to 13/8, just beyond pi/2 */ for (int i = 7; i < SINE_TABLE_LEN; i++) { - double xs[] = new double[2]; - double ys[] = new double[2]; - double as[] = new double[2]; - double bs[] = new double[2]; - double temps[] = new double[2]; + double[] xs = new double[2]; + double[] ys = new double[2]; + double[] as = new double[2]; + double[] bs = new double[2]; + double[] temps = new double[2]; - if ( (i & 1) == 0) { + if ((i & 1) == 0) { // Even, use double angle - xs[0] = SINE_TABLE_A[i/2]; - xs[1] = SINE_TABLE_B[i/2]; - ys[0] = COSINE_TABLE_A[i/2]; - ys[1] = COSINE_TABLE_B[i/2]; + xs[0] = SINE_TABLE_A[i / 2]; + xs[1] = SINE_TABLE_B[i / 2]; + ys[0] = COSINE_TABLE_A[i / 2]; + ys[1] = COSINE_TABLE_B[i / 2]; /* compute sine */ splitMult(xs, ys, result); @@ -145,14 +145,14 @@ class AccurateMathCalc { COSINE_TABLE_A[i] = result[0]; COSINE_TABLE_B[i] = result[1]; } else { - xs[0] = SINE_TABLE_A[i/2]; - xs[1] = SINE_TABLE_B[i/2]; - ys[0] = COSINE_TABLE_A[i/2]; - ys[1] = COSINE_TABLE_B[i/2]; - as[0] = SINE_TABLE_A[i/2+1]; - as[1] = SINE_TABLE_B[i/2+1]; - bs[0] = COSINE_TABLE_A[i/2+1]; - bs[1] = COSINE_TABLE_B[i/2+1]; + xs[0] = SINE_TABLE_A[i / 2]; + xs[1] = SINE_TABLE_B[i / 2]; + ys[0] = COSINE_TABLE_A[i / 2]; + ys[1] = COSINE_TABLE_B[i / 2]; + as[0] = SINE_TABLE_A[i / 2 + 1]; + as[1] = SINE_TABLE_B[i / 2 + 1]; + bs[0] = COSINE_TABLE_A[i / 2 + 1]; + bs[1] = COSINE_TABLE_B[i / 2 + 1]; /* compute sine */ splitMult(xs, bs, temps); @@ -174,9 +174,9 @@ class AccurateMathCalc { /* Compute tangent = sine/cosine */ for (int i = 0; i < SINE_TABLE_LEN; i++) { - double xs[] = new double[2]; - double ys[] = new double[2]; - double as[] = new double[2]; + double[] xs = new double[2]; + double[] ys = new double[2]; + double[] as = new double[2]; as[0] = COSINE_TABLE_A[i]; as[1] = COSINE_TABLE_B[i]; @@ -191,7 +191,6 @@ class AccurateMathCalc { TANGENT_TABLE_A[i] = as[0]; TANGENT_TABLE_B[i] = as[1]; } - } /** @@ -202,27 +201,28 @@ class AccurateMathCalc { * (may be null) * @return cos(x) */ - static double slowCos(final double x, final double result[]) { + static double slowCos(final double x, final double[] result) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double facts[] = new double[2]; - final double as[] = new double[2]; + final double[] xs = new double[2]; + final double[] ys = new double[2]; + final double[] facts = new double[2]; + final double[] as = new double[2]; split(x, xs); ys[0] = ys[1] = 0.0; - for (int i = FACT.length-1; i >= 0; i--) { + for (int i = FACT.length - 1; i >= 0; i--) { splitMult(xs, ys, as); - ys[0] = as[0]; ys[1] = as[1]; + ys[0] = as[0]; + ys[1] = as[1]; - if ( (i & 1) != 0) { // skip odd entries + if ((i & 1) != 0) { // skip odd entries continue; } split(FACT[i], as); splitReciprocal(as, facts); - if ( (i & 2) != 0 ) { // alternate terms are negative + if ((i & 2) != 0) { // alternate terms are negative facts[0] = -facts[0]; facts[1] = -facts[1]; } @@ -247,26 +247,27 @@ class AccurateMathCalc { * (may be null) * @return sin(x) */ - static double slowSin(final double x, final double result[]) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double facts[] = new double[2]; - final double as[] = new double[2]; + static double slowSin(final double x, final double[] result) { + final double[] xs = new double[2]; + final double[] ys = new double[2]; + final double[] facts = new double[2]; + final double[] as = new double[2]; split(x, xs); ys[0] = ys[1] = 0.0; - for (int i = FACT.length-1; i >= 0; i--) { + for (int i = FACT.length - 1; i >= 0; i--) { splitMult(xs, ys, as); - ys[0] = as[0]; ys[1] = as[1]; + ys[0] = as[0]; + ys[1] = as[1]; - if ( (i & 1) == 0) { // Ignore even numbers + if ((i & 1) == 0) { // Ignore even numbers continue; } split(FACT[i], as); splitReciprocal(as, facts); - if ( (i & 2) != 0 ) { // alternate terms are negative + if ((i & 2) != 0) { // alternate terms are negative facts[0] = -facts[0]; facts[1] = -facts[1]; } @@ -285,21 +286,21 @@ class AccurateMathCalc { /** - * For x between 0 and 1, returns exp(x), uses extended precision + * For x between 0 and 1, returns exp(x), uses extended precision. * @param x argument of exponential * @param result placeholder where to place exp(x) split in two terms * for extra precision (i.e. exp(x) = result[0] + result[1] * @return exp(x) */ - static double slowexp(final double x, final double result[]) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double facts[] = new double[2]; - final double as[] = new double[2]; + static double slowexp(final double x, final double[] result) { + final double[] xs = new double[2]; + final double[] ys = new double[2]; + final double[] facts = new double[2]; + final double[] as = new double[2]; split(x, xs); ys[0] = ys[1] = 0.0; - for (int i = FACT.length-1; i >= 0; i--) { + for (int i = FACT.length - 1; i >= 0; i--) { splitMult(xs, ys, as); ys[0] = as[0]; ys[1] = as[1]; @@ -325,7 +326,7 @@ class AccurateMathCalc { * @param d number to split * @param split placeholder where to place the result */ - private static void split(final double d, final double split[]) { + private static void split(final double d, final double[] split) { if (d < 8e298 && d > -8e298) { final double a = d * HEX_40000000; split[0] = (d + a) - a; @@ -341,7 +342,7 @@ class AccurateMathCalc { * @param a input/out array containing the split, changed * on output */ - private static void resplit(final double a[]) { + private static void resplit(final double[] a) { final double c = a[0] + a[1]; final double d = -(c - a[0] - a[1]); @@ -361,7 +362,7 @@ class AccurateMathCalc { * @param b second term of multiplication * @param ans placeholder where to put the result */ - private static void splitMult(double a[], double b[], double ans[]) { + private static void splitMult(double[] a, double[] b, double[] ans) { ans[0] = a[0] * b[0]; ans[1] = a[0] * b[1] + a[1] * b[0] + a[1] * b[1]; @@ -374,7 +375,7 @@ class AccurateMathCalc { * @param b second term of addition * @param ans placeholder where to put the result */ - private static void splitAdd(final double a[], final double b[], final double ans[]) { + private static void splitAdd(final double[] a, final double[] b, final double[] ans) { ans[0] = a[0] + b[0]; ans[1] = a[1] + b[1]; @@ -399,8 +400,8 @@ class AccurateMathCalc { * @param in initial number, in split form * @param result placeholder where to put the result */ - static void splitReciprocal(final double in[], final double result[]) { - final double b = 1.0/4194304.0; + static void splitReciprocal(final double[] in, final double[] result) { + final double b = 1.0 / 4194304.0; final double a = 1.0 - b; if (in[0] == 0.0) { @@ -409,7 +410,7 @@ class AccurateMathCalc { } result[0] = a / in[0]; - result[1] = (b*in[0]-a*in[1]) / (in[0]*in[0] + in[0]*in[1]); + result[1] = (b * in[0] - a * in[1]) / (in[0] * in[0] + in[0] * in[1]); if (result[1] != result[1]) { // can happen if result[1] is NAN result[1] = 0.0; @@ -421,7 +422,7 @@ class AccurateMathCalc { for (int i = 0; i < 2; i++) { /* this may be overkill, probably once is enough */ double err = 1.0 - result[0] * in[0] - result[0] * in[1] - - result[1] * in[0] - result[1] * in[1]; + result[1] * in[0] - result[1] * in[1]; /*err = 1.0 - err; */ err *= result[0] + result[1]; /*printf("err = %16e\n", err); */ @@ -434,10 +435,10 @@ class AccurateMathCalc { * @param b second term of the multiplication * @param result placeholder where to put the result */ - private static void quadMult(final double a[], final double b[], final double result[]) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double zs[] = new double[2]; + private static void quadMult(final double[] a, final double[] b, final double[] result) { + final double[] xs = new double[2]; + final double[] ys = new double[2]; + final double[] zs = new double[2]; /* a[0] * b[0] */ split(a[0], xs); @@ -488,11 +489,11 @@ class AccurateMathCalc { * @param result placeholder where to put the result in extended precision * @return exp(p) in standard precision (equal to result[0] + result[1]) */ - static double expint(int p, final double result[]) { + static double expint(int p, final double[] result) { //double x = M_E; - final double xs[] = new double[2]; - final double as[] = new double[2]; - final double ys[] = new double[2]; + final double[] xs = new double[2]; + final double[] as = new double[2]; + final double[] ys = new double[2]; //split(x, xs); //xs[1] = (double)(2.7182818284590452353602874713526625L - xs[0]); //xs[0] = 2.71827697753906250000; @@ -547,10 +548,10 @@ class AccurateMathCalc { * @return log(xi) */ static double[] slowLog(double xi) { - double x[] = new double[2]; - double x2[] = new double[2]; - double y[] = new double[2]; - double a[] = new double[2]; + double[] x = new double[2]; + double[] x2 = new double[2]; + double[] y = new double[2]; + double[] a = new double[2]; split(xi, x); @@ -571,10 +572,10 @@ class AccurateMathCalc { //x[0] -= 1.0; //resplit(x); - y[0] = LN_SPLIT_COEF[LN_SPLIT_COEF.length-1][0]; - y[1] = LN_SPLIT_COEF[LN_SPLIT_COEF.length-1][1]; + y[0] = LN_SPLIT_COEF[LN_SPLIT_COEF.length - 1][0]; + y[1] = LN_SPLIT_COEF[LN_SPLIT_COEF.length - 1][1]; - for (int i = LN_SPLIT_COEF.length-2; i >= 0; i--) { + for (int i = LN_SPLIT_COEF.length - 2; i >= 0; i--) { splitMult(y, x2, a); y[0] = a[0]; y[1] = a[1]; @@ -603,9 +604,9 @@ class AccurateMathCalc { checkLen(expectedLen, array2d.length); out.println(TABLE_START_DECL + " "); int i = 0; - for(double[] array : array2d) { // "double array[]" causes PMD parsing error + for (double[] array : array2d) { // "double array[]" causes PMD parsing error out.print(" {"); - for(double d : array) { // assume inner array has very few entries + for (double d : array) { // assume inner array has very few entries out.printf("%-25.25s", format(d)); // multiple entries per line } out.println("}, // " + i++); @@ -624,7 +625,7 @@ class AccurateMathCalc { out.println(name + "="); checkLen(expectedLen, array.length); out.println(TABLE_START_DECL); - for(double d : array){ + for (double d : array) { out.printf(" %s%n", format(d)); // one entry per line } out.println(TABLE_END_DECL); @@ -654,5 +655,4 @@ class AccurateMathCalc { throw new DimensionMismatchException(actual, expectedLen); } } - } diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathLiteralArrays.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathLiteralArrays.java index 6461eac79..7d7c1baaa 100644 --- a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathLiteralArrays.java +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathLiteralArrays.java @@ -21,7 +21,7 @@ package org.apache.commons.math4.legacy.core.jdkmath; * Utility class for loading tabulated data used by {@link AccurateMath}. * */ -class AccurateMathLiteralArrays { +final class AccurateMathLiteralArrays { /** Exponential evaluated at integer values, * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX]. */ @@ -1528,8 +1528,10 @@ class AccurateMathLiteralArrays { Double.NaN, }; - /** Exponential evaluated at integer values, + /** Exponential evaluated at integer values. + *

      * exp(x) =  expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX]
+     * 
*/ private static final double[] EXP_INT_B = new double[] { +0.0d, @@ -3040,3090 +3042,3090 @@ class AccurateMathLiteralArrays { * 1024 = 2^10 */ private static final double[] EXP_FRAC_A = new double[] { - +1.0d, - +1.0009770393371582d, - +1.0019550323486328d, - +1.0029339790344238d, - +1.0039138793945312d, - +1.004894733428955d, - +1.0058765411376953d, - +1.006859302520752d, - +1.007843017578125d, - +1.0088276863098145d, - +1.0098135471343994d, - +1.0108001232147217d, - +1.0117876529693604d, - +1.0127761363983154d, - +1.013765811920166d, - +1.014756202697754d, - +1.0157477855682373d, - +1.016740083694458d, - +1.0177335739135742d, - +1.0187277793884277d, - +1.0197231769561768d, - +1.0207195281982422d, - +1.021716833114624d, - +1.0227150917053223d, - +1.023714303970337d, - +1.024714469909668d, - +1.0257158279418945d, - +1.0267179012298584d, - +1.0277209281921387d, - +1.0287251472473145d, - +1.0297303199768066d, - +1.0307364463806152d, - +1.0317435264587402d, - +1.0327515602111816d, - +1.0337605476379395d, - +1.0347704887390137d, - +1.0357816219329834d, - +1.0367934703826904d, - +1.037806510925293d, - +1.038820505142212d, - +1.0398354530334473d, - +1.040851354598999d, - +1.0418684482574463d, - +1.0428862571716309d, - +1.043905258178711d, - +1.0449252128601074d, - +1.0459461212158203d, - +1.0469679832458496d, - +1.0479910373687744d, - +1.0490150451660156d, - +1.0500397682189941d, - +1.0510656833648682d, - +1.0520927906036377d, - +1.0531206130981445d, - +1.0541496276855469d, - +1.0551795959472656d, - +1.0562105178833008d, - +1.0572423934936523d, - +1.0582754611968994d, - +1.059309482574463d, - +1.0603444576263428d, - +1.061380386352539d, - +1.0624175071716309d, - +1.06345534324646d, - +1.0644943714141846d, - +1.0655345916748047d, - +1.066575527191162d, - +1.067617654800415d, - +1.0686607360839844d, - +1.0697050094604492d, - +1.0707499980926514d, - +1.071796178817749d, - +1.072843313217163d, - +1.0738916397094727d, - +1.0749409198760986d, - +1.075991153717041d, - +1.0770423412322998d, - +1.078094720840454d, - +1.0791480541229248d, - +1.080202341079712d, - +1.0812578201293945d, - +1.0823142528533936d, - +1.083371639251709d, - +1.08443021774292d, - +1.0854897499084473d, - +1.086550235748291d, - +1.0876119136810303d, - +1.088674545288086d, - +1.089738130569458d, - +1.0908029079437256d, - +1.0918686389923096d, - +1.092935562133789d, - +1.094003438949585d, - +1.0950722694396973d, - +1.096142053604126d, - +1.0972130298614502d, - +1.09828519821167d, - +1.099358320236206d, - +1.1004323959350586d, - +1.1015074253082275d, - +1.102583646774292d, - +1.103661060333252d, - +1.1047391891479492d, - +1.105818748474121d, - +1.1068990230560303d, - +1.107980489730835d, - +1.1090631484985352d, - +1.1101467609405518d, - +1.1112313270568848d, - +1.1123170852661133d, - +1.1134037971496582d, - +1.1144917011260986d, - +1.1155805587768555d, - +1.1166706085205078d, - +1.1177616119384766d, - +1.1188538074493408d, - +1.1199469566345215d, - +1.1210410594940186d, - +1.1221363544464111d, - +1.1232328414916992d, - +1.1243302822113037d, - +1.1254286766052246d, - +1.126528263092041d, - +1.127629041671753d, - +1.1287307739257812d, - +1.129833459854126d, - +1.1309373378753662d, - +1.132042407989502d, - +1.133148431777954d, - +1.1342556476593018d, - +1.1353638172149658d, - +1.1364731788635254d, - +1.1375834941864014d, - +1.1386950016021729d, - +1.1398074626922607d, - +1.1409211158752441d, - +1.142035961151123d, - +1.1431517601013184d, - +1.14426851272583d, - +1.1453864574432373d, - +1.14650559425354d, - +1.1476259231567383d, - +1.148747205734253d, - +1.149869441986084d, - +1.1509928703308105d, - +1.1521174907684326d, - +1.153243064880371d, - +1.154369831085205d, - +1.1554977893829346d, - +1.1566267013549805d, - +1.1577568054199219d, - +1.1588881015777588d, - +1.160020351409912d, - +1.161153793334961d, - +1.1622881889343262d, - +1.163423776626587d, - +1.1645605564117432d, - +1.1656982898712158d, - +1.166837215423584d, - +1.1679773330688477d, - +1.1691184043884277d, - +1.1702606678009033d, - +1.1714041233062744d, - +1.172548532485962d, - +1.173694133758545d, - +1.1748409271240234d, - +1.1759889125823975d, - +1.177137851715088d, - +1.1782879829406738d, - +1.1794393062591553d, - +1.1805915832519531d, - +1.1817450523376465d, - +1.1828997135162354d, - +1.1840553283691406d, - +1.1852121353149414d, - +1.1863701343536377d, - +1.1875293254852295d, - +1.1886897087097168d, - +1.1898510456085205d, - +1.1910135746002197d, - +1.1921772956848145d, - +1.1933419704437256d, - +1.1945080757141113d, - +1.1956751346588135d, - +1.1968433856964111d, - +1.1980125904083252d, - +1.1991832256317139d, - +1.200354814529419d, - +1.2015275955200195d, - +1.2027015686035156d, - +1.2038767337799072d, - +1.2050528526306152d, - +1.2062301635742188d, - +1.2074086666107178d, - +1.2085883617401123d, - +1.2097692489624023d, - +1.210951328277588d, - +1.2121343612670898d, - +1.2133188247680664d, - +1.2145042419433594d, - +1.2156908512115479d, - +1.2168786525726318d, - +1.2180676460266113d, - +1.2192575931549072d, - +1.2204489707946777d, - +1.2216413021087646d, - +1.222834825515747d, - +1.224029779434204d, - +1.2252256870269775d, - +1.2264227867126465d, - +1.227621078491211d, - +1.2288203239440918d, - +1.2300209999084473d, - +1.2312228679656982d, - +1.2324256896972656d, - +1.2336299419403076d, - +1.234835147857666d, - +1.23604154586792d, - +1.2372493743896484d, - +1.2384581565856934d, - +1.2396681308746338d, - +1.2408792972564697d, - +1.2420918941497803d, - +1.2433054447174072d, - +1.2445201873779297d, - +1.2457361221313477d, - +1.2469532489776611d, - +1.2481715679168701d, - +1.2493910789489746d, - +1.2506117820739746d, - +1.2518336772918701d, - +1.2530567646026611d, - +1.2542810440063477d, - +1.2555065155029297d, - +1.2567331790924072d, - +1.2579610347747803d, - +1.2591900825500488d, - +1.260420322418213d, - +1.2616519927978516d, - +1.2628846168518066d, - +1.2641184329986572d, - +1.2653534412384033d, - +1.266589879989624d, - +1.2678272724151611d, - +1.2690660953521729d, - +1.27030611038208d, - +1.2715470790863037d, - +1.272789478302002d, - +1.2740330696105957d, - +1.275277853012085d, - +1.2765238285064697d, - +1.27777099609375d, - +1.2790195941925049d, - +1.2802691459655762d, - +1.281519889831543d, - +1.2827720642089844d, - +1.2840254306793213d, - +1.2852799892425537d, - +1.2865357398986816d, - +1.287792682647705d, - +1.2890510559082031d, - +1.2903103828430176d, - +1.2915711402893066d, - +1.2928330898284912d, - +1.2940962314605713d, - +1.2953605651855469d, - +1.296626091003418d, - +1.2978930473327637d, - +1.2991611957550049d, - +1.3004305362701416d, - +1.3017010688781738d, - +1.3029727935791016d, - +1.304245948791504d, - +1.3055200576782227d, - +1.3067958354949951d, - +1.308072566986084d, - +1.3093504905700684d, - +1.3106298446655273d, - +1.3119103908538818d, - +1.3131921291351318d, - +1.3144752979278564d, - +1.3157594203948975d, - +1.317044973373413d, - +1.3183319568634033d, - +1.31961989402771d, - +1.3209092617034912d, - +1.322199821472168d, - +1.3234915733337402d, - +1.324784755706787d, - +1.3260791301727295d, - +1.3273746967315674d, - +1.3286716938018799d, - +1.329969882965088d, - +1.3312692642211914d, - +1.3325698375701904d, - +1.333871841430664d, - +1.3351752758026123d, - +1.336479663848877d, - +1.3377854824066162d, - +1.339092493057251d, - +1.3404009342193604d, - +1.3417105674743652d, - +1.3430213928222656d, - +1.3443336486816406d, - +1.3456470966339111d, - +1.3469617366790771d, - +1.3482778072357178d, - +1.349595069885254d, - +1.3509137630462646d, - +1.352233648300171d, - +1.3535549640655518d, - +1.3548774719238281d, - +1.356201171875d, - +1.3575263023376465d, - +1.3588526248931885d, - +1.360180139541626d, - +1.361509084701538d, - +1.3628394603729248d, - +1.364171028137207d, - +1.3655037879943848d, - +1.366837978363037d, - +1.368173360824585d, - +1.3695101737976074d, - +1.3708481788635254d, - +1.372187614440918d, - +1.373528242111206d, - +1.3748703002929688d, - +1.376213550567627d, - +1.3775582313537598d, - +1.378904104232788d, - +1.380251407623291d, - +1.3815999031066895d, - +1.3829498291015625d, - +1.384300947189331d, - +1.3856534957885742d, - +1.387007236480713d, - +1.3883624076843262d, - +1.389719009399414d, - +1.3910768032073975d, - +1.3924360275268555d, - +1.393796443939209d, - +1.395158290863037d, - +1.3965213298797607d, - +1.397885799407959d, - +1.3992514610290527d, - +1.4006187915802002d, - +1.401987075805664d, - +1.4033570289611816d, - +1.4047281742095947d, - +1.4061005115509033d, - +1.4074742794036865d, - +1.4088494777679443d, - +1.4102261066436768d, - +1.4116039276123047d, - +1.4129831790924072d, - +1.4143636226654053d, - +1.415745496749878d, - +1.4171288013458252d, - +1.418513298034668d, - +1.4198992252349854d, - +1.4212865829467773d, - +1.4226751327514648d, - +1.424065351486206d, - +1.4254565238952637d, - +1.426849365234375d, - +1.4282433986663818d, - +1.4296388626098633d, - +1.4310357570648193d, - +1.432433843612671d, - +1.433833360671997d, - +1.4352343082427979d, - +1.4366366863250732d, - +1.4380402565002441d, - +1.4394452571868896d, - +1.4408516883850098d, - +1.4422595500946045d, - +1.4436686038970947d, - +1.4450790882110596d, - +1.446491003036499d, - +1.447904348373413d, - +1.4493188858032227d, - +1.450735092163086d, - +1.4521524906158447d, - +1.4535713195800781d, - +1.454991340637207d, - +1.4564130306243896d, - +1.4578359127044678d, - +1.4592602252960205d, - +1.460686206817627d, - +1.4621131420135498d, - +1.4635417461395264d, - +1.4649717807769775d, - +1.4664030075073242d, - +1.4678359031677246d, - +1.4692699909210205d, - +1.470705509185791d, - +1.4721424579620361d, - +1.4735808372497559d, - +1.475020408630371d, - +1.47646164894104d, - +1.4779040813446045d, - +1.4793481826782227d, - +1.4807934761047363d, - +1.4822404384613037d, - +1.4836885929107666d, - +1.485138177871704d, - +1.4865891933441162d, - +1.488041639328003d, - +1.4894955158233643d, - +1.4909508228302002d, - +1.4924075603485107d, - +1.493865728378296d, - +1.4953253269195557d, - +1.49678635597229d, - +1.49824857711792d, - +1.4997124671936035d, - +1.5011777877807617d, - +1.5026445388793945d, - +1.504112720489502d, - +1.505582332611084d, - +1.5070531368255615d, - +1.5085256099700928d, - +1.5099995136260986d, - +1.511474847793579d, - +1.5129516124725342d, - +1.5144298076629639d, - +1.5159096717834473d, - +1.5173907279968262d, - +1.5188732147216797d, - +1.5203571319580078d, - +1.5218427181243896d, - +1.523329496383667d, - +1.524817943572998d, - +1.5263078212738037d, - +1.5277988910675049d, - +1.5292916297912598d, - +1.5307857990264893d, - +1.5322813987731934d, - +1.5337786674499512d, - +1.5352771282196045d, - +1.5367772579193115d, - +1.538278579711914d, - +1.5397815704345703d, - +1.5412859916687012d, - +1.5427920818328857d, - +1.5442993640899658d, - +1.5458080768585205d, - +1.547318458557129d, - +1.548830270767212d, - +1.5503435134887695d, - +1.5518584251403809d, - +1.5533745288848877d, - +1.5548923015594482d, - +1.5564115047454834d, - +1.5579321384429932d, - +1.5594542026519775d, - +1.5609779357910156d, - +1.5625030994415283d, - +1.5640296936035156d, - +1.5655577182769775d, - +1.5670874118804932d, - +1.5686185359954834d, - +1.5701510906219482d, - +1.5716853141784668d, - +1.5732207298278809d, - +1.5747578144073486d, - +1.5762965679168701d, - +1.577836513519287d, - +1.5793781280517578d, - +1.5809214115142822d, - +1.5824658870697021d, - +1.5840120315551758d, - +1.5855598449707031d, - +1.587108850479126d, - +1.5886595249176025d, - +1.5902118682861328d, - +1.5917654037475586d, - +1.593320608139038d, - +1.5948774814605713d, - +1.596435785293579d, - +1.5979955196380615d, - +1.5995566844940186d, - +1.6011195182800293d, - +1.6026840209960938d, - +1.6042497158050537d, - +1.6058173179626465d, - +1.6073861122131348d, - +1.6089565753936768d, - +1.6105287075042725d, - +1.6121022701263428d, - +1.6136772632598877d, - +1.6152539253234863d, - +1.6168320178985596d, - +1.6184117794036865d, - +1.619992971420288d, - +1.6215758323669434d, - +1.6231601238250732d, - +1.6247460842132568d, - +1.626333475112915d, - +1.627922534942627d, - +1.6295130252838135d, - +1.6311051845550537d, - +1.6326987743377686d, - +1.634294033050537d, - +1.6358907222747803d, - +1.6374890804290771d, - +1.6390891075134277d, - +1.640690565109253d, - +1.6422934532165527d, - +1.6438980102539062d, - +1.6455042362213135d, - +1.6471118927001953d, - +1.6487212181091309d, - +1.6503322124481201d, - +1.651944637298584d, - +1.6535584926605225d, - +1.6551742553710938d, - +1.6567914485931396d, - +1.6584100723266602d, - +1.6600303649902344d, - +1.6616523265838623d, - +1.663275957107544d, - +1.6649010181427002d, - +1.666527509689331d, - +1.6681559085845947d, - +1.669785737991333d, - +1.671417236328125d, - +1.6730501651763916d, - +1.674684762954712d, - +1.676321029663086d, - +1.6779589653015137d, - +1.679598331451416d, - +1.681239366531372d, - +1.6828820705413818d, - +1.6845262050628662d, - +1.6861720085144043d, - +1.687819480895996d, - +1.6894686222076416d, - +1.6911191940307617d, - +1.6927716732025146d, - +1.6944255828857422d, - +1.6960809230804443d, - +1.6977381706237793d, - +1.6993968486785889d, - +1.7010571956634521d, - +1.7027192115783691d, - +1.7043828964233398d, - +1.7060482501983643d, - +1.7077150344848633d, - +1.709383487701416d, - +1.7110536098480225d, - +1.7127254009246826d, - +1.7143988609313965d, - +1.716073989868164d, - +1.7177505493164062d, - +1.7194287776947021d, - +1.7211089134216309d, - +1.7227904796600342d, - +1.7244737148284912d, - +1.726158618927002d, - +1.7278449535369873d, - +1.7295331954956055d, - +1.7312231063842773d, - +1.7329144477844238d, - +1.7346076965332031d, - +1.736302375793457d, - +1.7379989624023438d, - +1.739696979522705d, - +1.7413966655731201d, - +1.7430980205535889d, - +1.7448012828826904d, - +1.7465059757232666d, - +1.7482123374938965d, - +1.74992036819458d, - +1.7516300678253174d, - +1.7533416748046875d, - +1.7550547122955322d, - +1.7567694187164307d, - +1.7584857940673828d, - +1.7602040767669678d, - +1.7619237899780273d, - +1.7636451721191406d, - +1.7653684616088867d, - +1.7670931816101074d, - +1.768819808959961d, - +1.770547866821289d, - +1.77227783203125d, - +1.7740094661712646d, - +1.775742769241333d, - +1.777477741241455d, - +1.7792143821716309d, - +1.7809526920318604d, - +1.7826926708221436d, - +1.7844345569610596d, - +1.7861778736114502d, - +1.7879230976104736d, - +1.7896699905395508d, - +1.7914185523986816d, - +1.7931687831878662d, - +1.7949209213256836d, - +1.7966744899749756d, - +1.7984299659729004d, - +1.800187110900879d, - +1.8019459247589111d, - +1.8037066459655762d, - +1.8054687976837158d, - +1.8072328567504883d, - +1.8089985847473145d, - +1.8107659816741943d, - +1.812535285949707d, - +1.8143062591552734d, - +1.8160789012908936d, - +1.8178532123565674d, - +1.819629430770874d, - +1.8214070796966553d, - +1.8231868743896484d, - +1.8249680995941162d, - +1.8267512321472168d, - +1.828536033630371d, - +1.830322504043579d, - +1.83211088180542d, - +1.8339009284973145d, - +1.8356926441192627d, - +1.8374862670898438d, - +1.8392815589904785d, - +1.841078519821167d, - +1.8428773880004883d, - +1.8446779251098633d, - +1.846480131149292d, - +1.8482842445373535d, - +1.8500902652740479d, - +1.8518977165222168d, - +1.8537070751190186d, - +1.8555183410644531d, - +1.8573312759399414d, - +1.8591458797454834d, - +1.8609623908996582d, - +1.8627805709838867d, - +1.864600658416748d, - +1.866422414779663d, - +1.8682458400726318d, - +1.8700714111328125d, - +1.8718984127044678d, - +1.8737273216247559d, - +1.8755581378936768d, - +1.8773906230926514d, - +1.8792247772216797d, - +1.8810608386993408d, - +1.8828988075256348d, - +1.8847384452819824d, - +1.886579990386963d, - +1.888423204421997d, - +1.890268325805664d, - +1.8921151161193848d, - +1.8939638137817383d, - +1.8958141803741455d, - +1.8976664543151855d, - +1.8995206356048584d, - +1.901376485824585d, - +1.9032342433929443d, - +1.9050939083099365d, - +1.9069552421569824d, - +1.908818244934082d, - +1.9106833934783936d, - +1.9125502109527588d, - +1.9144186973571777d, - +1.9162893295288086d, - +1.9181616306304932d, - +1.9200356006622314d, - +1.9219114780426025d, - +1.9237892627716064d, - +1.9256689548492432d, - +1.9275505542755127d, - +1.929433822631836d, - +1.931318759918213d, - +1.9332058429718018d, - +1.9350945949554443d, - +1.9369852542877197d, - +1.938877820968628d, - +1.940772294998169d, - +1.9426684379577637d, - +1.9445664882659912d, - +1.9464664459228516d, - +1.9483680725097656d, - +1.9502718448638916d, - +1.9521772861480713d, - +1.9540846347808838d, - +1.955993890762329d, - +1.9579050540924072d, - +1.959817886352539d, - +1.9617326259613037d, - +1.9636495113372803d, - +1.9655680656433105d, - +1.9674885272979736d, - +1.9694106578826904d, - +1.9713349342346191d, - +1.9732608795166016d, - +1.975188970565796d, - +1.977118730545044d, - +1.9790503978729248d, - +1.9809842109680176d, - +1.982919692993164d, - +1.9848570823669434d, - +1.9867963790893555d, - +1.9887375831604004d, - +1.990680456161499d, - +1.9926254749298096d, - +1.994572401046753d, - +1.996521234512329d, - +1.998471736907959d, - +2.000424385070801d, - +2.0023789405822754d, - +2.004335403442383d, - +2.006293773651123d, - +2.008254051208496d, - +2.010216236114502d, - +2.0121798515319824d, - +2.014145851135254d, - +2.016113758087158d, - +2.0180835723876953d, - +2.0200552940368652d, - +2.022029399871826d, - +2.0240049362182617d, - +2.02598237991333d, - +2.0279617309570312d, - +2.0299429893493652d, - +2.0319266319274902d, - +2.03391170501709d, - +2.0358991622924805d, - +2.0378880500793457d, - +2.039879322052002d, - +2.041872501373291d, - +2.0438671112060547d, - +2.0458641052246094d, - +2.047863006591797d, - +2.049863815307617d, - +2.0518670082092285d, - +2.0538716316223145d, - +2.055878162384033d, - +2.057887077331543d, - +2.0598974227905273d, - +2.0619101524353027d, - +2.063924789428711d, - +2.065941333770752d, - +2.067959785461426d, - +2.0699801445007324d, - +2.07200288772583d, - +2.0740270614624023d, - +2.0760536193847656d, - +2.0780820846557617d, - +2.0801124572753906d, - +2.0821447372436523d, - +2.084178924560547d, - +2.0862154960632324d, - +2.0882534980773926d, - +2.0902938842773438d, - +2.0923361778259277d, - +2.0943803787231445d, - +2.0964269638061523d, - +2.0984749794006348d, - +2.100525379180908d, - +2.1025776863098145d, - +2.1046319007873535d, - +2.1066884994506836d, - +2.1087465286254883d, - +2.110806941986084d, - +2.1128692626953125d, - +2.114933490753174d, - +2.117000102996826d, - +2.1190686225891113d, - +2.1211390495300293d, - +2.12321138381958d, - +2.1252856254577637d, - +2.1273622512817383d, - +2.1294407844543457d, - +2.131521224975586d, - +2.133604049682617d, - +2.135688304901123d, - +2.13777494430542d, - +2.139863967895508d, - +2.1419544219970703d, - +2.144047260284424d, - +2.14614200592041d, - +2.1482391357421875d, - +2.1503376960754395d, - +2.1524391174316406d, - +2.1545419692993164d, - +2.156647205352783d, - +2.1587538719177246d, - +2.1608633995056152d, - +2.1629743576049805d, - +2.1650876998901367d, - +2.167203426361084d, - +2.169320583343506d, - +2.1714401245117188d, - +2.1735615730285645d, - +2.175685405731201d, - +2.1778111457824707d, - +2.179938793182373d, - +2.1820688247680664d, - +2.1842007637023926d, - +2.1863350868225098d, - +2.1884708404541016d, - +2.1906094551086426d, - +2.192749500274658d, - +2.194891929626465d, - +2.1970362663269043d, - +2.1991829872131348d, - +2.201331615447998d, - +2.2034826278686523d, - +2.2056355476379395d, - +2.2077903747558594d, - +2.2099475860595703d, - +2.212106704711914d, - +2.214268207550049d, - +2.2164316177368164d, - +2.218596935272217d, - +2.220764636993408d, - +2.2229342460632324d, - +2.2251062393188477d, - +2.2272801399230957d, - +2.2294564247131348d, - +2.2316346168518066d, - +2.2338151931762695d, - +2.2359976768493652d, - +2.2381820678710938d, - +2.2403693199157715d, - +2.242558002471924d, - +2.244749069213867d, - +2.2469425201416016d, - +2.2491378784179688d, - +2.2513351440429688d, - +2.2535347938537598d, - +2.2557363510131836d, - +2.2579402923583984d, - +2.2601466178894043d, - +2.262354850769043d, - +2.2645654678344727d, - +2.266777992248535d, - +2.2689924240112305d, - +2.271209716796875d, - +2.273428440093994d, - +2.2756495475769043d, - +2.2778730392456055d, - +2.2800989151000977d, - +2.2823266983032227d, - +2.2845563888549805d, - +2.2867884635925293d, - +2.289022922515869d, - +2.291259288787842d, - +2.2934980392456055d, - +2.295738697052002d, - +2.2979817390441895d, - +2.300227165222168d, - +2.3024744987487793d, - +2.3047242164611816d, - +2.306975841522217d, - +2.309229850769043d, - +2.31148624420166d, - +2.31374454498291d, - +2.316005229949951d, - +2.318267822265625d, - +2.32053279876709d, - +2.3228001594543457d, - +2.3250694274902344d, - +2.3273415565490723d, - +2.3296151161193848d, - +2.3318915367126465d, - +2.334169864654541d, - +2.3364500999450684d, - +2.338733196258545d, - +2.3410181999206543d, - +2.3433055877685547d, - +2.345594882965088d, - +2.347886562347412d, - +2.3501806259155273d, - +2.3524770736694336d, - +2.3547754287719727d, - +2.3570761680603027d, - +2.3593788146972656d, - +2.3616843223571777d, - +2.3639917373657227d, - +2.3663015365600586d, - +2.3686132431030273d, - +2.370927333831787d, - +2.373243808746338d, - +2.3755626678466797d, - +2.3778839111328125d, - +2.380207061767578d, - +2.3825325965881348d, - +2.3848605155944824d, - +2.387190818786621d, - +2.3895230293273926d, - +2.391857624053955d, - +2.3941946029663086d, - +2.396533966064453d, - +2.3988752365112305d, - +2.401218891143799d, - +2.4035654067993164d, - +2.4059133529663086d, - +2.40826416015625d, - +2.4106173515319824d, - +2.4129724502563477d, - +2.415329933166504d, - +2.417689800262451d, - +2.4200520515441895d, - +2.4224166870117188d, - +2.424783229827881d, - +2.427152633666992d, - +2.4295239448547363d, - +2.4318976402282715d, - +2.4342737197875977d, - +2.436652183532715d, - +2.439032554626465d, - +2.441415786743164d, - +2.4438014030456543d, - +2.4461889266967773d, - +2.4485788345336914d, - +2.4509711265563965d, - +2.4533658027648926d, - +2.4557628631591797d, - +2.458162307739258d, - +2.460564136505127d, - +2.462968349456787d, - +2.46537446975708d, - +2.4677834510803223d, - +2.4701943397521973d, - +2.4726080894470215d, - +2.4750237464904785d, - +2.4774417877197266d, - +2.479862689971924d, - +2.482285499572754d, - +2.484710693359375d, - +2.487138271331787d, - +2.4895682334899902d, - +2.4920010566711426d, - +2.4944357872009277d, - +2.496872901916504d, - +2.499312400817871d, - +2.5017542839050293d, - +2.5041985511779785d, - +2.5066452026367188d, - +2.50909423828125d, - +2.5115456581115723d, - +2.5139999389648438d, - +2.516456127166748d, - +2.5189146995544434d, - +2.5213756561279297d, - +2.5238394737243652d, - +2.5263051986694336d, - +2.528773307800293d, - +2.5312442779541016d, - +2.533717155456543d, - +2.5361928939819336d, - +2.538670539855957d, - +2.5411510467529297d, - +2.5436339378356934d, - +2.546119213104248d, - +2.5486068725585938d, - +2.5510969161987305d, - +2.553589344024658d, - +2.556084632873535d, - +2.558581829071045d, - +2.5610814094543457d, - +2.5635838508605957d, - +2.5660886764526367d, - +2.5685958862304688d, - +2.571105480194092d, - +2.573617458343506d, - +2.576131820678711d, - +2.5786490440368652d, - +2.5811686515808105d, - +2.5836901664733887d, - +2.586214542388916d, - +2.5887417793273926d, - +2.591270923614502d, - +2.5938024520874023d, - +2.596336841583252d, - +2.5988736152648926d, - +2.601412773132324d, - +2.603954315185547d, - +2.6064987182617188d, - +2.6090455055236816d, - +2.6115946769714355d, - +2.6141462326049805d, - +2.6167001724243164d, - +2.6192569732666016d, - +2.6218161582946777d, - +2.624377727508545d, - +2.626941680908203d, - +2.6295084953308105d, - +2.632077217102051d, - +2.6346492767333984d, - +2.637223243713379d, - +2.6398000717163086d, - +2.6423792839050293d, - +2.644960880279541d, - +2.6475448608398438d, - +2.6501317024230957d, - +2.6527209281921387d, - +2.655313014984131d, - +2.657907009124756d, - +2.6605043411254883d, - +2.6631035804748535d, - +2.665705680847168d, - +2.6683101654052734d, - +2.67091703414917d, - +2.6735267639160156d, - +2.6761388778686523d, - +2.67875337600708d, - +2.681370735168457d, - +2.683990478515625d, - +2.686613082885742d, - +2.689237594604492d, - +2.6918654441833496d, - +2.69449520111084d, - +2.6971278190612793d, - +2.699763298034668d, - +2.7024011611938477d, - +2.7050414085388184d, - +2.70768404006958d, - +2.710329532623291d, - +2.712977886199951d, - +2.7156286239624023d, - +2.7182817459106445d, + +1.0d, + +1.0009770393371582d, + +1.0019550323486328d, + +1.0029339790344238d, + +1.0039138793945312d, + +1.004894733428955d, + +1.0058765411376953d, + +1.006859302520752d, + +1.007843017578125d, + +1.0088276863098145d, + +1.0098135471343994d, + +1.0108001232147217d, + +1.0117876529693604d, + +1.0127761363983154d, + +1.013765811920166d, + +1.014756202697754d, + +1.0157477855682373d, + +1.016740083694458d, + +1.0177335739135742d, + +1.0187277793884277d, + +1.0197231769561768d, + +1.0207195281982422d, + +1.021716833114624d, + +1.0227150917053223d, + +1.023714303970337d, + +1.024714469909668d, + +1.0257158279418945d, + +1.0267179012298584d, + +1.0277209281921387d, + +1.0287251472473145d, + +1.0297303199768066d, + +1.0307364463806152d, + +1.0317435264587402d, + +1.0327515602111816d, + +1.0337605476379395d, + +1.0347704887390137d, + +1.0357816219329834d, + +1.0367934703826904d, + +1.037806510925293d, + +1.038820505142212d, + +1.0398354530334473d, + +1.040851354598999d, + +1.0418684482574463d, + +1.0428862571716309d, + +1.043905258178711d, + +1.0449252128601074d, + +1.0459461212158203d, + +1.0469679832458496d, + +1.0479910373687744d, + +1.0490150451660156d, + +1.0500397682189941d, + +1.0510656833648682d, + +1.0520927906036377d, + +1.0531206130981445d, + +1.0541496276855469d, + +1.0551795959472656d, + +1.0562105178833008d, + +1.0572423934936523d, + +1.0582754611968994d, + +1.059309482574463d, + +1.0603444576263428d, + +1.061380386352539d, + +1.0624175071716309d, + +1.06345534324646d, + +1.0644943714141846d, + +1.0655345916748047d, + +1.066575527191162d, + +1.067617654800415d, + +1.0686607360839844d, + +1.0697050094604492d, + +1.0707499980926514d, + +1.071796178817749d, + +1.072843313217163d, + +1.0738916397094727d, + +1.0749409198760986d, + +1.075991153717041d, + +1.0770423412322998d, + +1.078094720840454d, + +1.0791480541229248d, + +1.080202341079712d, + +1.0812578201293945d, + +1.0823142528533936d, + +1.083371639251709d, + +1.08443021774292d, + +1.0854897499084473d, + +1.086550235748291d, + +1.0876119136810303d, + +1.088674545288086d, + +1.089738130569458d, + +1.0908029079437256d, + +1.0918686389923096d, + +1.092935562133789d, + +1.094003438949585d, + +1.0950722694396973d, + +1.096142053604126d, + +1.0972130298614502d, + +1.09828519821167d, + +1.099358320236206d, + +1.1004323959350586d, + +1.1015074253082275d, + +1.102583646774292d, + +1.103661060333252d, + +1.1047391891479492d, + +1.105818748474121d, + +1.1068990230560303d, + +1.107980489730835d, + +1.1090631484985352d, + +1.1101467609405518d, + +1.1112313270568848d, + +1.1123170852661133d, + +1.1134037971496582d, + +1.1144917011260986d, + +1.1155805587768555d, + +1.1166706085205078d, + +1.1177616119384766d, + +1.1188538074493408d, + +1.1199469566345215d, + +1.1210410594940186d, + +1.1221363544464111d, + +1.1232328414916992d, + +1.1243302822113037d, + +1.1254286766052246d, + +1.126528263092041d, + +1.127629041671753d, + +1.1287307739257812d, + +1.129833459854126d, + +1.1309373378753662d, + +1.132042407989502d, + +1.133148431777954d, + +1.1342556476593018d, + +1.1353638172149658d, + +1.1364731788635254d, + +1.1375834941864014d, + +1.1386950016021729d, + +1.1398074626922607d, + +1.1409211158752441d, + +1.142035961151123d, + +1.1431517601013184d, + +1.14426851272583d, + +1.1453864574432373d, + +1.14650559425354d, + +1.1476259231567383d, + +1.148747205734253d, + +1.149869441986084d, + +1.1509928703308105d, + +1.1521174907684326d, + +1.153243064880371d, + +1.154369831085205d, + +1.1554977893829346d, + +1.1566267013549805d, + +1.1577568054199219d, + +1.1588881015777588d, + +1.160020351409912d, + +1.161153793334961d, + +1.1622881889343262d, + +1.163423776626587d, + +1.1645605564117432d, + +1.1656982898712158d, + +1.166837215423584d, + +1.1679773330688477d, + +1.1691184043884277d, + +1.1702606678009033d, + +1.1714041233062744d, + +1.172548532485962d, + +1.173694133758545d, + +1.1748409271240234d, + +1.1759889125823975d, + +1.177137851715088d, + +1.1782879829406738d, + +1.1794393062591553d, + +1.1805915832519531d, + +1.1817450523376465d, + +1.1828997135162354d, + +1.1840553283691406d, + +1.1852121353149414d, + +1.1863701343536377d, + +1.1875293254852295d, + +1.1886897087097168d, + +1.1898510456085205d, + +1.1910135746002197d, + +1.1921772956848145d, + +1.1933419704437256d, + +1.1945080757141113d, + +1.1956751346588135d, + +1.1968433856964111d, + +1.1980125904083252d, + +1.1991832256317139d, + +1.200354814529419d, + +1.2015275955200195d, + +1.2027015686035156d, + +1.2038767337799072d, + +1.2050528526306152d, + +1.2062301635742188d, + +1.2074086666107178d, + +1.2085883617401123d, + +1.2097692489624023d, + +1.210951328277588d, + +1.2121343612670898d, + +1.2133188247680664d, + +1.2145042419433594d, + +1.2156908512115479d, + +1.2168786525726318d, + +1.2180676460266113d, + +1.2192575931549072d, + +1.2204489707946777d, + +1.2216413021087646d, + +1.222834825515747d, + +1.224029779434204d, + +1.2252256870269775d, + +1.2264227867126465d, + +1.227621078491211d, + +1.2288203239440918d, + +1.2300209999084473d, + +1.2312228679656982d, + +1.2324256896972656d, + +1.2336299419403076d, + +1.234835147857666d, + +1.23604154586792d, + +1.2372493743896484d, + +1.2384581565856934d, + +1.2396681308746338d, + +1.2408792972564697d, + +1.2420918941497803d, + +1.2433054447174072d, + +1.2445201873779297d, + +1.2457361221313477d, + +1.2469532489776611d, + +1.2481715679168701d, + +1.2493910789489746d, + +1.2506117820739746d, + +1.2518336772918701d, + +1.2530567646026611d, + +1.2542810440063477d, + +1.2555065155029297d, + +1.2567331790924072d, + +1.2579610347747803d, + +1.2591900825500488d, + +1.260420322418213d, + +1.2616519927978516d, + +1.2628846168518066d, + +1.2641184329986572d, + +1.2653534412384033d, + +1.266589879989624d, + +1.2678272724151611d, + +1.2690660953521729d, + +1.27030611038208d, + +1.2715470790863037d, + +1.272789478302002d, + +1.2740330696105957d, + +1.275277853012085d, + +1.2765238285064697d, + +1.27777099609375d, + +1.2790195941925049d, + +1.2802691459655762d, + +1.281519889831543d, + +1.2827720642089844d, + +1.2840254306793213d, + +1.2852799892425537d, + +1.2865357398986816d, + +1.287792682647705d, + +1.2890510559082031d, + +1.2903103828430176d, + +1.2915711402893066d, + +1.2928330898284912d, + +1.2940962314605713d, + +1.2953605651855469d, + +1.296626091003418d, + +1.2978930473327637d, + +1.2991611957550049d, + +1.3004305362701416d, + +1.3017010688781738d, + +1.3029727935791016d, + +1.304245948791504d, + +1.3055200576782227d, + +1.3067958354949951d, + +1.308072566986084d, + +1.3093504905700684d, + +1.3106298446655273d, + +1.3119103908538818d, + +1.3131921291351318d, + +1.3144752979278564d, + +1.3157594203948975d, + +1.317044973373413d, + +1.3183319568634033d, + +1.31961989402771d, + +1.3209092617034912d, + +1.322199821472168d, + +1.3234915733337402d, + +1.324784755706787d, + +1.3260791301727295d, + +1.3273746967315674d, + +1.3286716938018799d, + +1.329969882965088d, + +1.3312692642211914d, + +1.3325698375701904d, + +1.333871841430664d, + +1.3351752758026123d, + +1.336479663848877d, + +1.3377854824066162d, + +1.339092493057251d, + +1.3404009342193604d, + +1.3417105674743652d, + +1.3430213928222656d, + +1.3443336486816406d, + +1.3456470966339111d, + +1.3469617366790771d, + +1.3482778072357178d, + +1.349595069885254d, + +1.3509137630462646d, + +1.352233648300171d, + +1.3535549640655518d, + +1.3548774719238281d, + +1.356201171875d, + +1.3575263023376465d, + +1.3588526248931885d, + +1.360180139541626d, + +1.361509084701538d, + +1.3628394603729248d, + +1.364171028137207d, + +1.3655037879943848d, + +1.366837978363037d, + +1.368173360824585d, + +1.3695101737976074d, + +1.3708481788635254d, + +1.372187614440918d, + +1.373528242111206d, + +1.3748703002929688d, + +1.376213550567627d, + +1.3775582313537598d, + +1.378904104232788d, + +1.380251407623291d, + +1.3815999031066895d, + +1.3829498291015625d, + +1.384300947189331d, + +1.3856534957885742d, + +1.387007236480713d, + +1.3883624076843262d, + +1.389719009399414d, + +1.3910768032073975d, + +1.3924360275268555d, + +1.393796443939209d, + +1.395158290863037d, + +1.3965213298797607d, + +1.397885799407959d, + +1.3992514610290527d, + +1.4006187915802002d, + +1.401987075805664d, + +1.4033570289611816d, + +1.4047281742095947d, + +1.4061005115509033d, + +1.4074742794036865d, + +1.4088494777679443d, + +1.4102261066436768d, + +1.4116039276123047d, + +1.4129831790924072d, + +1.4143636226654053d, + +1.415745496749878d, + +1.4171288013458252d, + +1.418513298034668d, + +1.4198992252349854d, + +1.4212865829467773d, + +1.4226751327514648d, + +1.424065351486206d, + +1.4254565238952637d, + +1.426849365234375d, + +1.4282433986663818d, + +1.4296388626098633d, + +1.4310357570648193d, + +1.432433843612671d, + +1.433833360671997d, + +1.4352343082427979d, + +1.4366366863250732d, + +1.4380402565002441d, + +1.4394452571868896d, + +1.4408516883850098d, + +1.4422595500946045d, + +1.4436686038970947d, + +1.4450790882110596d, + +1.446491003036499d, + +1.447904348373413d, + +1.4493188858032227d, + +1.450735092163086d, + +1.4521524906158447d, + +1.4535713195800781d, + +1.454991340637207d, + +1.4564130306243896d, + +1.4578359127044678d, + +1.4592602252960205d, + +1.460686206817627d, + +1.4621131420135498d, + +1.4635417461395264d, + +1.4649717807769775d, + +1.4664030075073242d, + +1.4678359031677246d, + +1.4692699909210205d, + +1.470705509185791d, + +1.4721424579620361d, + +1.4735808372497559d, + +1.475020408630371d, + +1.47646164894104d, + +1.4779040813446045d, + +1.4793481826782227d, + +1.4807934761047363d, + +1.4822404384613037d, + +1.4836885929107666d, + +1.485138177871704d, + +1.4865891933441162d, + +1.488041639328003d, + +1.4894955158233643d, + +1.4909508228302002d, + +1.4924075603485107d, + +1.493865728378296d, + +1.4953253269195557d, + +1.49678635597229d, + +1.49824857711792d, + +1.4997124671936035d, + +1.5011777877807617d, + +1.5026445388793945d, + +1.504112720489502d, + +1.505582332611084d, + +1.5070531368255615d, + +1.5085256099700928d, + +1.5099995136260986d, + +1.511474847793579d, + +1.5129516124725342d, + +1.5144298076629639d, + +1.5159096717834473d, + +1.5173907279968262d, + +1.5188732147216797d, + +1.5203571319580078d, + +1.5218427181243896d, + +1.523329496383667d, + +1.524817943572998d, + +1.5263078212738037d, + +1.5277988910675049d, + +1.5292916297912598d, + +1.5307857990264893d, + +1.5322813987731934d, + +1.5337786674499512d, + +1.5352771282196045d, + +1.5367772579193115d, + +1.538278579711914d, + +1.5397815704345703d, + +1.5412859916687012d, + +1.5427920818328857d, + +1.5442993640899658d, + +1.5458080768585205d, + +1.547318458557129d, + +1.548830270767212d, + +1.5503435134887695d, + +1.5518584251403809d, + +1.5533745288848877d, + +1.5548923015594482d, + +1.5564115047454834d, + +1.5579321384429932d, + +1.5594542026519775d, + +1.5609779357910156d, + +1.5625030994415283d, + +1.5640296936035156d, + +1.5655577182769775d, + +1.5670874118804932d, + +1.5686185359954834d, + +1.5701510906219482d, + +1.5716853141784668d, + +1.5732207298278809d, + +1.5747578144073486d, + +1.5762965679168701d, + +1.577836513519287d, + +1.5793781280517578d, + +1.5809214115142822d, + +1.5824658870697021d, + +1.5840120315551758d, + +1.5855598449707031d, + +1.587108850479126d, + +1.5886595249176025d, + +1.5902118682861328d, + +1.5917654037475586d, + +1.593320608139038d, + +1.5948774814605713d, + +1.596435785293579d, + +1.5979955196380615d, + +1.5995566844940186d, + +1.6011195182800293d, + +1.6026840209960938d, + +1.6042497158050537d, + +1.6058173179626465d, + +1.6073861122131348d, + +1.6089565753936768d, + +1.6105287075042725d, + +1.6121022701263428d, + +1.6136772632598877d, + +1.6152539253234863d, + +1.6168320178985596d, + +1.6184117794036865d, + +1.619992971420288d, + +1.6215758323669434d, + +1.6231601238250732d, + +1.6247460842132568d, + +1.626333475112915d, + +1.627922534942627d, + +1.6295130252838135d, + +1.6311051845550537d, + +1.6326987743377686d, + +1.634294033050537d, + +1.6358907222747803d, + +1.6374890804290771d, + +1.6390891075134277d, + +1.640690565109253d, + +1.6422934532165527d, + +1.6438980102539062d, + +1.6455042362213135d, + +1.6471118927001953d, + +1.6487212181091309d, + +1.6503322124481201d, + +1.651944637298584d, + +1.6535584926605225d, + +1.6551742553710938d, + +1.6567914485931396d, + +1.6584100723266602d, + +1.6600303649902344d, + +1.6616523265838623d, + +1.663275957107544d, + +1.6649010181427002d, + +1.666527509689331d, + +1.6681559085845947d, + +1.669785737991333d, + +1.671417236328125d, + +1.6730501651763916d, + +1.674684762954712d, + +1.676321029663086d, + +1.6779589653015137d, + +1.679598331451416d, + +1.681239366531372d, + +1.6828820705413818d, + +1.6845262050628662d, + +1.6861720085144043d, + +1.687819480895996d, + +1.6894686222076416d, + +1.6911191940307617d, + +1.6927716732025146d, + +1.6944255828857422d, + +1.6960809230804443d, + +1.6977381706237793d, + +1.6993968486785889d, + +1.7010571956634521d, + +1.7027192115783691d, + +1.7043828964233398d, + +1.7060482501983643d, + +1.7077150344848633d, + +1.709383487701416d, + +1.7110536098480225d, + +1.7127254009246826d, + +1.7143988609313965d, + +1.716073989868164d, + +1.7177505493164062d, + +1.7194287776947021d, + +1.7211089134216309d, + +1.7227904796600342d, + +1.7244737148284912d, + +1.726158618927002d, + +1.7278449535369873d, + +1.7295331954956055d, + +1.7312231063842773d, + +1.7329144477844238d, + +1.7346076965332031d, + +1.736302375793457d, + +1.7379989624023438d, + +1.739696979522705d, + +1.7413966655731201d, + +1.7430980205535889d, + +1.7448012828826904d, + +1.7465059757232666d, + +1.7482123374938965d, + +1.74992036819458d, + +1.7516300678253174d, + +1.7533416748046875d, + +1.7550547122955322d, + +1.7567694187164307d, + +1.7584857940673828d, + +1.7602040767669678d, + +1.7619237899780273d, + +1.7636451721191406d, + +1.7653684616088867d, + +1.7670931816101074d, + +1.768819808959961d, + +1.770547866821289d, + +1.77227783203125d, + +1.7740094661712646d, + +1.775742769241333d, + +1.777477741241455d, + +1.7792143821716309d, + +1.7809526920318604d, + +1.7826926708221436d, + +1.7844345569610596d, + +1.7861778736114502d, + +1.7879230976104736d, + +1.7896699905395508d, + +1.7914185523986816d, + +1.7931687831878662d, + +1.7949209213256836d, + +1.7966744899749756d, + +1.7984299659729004d, + +1.800187110900879d, + +1.8019459247589111d, + +1.8037066459655762d, + +1.8054687976837158d, + +1.8072328567504883d, + +1.8089985847473145d, + +1.8107659816741943d, + +1.812535285949707d, + +1.8143062591552734d, + +1.8160789012908936d, + +1.8178532123565674d, + +1.819629430770874d, + +1.8214070796966553d, + +1.8231868743896484d, + +1.8249680995941162d, + +1.8267512321472168d, + +1.828536033630371d, + +1.830322504043579d, + +1.83211088180542d, + +1.8339009284973145d, + +1.8356926441192627d, + +1.8374862670898438d, + +1.8392815589904785d, + +1.841078519821167d, + +1.8428773880004883d, + +1.8446779251098633d, + +1.846480131149292d, + +1.8482842445373535d, + +1.8500902652740479d, + +1.8518977165222168d, + +1.8537070751190186d, + +1.8555183410644531d, + +1.8573312759399414d, + +1.8591458797454834d, + +1.8609623908996582d, + +1.8627805709838867d, + +1.864600658416748d, + +1.866422414779663d, + +1.8682458400726318d, + +1.8700714111328125d, + +1.8718984127044678d, + +1.8737273216247559d, + +1.8755581378936768d, + +1.8773906230926514d, + +1.8792247772216797d, + +1.8810608386993408d, + +1.8828988075256348d, + +1.8847384452819824d, + +1.886579990386963d, + +1.888423204421997d, + +1.890268325805664d, + +1.8921151161193848d, + +1.8939638137817383d, + +1.8958141803741455d, + +1.8976664543151855d, + +1.8995206356048584d, + +1.901376485824585d, + +1.9032342433929443d, + +1.9050939083099365d, + +1.9069552421569824d, + +1.908818244934082d, + +1.9106833934783936d, + +1.9125502109527588d, + +1.9144186973571777d, + +1.9162893295288086d, + +1.9181616306304932d, + +1.9200356006622314d, + +1.9219114780426025d, + +1.9237892627716064d, + +1.9256689548492432d, + +1.9275505542755127d, + +1.929433822631836d, + +1.931318759918213d, + +1.9332058429718018d, + +1.9350945949554443d, + +1.9369852542877197d, + +1.938877820968628d, + +1.940772294998169d, + +1.9426684379577637d, + +1.9445664882659912d, + +1.9464664459228516d, + +1.9483680725097656d, + +1.9502718448638916d, + +1.9521772861480713d, + +1.9540846347808838d, + +1.955993890762329d, + +1.9579050540924072d, + +1.959817886352539d, + +1.9617326259613037d, + +1.9636495113372803d, + +1.9655680656433105d, + +1.9674885272979736d, + +1.9694106578826904d, + +1.9713349342346191d, + +1.9732608795166016d, + +1.975188970565796d, + +1.977118730545044d, + +1.9790503978729248d, + +1.9809842109680176d, + +1.982919692993164d, + +1.9848570823669434d, + +1.9867963790893555d, + +1.9887375831604004d, + +1.990680456161499d, + +1.9926254749298096d, + +1.994572401046753d, + +1.996521234512329d, + +1.998471736907959d, + +2.000424385070801d, + +2.0023789405822754d, + +2.004335403442383d, + +2.006293773651123d, + +2.008254051208496d, + +2.010216236114502d, + +2.0121798515319824d, + +2.014145851135254d, + +2.016113758087158d, + +2.0180835723876953d, + +2.0200552940368652d, + +2.022029399871826d, + +2.0240049362182617d, + +2.02598237991333d, + +2.0279617309570312d, + +2.0299429893493652d, + +2.0319266319274902d, + +2.03391170501709d, + +2.0358991622924805d, + +2.0378880500793457d, + +2.039879322052002d, + +2.041872501373291d, + +2.0438671112060547d, + +2.0458641052246094d, + +2.047863006591797d, + +2.049863815307617d, + +2.0518670082092285d, + +2.0538716316223145d, + +2.055878162384033d, + +2.057887077331543d, + +2.0598974227905273d, + +2.0619101524353027d, + +2.063924789428711d, + +2.065941333770752d, + +2.067959785461426d, + +2.0699801445007324d, + +2.07200288772583d, + +2.0740270614624023d, + +2.0760536193847656d, + +2.0780820846557617d, + +2.0801124572753906d, + +2.0821447372436523d, + +2.084178924560547d, + +2.0862154960632324d, + +2.0882534980773926d, + +2.0902938842773438d, + +2.0923361778259277d, + +2.0943803787231445d, + +2.0964269638061523d, + +2.0984749794006348d, + +2.100525379180908d, + +2.1025776863098145d, + +2.1046319007873535d, + +2.1066884994506836d, + +2.1087465286254883d, + +2.110806941986084d, + +2.1128692626953125d, + +2.114933490753174d, + +2.117000102996826d, + +2.1190686225891113d, + +2.1211390495300293d, + +2.12321138381958d, + +2.1252856254577637d, + +2.1273622512817383d, + +2.1294407844543457d, + +2.131521224975586d, + +2.133604049682617d, + +2.135688304901123d, + +2.13777494430542d, + +2.139863967895508d, + +2.1419544219970703d, + +2.144047260284424d, + +2.14614200592041d, + +2.1482391357421875d, + +2.1503376960754395d, + +2.1524391174316406d, + +2.1545419692993164d, + +2.156647205352783d, + +2.1587538719177246d, + +2.1608633995056152d, + +2.1629743576049805d, + +2.1650876998901367d, + +2.167203426361084d, + +2.169320583343506d, + +2.1714401245117188d, + +2.1735615730285645d, + +2.175685405731201d, + +2.1778111457824707d, + +2.179938793182373d, + +2.1820688247680664d, + +2.1842007637023926d, + +2.1863350868225098d, + +2.1884708404541016d, + +2.1906094551086426d, + +2.192749500274658d, + +2.194891929626465d, + +2.1970362663269043d, + +2.1991829872131348d, + +2.201331615447998d, + +2.2034826278686523d, + +2.2056355476379395d, + +2.2077903747558594d, + +2.2099475860595703d, + +2.212106704711914d, + +2.214268207550049d, + +2.2164316177368164d, + +2.218596935272217d, + +2.220764636993408d, + +2.2229342460632324d, + +2.2251062393188477d, + +2.2272801399230957d, + +2.2294564247131348d, + +2.2316346168518066d, + +2.2338151931762695d, + +2.2359976768493652d, + +2.2381820678710938d, + +2.2403693199157715d, + +2.242558002471924d, + +2.244749069213867d, + +2.2469425201416016d, + +2.2491378784179688d, + +2.2513351440429688d, + +2.2535347938537598d, + +2.2557363510131836d, + +2.2579402923583984d, + +2.2601466178894043d, + +2.262354850769043d, + +2.2645654678344727d, + +2.266777992248535d, + +2.2689924240112305d, + +2.271209716796875d, + +2.273428440093994d, + +2.2756495475769043d, + +2.2778730392456055d, + +2.2800989151000977d, + +2.2823266983032227d, + +2.2845563888549805d, + +2.2867884635925293d, + +2.289022922515869d, + +2.291259288787842d, + +2.2934980392456055d, + +2.295738697052002d, + +2.2979817390441895d, + +2.300227165222168d, + +2.3024744987487793d, + +2.3047242164611816d, + +2.306975841522217d, + +2.309229850769043d, + +2.31148624420166d, + +2.31374454498291d, + +2.316005229949951d, + +2.318267822265625d, + +2.32053279876709d, + +2.3228001594543457d, + +2.3250694274902344d, + +2.3273415565490723d, + +2.3296151161193848d, + +2.3318915367126465d, + +2.334169864654541d, + +2.3364500999450684d, + +2.338733196258545d, + +2.3410181999206543d, + +2.3433055877685547d, + +2.345594882965088d, + +2.347886562347412d, + +2.3501806259155273d, + +2.3524770736694336d, + +2.3547754287719727d, + +2.3570761680603027d, + +2.3593788146972656d, + +2.3616843223571777d, + +2.3639917373657227d, + +2.3663015365600586d, + +2.3686132431030273d, + +2.370927333831787d, + +2.373243808746338d, + +2.3755626678466797d, + +2.3778839111328125d, + +2.380207061767578d, + +2.3825325965881348d, + +2.3848605155944824d, + +2.387190818786621d, + +2.3895230293273926d, + +2.391857624053955d, + +2.3941946029663086d, + +2.396533966064453d, + +2.3988752365112305d, + +2.401218891143799d, + +2.4035654067993164d, + +2.4059133529663086d, + +2.40826416015625d, + +2.4106173515319824d, + +2.4129724502563477d, + +2.415329933166504d, + +2.417689800262451d, + +2.4200520515441895d, + +2.4224166870117188d, + +2.424783229827881d, + +2.427152633666992d, + +2.4295239448547363d, + +2.4318976402282715d, + +2.4342737197875977d, + +2.436652183532715d, + +2.439032554626465d, + +2.441415786743164d, + +2.4438014030456543d, + +2.4461889266967773d, + +2.4485788345336914d, + +2.4509711265563965d, + +2.4533658027648926d, + +2.4557628631591797d, + +2.458162307739258d, + +2.460564136505127d, + +2.462968349456787d, + +2.46537446975708d, + +2.4677834510803223d, + +2.4701943397521973d, + +2.4726080894470215d, + +2.4750237464904785d, + +2.4774417877197266d, + +2.479862689971924d, + +2.482285499572754d, + +2.484710693359375d, + +2.487138271331787d, + +2.4895682334899902d, + +2.4920010566711426d, + +2.4944357872009277d, + +2.496872901916504d, + +2.499312400817871d, + +2.5017542839050293d, + +2.5041985511779785d, + +2.5066452026367188d, + +2.50909423828125d, + +2.5115456581115723d, + +2.5139999389648438d, + +2.516456127166748d, + +2.5189146995544434d, + +2.5213756561279297d, + +2.5238394737243652d, + +2.5263051986694336d, + +2.528773307800293d, + +2.5312442779541016d, + +2.533717155456543d, + +2.5361928939819336d, + +2.538670539855957d, + +2.5411510467529297d, + +2.5436339378356934d, + +2.546119213104248d, + +2.5486068725585938d, + +2.5510969161987305d, + +2.553589344024658d, + +2.556084632873535d, + +2.558581829071045d, + +2.5610814094543457d, + +2.5635838508605957d, + +2.5660886764526367d, + +2.5685958862304688d, + +2.571105480194092d, + +2.573617458343506d, + +2.576131820678711d, + +2.5786490440368652d, + +2.5811686515808105d, + +2.5836901664733887d, + +2.586214542388916d, + +2.5887417793273926d, + +2.591270923614502d, + +2.5938024520874023d, + +2.596336841583252d, + +2.5988736152648926d, + +2.601412773132324d, + +2.603954315185547d, + +2.6064987182617188d, + +2.6090455055236816d, + +2.6115946769714355d, + +2.6141462326049805d, + +2.6167001724243164d, + +2.6192569732666016d, + +2.6218161582946777d, + +2.624377727508545d, + +2.626941680908203d, + +2.6295084953308105d, + +2.632077217102051d, + +2.6346492767333984d, + +2.637223243713379d, + +2.6398000717163086d, + +2.6423792839050293d, + +2.644960880279541d, + +2.6475448608398438d, + +2.6501317024230957d, + +2.6527209281921387d, + +2.655313014984131d, + +2.657907009124756d, + +2.6605043411254883d, + +2.6631035804748535d, + +2.665705680847168d, + +2.6683101654052734d, + +2.67091703414917d, + +2.6735267639160156d, + +2.6761388778686523d, + +2.67875337600708d, + +2.681370735168457d, + +2.683990478515625d, + +2.686613082885742d, + +2.689237594604492d, + +2.6918654441833496d, + +2.69449520111084d, + +2.6971278190612793d, + +2.699763298034668d, + +2.7024011611938477d, + +2.7050414085388184d, + +2.70768404006958d, + +2.710329532623291d, + +2.712977886199951d, + +2.7156286239624023d, + +2.7182817459106445d, }; /** Exponential over the range of 0 - 1 in increments of 2^-10 * exp(x/1024) = expFracTableA[x] + expFracTableB[x]. */ private static final double[] EXP_FRAC_B = new double[] { - +0.0d, - +1.552583321178453E-10d, - +1.2423699995465188E-9d, - +4.194022929828008E-9d, - +9.94381632344361E-9d, - +1.9426261544163577E-8d, - +3.3576783010266685E-8d, - +5.3331719086630523E-8d, - +7.962832297769345E-8d, - +1.1340476362128895E-7d, - -8.281845251820919E-8d, - -3.126416414805498E-8d, - +3.058997113995161E-8d, - +1.0368579417304741E-7d, - -4.9452513107409435E-8d, - +4.8955889659397494E-8d, - -7.698155155722897E-8d, - +5.051784853384516E-8d, - -4.443661736519001E-8d, - +1.1593958457401774E-7d, - +5.575759739697068E-8d, - +1.4385227981629147E-8d, - -7.227368462584163E-9d, - -8.129108387083023E-9d, - +1.263202100290635E-8d, - +5.600896265625552E-8d, - -1.154629885168314E-7d, - -2.399186832888246E-8d, - +9.295948298604103E-8d, - -2.070841011504222E-9d, - -6.97066538508643E-8d, - -1.0898941254272996E-7d, - -1.1895963756343625E-7d, - -9.865691193993138E-8d, - -4.711988033385175E-8d, - +3.6613751875298095E-8d, - -8.491135959370133E-8d, - +6.610611940107793E-8d, - +1.3794148633283659E-8d, - -2.462631860370667E-9d, - +1.830278273495162E-8d, - +7.705834203598065E-8d, - -6.364563771711373E-8d, - +7.39978436695387E-8d, - +1.4122417557484554E-8d, - -3.881598887298574E-9d, - +2.0958481826069642E-8d, - +8.96162975425619E-8d, - -3.535214171178576E-8d, - -1.1455271549574576E-7d, - +9.140964977432485E-8d, - +1.0667524445105459E-7d, - -6.777752790396222E-8d, - +4.586785041291296E-8d, - -2.8245462428022094E-8d, - -5.071761314397018E-8d, - -2.0566368810068663E-8d, - +6.319146317890346E-8d, - -3.687854305539139E-8d, - -8.137269363160008E-8d, - -6.930491127388755E-8d, - +3.1184473002226595E-10d, - -1.0995299963140049E-7d, - +7.772668425499348E-8d, - +8.750367485925089E-8d, - -7.963112393823186E-8d, - +5.415131809829094E-8d, - +1.3006683896462346E-8d, - +3.634736373360733E-8d, - -1.132504393233074E-7d, - +4.2046187038837375E-8d, - +2.6396811618001066E-8d, - +7.92177143584738E-8d, - -3.691100820545433E-8d, - -8.257112559083188E-8d, - -5.676200971739166E-8d, - +4.151794514828518E-8d, - -2.5147255753587636E-8d, - -1.7335469415174996E-8d, - +6.595784859136531E-8d, - -1.2680354928109105E-8d, - -1.3824992526093461E-8d, - +6.353142754175797E-8d, - -1.8021197722549054E-8d, - -1.9054827792903468E-8d, - +6.144098503892116E-8d, - -1.3940903373095247E-8d, - -5.7694907599522404E-9d, - +8.696863522320578E-8d, - +2.6869297963554945E-8d, - +5.3366470162689076E-8d, - -7.094204160127543E-8d, - -1.0662027949814858E-7d, - -5.26498707801063E-8d, - +9.198855229106814E-8d, - +8.989677431456647E-8d, - -5.790384407322479E-8d, - -1.1197236522467887E-7d, - -7.12854317090566E-8d, - +6.51813137650059E-8d, - +6.003465022483798E-8d, - -8.569906238528267E-8d, - +1.0584469687624562E-7d, - -7.956144278281947E-8d, - +7.43676272093501E-8d, - +9.182512565315022E-8d, - -2.6157563728873715E-8d, - -4.012947040998503E-8d, - +5.094280572218447E-8d, - +9.675095351161728E-9d, - +7.552139802281006E-8d, - +1.1099566726533146E-8d, - +5.58656252899437E-8d, - -2.756054703800197E-8d, - +2.791018095971047E-10d, - -9.799351869734466E-8d, - -8.291832428736212E-8d, - +4.654720780112994E-8d, - +5.302803981406403E-8d, - -6.243126731995636E-8d, - -6.036655299348577E-8d, - +6.026878587378257E-8d, - +6.210379583313526E-8d, - -5.381287389094251E-8d, - -4.8012970400697E-8d, - +8.055420567281602E-8d, - +9.452180117175641E-8d, - -5.057430382371206E-9d, - +2.1288872215266507E-8d, - -6.380305844689076E-8d, - -2.0858800984600168E-8d, - -8.724006061713588E-8d, - -2.3470351753125604E-8d, - -6.690931338790221E-8d, - +2.192160831263035E-8d, - +5.6648446166177225E-9d, - -1.1461755745719884E-7d, - -9.944393412663547E-8d, - +5.2249837964645906E-8d, - +1.0311034276196487E-7d, - +5.4203784018566126E-8d, - -9.340259278913173E-8d, - -1.0022192034216903E-7d, - +3.481513333662908E-8d, - +7.436036590244714E-8d, - +1.9485199912395296E-8d, - +1.0968068384729757E-7d, - +1.0760175582979094E-7d, - +1.4322981952798675E-8d, - +6.933855730431659E-8d, - +3.530656968851287E-8d, - -8.669526204279467E-8d, - -5.7169586962345785E-8d, - -1.1345515834332824E-7d, - -1.605251622332555E-8d, - -2.298302779758532E-9d, - -7.110952399338234E-8d, - +1.70164513845372E-8d, - +2.4746155561368937E-8d, - -4.6834239957353325E-8d, - +4.1781076667923185E-8d, - +5.326182134294869E-8d, - -1.1302647617762544E-8d, - +8.759667154796094E-8d, - +1.126326877851684E-7d, - +6.48979555673987E-8d, - -5.451390316294111E-8d, - -6.0896188500539086E-9d, - -2.7152010585461855E-8d, - -1.1660424775832058E-7d, - -3.492984900939992E-8d, - -1.944841848873016E-8d, - -6.905990750285027E-8d, - +5.575538653428039E-8d, - +1.1768108384670781E-7d, - +1.178204606523101E-7d, - +5.727787111340131E-8d, - -6.284125161007433E-8d, - -3.0118152047565877E-9d, - -5.448044533034374E-10d, - -5.433154287341921E-8d, - +7.515630833946181E-8d, - -8.780756503572527E-8d, - -6.527407547535494E-8d, - -9.45487863616303E-8d, - +6.390098458668406E-8d, - -6.564672913105876E-8d, - -5.238488022920792E-9d, - +7.824500749252316E-9d, - -2.5339299158309795E-8d, - -1.036103313062145E-7d, - +1.2550633697348567E-8d, - +8.584676196065558E-8d, - +1.1740089468291563E-7d, - +1.0833697012353316E-7d, - +5.978002467397905E-8d, - -2.7143806069290897E-8d, - +8.711129287069315E-8d, - -7.316349947981893E-8d, - -3.00015852582934E-8d, - -2.0691000399732483E-8d, - -4.4100097152254264E-8d, - -9.909612209943178E-8d, - +5.38733640215475E-8d, - -6.0893829005035E-8d, - +3.457553391989844E-8d, - +1.0300006058273187E-7d, - -9.290053015365092E-8d, - -7.514966995961323E-8d, - -8.10254145615142E-8d, - -1.0938612624777085E-7d, - +7.932952721989251E-8d, - +9.428257290008738E-9d, - -7.952636967837795E-8d, - +5.203033137154554E-8d, - -7.159157201731446E-8d, - +2.7593424989059015E-8d, - +1.1231621190000476E-7d, - -5.469119869891027E-8d, - +4.560067256086347E-9d, - +5.280427179595944E-8d, - +9.119538242455128E-8d, - -1.1753008498403413E-7d, - -9.537874867759656E-8d, - -7.96118345325538E-8d, - -6.907085854395348E-8d, - -6.259620482221904E-8d, - -5.902712448725381E-8d, - -5.720173456146447E-8d, - -5.5957016861703E-8d, - -5.412881689012608E-8d, - -5.0551842723970724E-8d, - -4.405966390424518E-8d, - -3.348471032333413E-8d, - -1.7658271111516935E-8d, - +4.589506477601956E-9d, - +3.4429618182751655E-8d, - +7.303420385174346E-8d, - -1.168420305422519E-7d, - -5.718749537552229E-8d, - +1.4754809136835937E-8d, - +1.001616104682875E-7d, - -3.8207793300052055E-8d, - +7.766278405014509E-8d, - -2.7883635712109803E-8d, - -1.1524714043067699E-7d, - +5.517333625963128E-8d, - +7.724278756071081E-9d, - -1.7990934773848504E-8d, - -2.0786347668702902E-8d, - +5.251554594269693E-10d, - +4.7131849857076246E-8d, - -1.1819540733893871E-7d, - -1.742885956093543E-8d, - +1.1220467571570283E-7d, - +3.347954541376715E-8d, - -1.399157980498908E-8d, - -2.9013441705763093E-8d, - -1.0389614239253089E-8d, - +4.307749759934266E-8d, - -1.0583192018912101E-7d, - +2.0919226941745448E-8d, - -5.2305110482722706E-8d, - -8.588407110184028E-8d, - -7.861419797923639E-8d, - -2.929085835358592E-8d, - +6.329175751021792E-8d, - -3.807794163054899E-8d, - -9.377320954068088E-8d, - -1.0258469865953145E-7d, - -6.330187984612758E-8d, - +2.5286958775281306E-8d, - -7.40238661307607E-8d, - +1.1681688445204168E-7d, - -1.1623125976292733E-7d, - -5.6696107089038004E-8d, - +5.822140627806124E-8d, - -8.678466172071259E-9d, - -1.7757121899175995E-8d, - +3.220665454652531E-8d, - -9.598330731102836E-8d, - +7.573375369829243E-8d, - +7.174547784678893E-8d, - -1.0672213971363184E-7d, - +1.8395252217743006E-8d, - -2.8511112548600118E-8d, - -7.79306270997787E-9d, - +8.178019529487065E-8d, - +3.0220784595602374E-9d, - -4.4156343103298585E-9d, - +6.07014616741277E-8d, - -3.8809601937571554E-8d, - -6.329342805230603E-8d, - -1.1511990258493999E-8d, - +1.177739474561431E-7d, - +8.738625278484571E-8d, - -1.0143341551207646E-7d, - +2.9394972678456236E-8d, - +4.278345398213486E-9d, - +6.28805835150457E-8d, - -3.197037359731606E-8d, - -4.060821046423735E-8d, - +3.82160283750664E-8d, - -3.2666060441373307E-8d, - -1.3584500601329896E-8d, - +9.671332777035621E-8d, - +6.10626893063691E-8d, - +1.1913723189736356E-7d, - +3.3774671482641995E-8d, - +4.4651109654500895E-8d, - -8.539328154875224E-8d, - -1.166799420361101E-7d, - -4.794765976694151E-8d, - -1.1635256954820579E-7d, - -8.221241452580445E-8d, - +5.5737717715868425E-8d, - +6.034539636024073E-8d, - -6.712199323081945E-8d, - -8.697724830833087E-8d, - +2.0494942705297694E-9d, - -3.718924074653624E-8d, - +3.499747150995707E-8d, - -1.8535359161566028E-8d, - +4.1905679587096103E-8d, - -2.0821912536551675E-8d, - +3.297776915751238E-8d, - -3.3835280846270374E-8d, - +1.8437339356553904E-8d, - -4.734187609526424E-8d, - +8.527976799299225E-9d, - -5.1088103279787804E-8d, - +1.3513294656751725E-8d, - -3.480032127343472E-8d, - +4.367697180842916E-8d, - +1.1815196363705356E-8d, - +1.0932279207149782E-7d, - +9.907230065250944E-8d, - -1.764389559496152E-8d, - -1.1135725625095859E-9d, - -8.846040040259342E-8d, - -3.996962588736431E-8d, - -9.276238757878814E-8d, - -7.12139818505956E-9d, - -2.016525972830718E-8d, - +1.0782585410141121E-7d, - -9.868269632073771E-8d, - +7.686861750031585E-8d, - -7.947087669425045E-8d, - -8.955768055535647E-8d, - +4.791582240886607E-8d, - +9.583994718167641E-8d, - +5.5524866689108584E-8d, - -7.171796605211277E-8d, - -4.6157237582310713E-8d, - -1.0489751005162237E-7d, - -8.204903560604627E-9d, - +6.818588687884566E-9d, - -5.850916105103205E-8d, - +3.5549586192569994E-8d, - +5.1896700056778354E-8d, - -8.146080588190463E-9d, - +9.516285362051742E-8d, - -1.1368933260611668E-7d, - +8.187871486648885E-8d, - -3.206182925646474E-8d, - +2.265440168347286E-8d, - +8.938334752179552E-9d, - -7.187922490287331E-8d, - +1.9952407216533937E-8d, - +4.734805892507655E-8d, - +1.1642439930208906E-8d, - -8.582843599651953E-8d, - -5.3086706437795354E-9d, - +1.6121782610217253E-8d, - -2.0197142620980974E-8d, - -1.129242035557684E-7d, - -2.2298267863810133E-8d, - +1.4605950309628873E-8d, - -8.663710700190489E-10d, - -6.736873974532501E-8d, - +5.486523121881414E-8d, - -1.0965249168570443E-7d, - -8.27343074126263E-8d, - -1.0144703278439455E-7d, - +7.39809943048038E-8d, - -3.193297932837415E-8d, - +5.900393284617182E-8d, - +1.0973020465397083E-7d, - -1.1681436418514489E-7d, - +9.5985669644661E-8d, - +3.423560333632085E-8d, - -6.22836197265283E-8d, - +4.621027492345726E-8d, - -1.1575484316683829E-7d, - -6.997545435826076E-8d, - -5.3502441327259514E-8d, - -6.49667713553005E-8d, - -1.029980741248172E-7d, - +7.219393868923887E-8d, - -1.4854841678687828E-8d, - +1.1406713393562271E-7d, - -1.650155887561251E-8d, - +7.165331603232264E-8d, - -9.692697614257269E-8d, - -4.402550702194912E-8d, - -6.679737442193143E-9d, - +1.6492800268960003E-8d, - +2.68759245092879E-8d, - +2.5854805721793077E-8d, - +1.4815967715704613E-8d, - -4.852711011229633E-9d, - -3.176199594915881E-8d, - -6.452129525125173E-8d, - -1.01738658407525E-7d, - +9.639780418418697E-8d, - +5.4445606140746644E-8d, - +1.2219361033150988E-8d, - -2.8883532688356087E-8d, - -6.746431126005811E-8d, - -1.0212284427080097E-7d, - +1.0696094577483825E-7d, - +8.43527683868743E-8d, - +6.987544103716777E-8d, - +6.493457409236137E-8d, - +7.093715125593688E-8d, - +8.929153091001965E-8d, - -1.1701113164306871E-7d, - -6.972256643013266E-8d, - -5.848862070736576E-9d, - +7.602385197610123E-8d, - -6.110775144284437E-8d, - +6.101012058093429E-8d, - -3.304167134225169E-8d, - -1.0342514383702196E-7d, - +8.969907328603505E-8d, - +7.091600108064668E-8d, - +8.006778743052707E-8d, - +1.1857939200074815E-7d, - -5.0541412403312774E-8d, - +5.0970277930552287E-8d, - -5.229355472795119E-8d, - +1.1793478462381443E-7d, - +8.625007227318527E-8d, - +9.250422086873268E-8d, - -1.0028661472061573E-7d, - -1.384914052949463E-8d, - +1.1483560326413004E-7d, - +4.878798101459259E-8d, - +2.7866921183936055E-8d, - +5.3514180410849046E-8d, - -1.1124565511436785E-7d, - +1.186914813275767E-8d, - -5.253258132241335E-8d, - -6.458486486369316E-8d, - -2.2838888809969377E-8d, - +7.415557606805398E-8d, - -1.0568403170659571E-8d, - -3.7139182948393606E-8d, - -4.1022790876160215E-9d, - +8.999821367768787E-8d, - +8.201043988912348E-9d, - -9.616457442665051E-9d, - +3.8005886250603055E-8d, - -8.588890051473289E-8d, - +9.699937202692456E-8d, - +1.11298006674538E-7d, - -4.1527104733570825E-8d, - +1.1682852007826251E-7d, - +1.1099648061301941E-7d, - -5.755303038890997E-8d, - +8.948877445235827E-8d, - +7.675780395028194E-8d, - -9.427143563390596E-8d, - +5.471416081500162E-8d, - +4.8354824064383506E-8d, - -1.118706134478866E-7d, - +5.235528379688445E-8d, - +6.567708120053687E-8d, - -7.042204992948526E-8d, - -1.1603891006723397E-7d, - -6.968742825553785E-8d, - +7.01199184127881E-8d, - +6.645352711199266E-8d, - -7.919617109348822E-8d, - +1.1149986927391714E-7d, - -7.522074418324674E-8d, - +7.739252980388984E-8d, - +9.39987974788905E-8d, - -2.390421480210064E-8d, - -3.639873824357815E-8d, - +5.8015881615938497E-8d, - +2.2423186335040668E-8d, - +9.674534330665206E-8d, - +4.4068830785712375E-8d, - +1.0431875573076199E-7d, - +4.0584538834428926E-8d, - +9.279423236781974E-8d, - +2.404020521381534E-8d, - +7.425346071427343E-8d, - +6.529321706138789E-9d, - +6.080174837146273E-8d, - +1.6902327633329284E-10d, - +6.456806922371733E-8d, - +1.7100134295216033E-8d, - +9.770510970673519E-8d, - +6.94872148530716E-8d, - -6.602926393514549E-8d, - -6.889997193778161E-8d, - +6.240235720677117E-8d, - +9.098790295810902E-8d, - +1.8386917534879182E-8d, - +8.454972737414241E-8d, - +5.259099728747365E-8d, - -7.595453077213505E-8d, - -6.113203624663034E-8d, - +9.859622328905143E-8d, - -7.206766550807255E-8d, - -9.474579567171831E-8d, - +3.210408693366267E-8d, - +7.160716418525417E-8d, - +2.530870537724554E-8d, - -1.0524451040704701E-7d, - -8.008561371849434E-8d, - +1.0233519853128553E-7d, - -3.326791455362767E-8d, - -8.504961764629757E-9d, - -6.024017201863256E-8d, - +5.1500902632092514E-8d, - +8.98570720774568E-8d, - +5.638724693948384E-8d, - -4.734813904255994E-8d, - +1.8631451577542948E-8d, - +1.7470924137873214E-8d, - -4.926470933588261E-8d, - +5.84096713620797E-8d, - +1.0364355880696472E-7d, - +8.800655674349468E-8d, - +1.3069802481237792E-8d, - +1.1882454749452428E-7d, - -6.999215748398631E-8d, - -7.49674072510849E-8d, - +1.054760847603618E-7d, - -3.920012014371067E-9d, - +7.526183084319617E-8d, - +1.0618494853096868E-7d, - +9.043280094115832E-8d, - +2.9590395068826316E-8d, - -7.475571347653619E-8d, - +1.7401160143611842E-8d, - +6.923209420670962E-8d, - +8.232829924979753E-8d, - +5.82825404854514E-8d, - -1.3108606792380822E-9d, - -9.485602512220194E-8d, - +1.7663064617118723E-8d, - +9.942682855652123E-8d, - -8.638275100090915E-8d, - -6.132639063569726E-8d, - -6.221897889344726E-8d, - -8.745525834919404E-8d, - +1.029901759234897E-7d, - +3.3888561478632076E-8d, - -5.47315553588771E-8d, - +7.715994473741065E-8d, - -4.566098167230033E-8d, - +5.5257514455273825E-8d, - -9.530545662611411E-8d, - -1.889488909834863E-8d, - +4.769006625301079E-8d, - +1.0607041998938709E-7d, - -8.054981263802322E-8d, - -3.370929373457322E-8d, - +9.799164177397836E-9d, - +5.160291611526656E-8d, - +9.333090708652975E-8d, - -1.0180490545927503E-7d, - -5.533523366931846E-8d, - -4.044932340334176E-9d, - +5.370131904567218E-8d, - -1.1887814032213867E-7d, - -4.3307634616102625E-8d, - +4.363437558318513E-8d, - -9.482896784430338E-8d, - +1.9782818312325887E-8d, - -8.77224935488516E-8d, - +6.113879253864931E-8d, - -8.822335132515693E-9d, - -5.753754066078771E-8d, - -8.335545536862392E-8d, - -8.462309712606694E-8d, - -5.968586877433824E-8d, - -6.887556547891059E-9d, - +7.542967150507818E-8d, - -4.949331199790077E-8d, - +9.684172421525468E-8d, - +3.9260317944365246E-8d, - +1.784536881359796E-8d, - +3.426282345243592E-8d, - +9.018025618601154E-8d, - -5.1151708476133135E-8d, - +8.877492215808044E-8d, - +3.479545684576179E-8d, - +2.7002575714977818E-8d, - +6.707201545505014E-8d, - -8.173742908533777E-8d, - +5.909041310777802E-8d, - +1.439903710393587E-8d, - +2.4289317341982113E-8d, - +9.044519282818302E-8d, - -2.3866331257845713E-8d, - -7.853944465095286E-8d, - -7.188526769607005E-8d, - -2.2132706360079843E-9d, - -1.0624985110080394E-7d, - +9.453598391231829E-8d, - -1.134160131581847E-7d, - -1.315295870404327E-8d, - -7.981320644583728E-8d, - -7.327771300038971E-8d, - +8.155647334672472E-9d, - -7.222791579580787E-8d, - -7.430436987497092E-8d, - +3.633404807819848E-9d, - -7.512438321498593E-8d, - -7.044869765481105E-8d, - +1.9372589859580955E-8d, - -4.2365298585101096E-8d, - -1.552830824758035E-8d, - +1.0160071259930585E-7d, - +7.232201430620959E-8d, - -1.0164389431039905E-7d, - +5.826233477413577E-8d, - +7.6927415825689E-8d, - -4.392309439525734E-8d, - -6.414337408955734E-8d, - +1.799550702470095E-8d, - -3.4194410638967946E-8d, - +1.9437762419688045E-8d, - -5.7792549966531335E-8d, - -2.5731071572354522E-8d, - +1.173595905705643E-7d, - -1.0361863127101014E-7d, - +2.8330789837569332E-8d, - +3.81131861433539E-8d, - -7.252724942149532E-8d, - -6.342604067787756E-8d, - +6.716441526213986E-8d, - +8.257484966196574E-8d, - -1.5443717968117592E-8d, - +1.3280021798948244E-8d, - -6.79180673261558E-8d, - -1.8863249269709046E-8d, - -7.62162303263991E-8d, - +2.011589233663723E-10d, - -2.62683511147141E-8d, - +8.455684903712996E-8d, - +9.602293320384794E-8d, - +9.896378545255258E-9d, - +6.636396724067746E-8d, - +2.8777050870552646E-8d, - -1.0109271059094341E-7d, - -8.305334708631055E-8d, - +8.467026501338835E-8d, - -7.29821745001452E-8d, - -7.739491336852633E-8d, - +7.321238022013781E-8d, - -9.621538067089515E-8d, - -1.0705722541811197E-7d, - +4.247240125405735E-8d, - +1.1574222007764044E-7d, - +1.145412771487496E-7d, - +4.066036653218687E-8d, - -1.0410796803072171E-7d, - -7.955085231106037E-8d, - +1.1612776191572459E-7d, - +7.888519481107568E-9d, - +7.436813814737735E-8d, - +7.894935661289349E-8d, - +2.343525263620692E-8d, - -9.036933434595339E-8d, - -2.2239222395888823E-8d, - -8.784622656707742E-9d, - -4.819540032304379E-8d, - +9.975892708522332E-8d, - -3.9945124955316294E-8d, - +1.1345047468988893E-8d, - +1.702808472925844E-8d, - -2.10770182066344E-8d, - -1.0114948914089626E-7d, - +1.70518021921727E-8d, - +9.693260855961159E-8d, - -9.809953482725758E-8d, - -8.937957126662392E-8d, - -1.134963954323427E-7d, - +6.980004387880031E-8d, - -1.4494150014095534E-8d, - +1.122932337832262E-7d, - -2.483811732227808E-8d, - +5.278759515330048E-8d, - +1.0859222881334994E-7d, - -9.400056055939758E-8d, - -7.630957994128623E-8d, - -7.490757191850264E-8d, - -8.794689652049879E-8d, - -1.1357810855950775E-7d, - +8.846862323478745E-8d, - +4.32092015744956E-8d, - -9.082923009890997E-9d, - -6.655106680680314E-8d, - +1.1108184705020206E-7d, - +4.8838973948592766E-8d, - -1.2998975819628988E-8d, - -7.25680516883106E-8d, - -1.280024819379844E-7d, - -1.7743467191652895E-7d, - -2.1899520225809197E-7d, - +2.2602433110285232E-7d, - +2.0582268590356215E-7d, - +1.9911192455808124E-7d, - +2.0776878313278689E-7d, - +2.3367183133931002E-7d, - -1.9813568387704588E-7d, - -1.320972037315105E-7d, - -4.316580502355056E-8d, - +7.054443447243064E-8d, - +2.109212796025238E-7d, - -9.698281856949837E-8d, - +1.0239791185239086E-7d, - -1.4271754202157014E-7d, - +1.232402895636637E-7d, - -5.150590480969644E-8d, - -1.882201085012735E-7d, - +1.918355503889933E-7d, - +1.368893262241355E-7d, - +1.256828068633383E-7d, - +1.601222826656464E-7d, - -2.3472125169205568E-7d, - -1.032634625827871E-7d, - +7.957037517331382E-8d, - -1.6114314525832115E-7d, - +1.3018591370778052E-7d, - +1.8007284821359149E-9d, - -6.75421764491544E-8d, - -7.592155950645605E-8d, - -2.1414301981236817E-8d, - +9.79045937979623E-8d, - -1.9287515190177685E-7d, - +6.184953843236509E-8d, - -8.966500602352001E-8d, - -1.686490951669855E-7d, - -1.7316830893872364E-7d, - -1.0128633727463388E-7d, - +4.8935021740786486E-8d, - -1.9740129448026905E-7d, - +1.1532102163380318E-7d, - +3.5371542244169364E-8d, - +4.153321337726989E-8d, - +1.3575372396796738E-7d, - -1.5685449228299222E-7d, - +1.1933437776279623E-7d, - +1.2599421120614435E-8d, - +1.7331079674066365E-9d, - +8.869266069401045E-8d, - -2.013999442282902E-7d, - +8.709065843311144E-8d, - +2.453117120472083E-9d, - +2.3489472779602617E-8d, - +1.5216652792122652E-7d, - -8.638415150333099E-8d, - -2.1335475961524608E-7d, - -2.2677272333821516E-7d, - -1.246635423141374E-7d, - +9.494921297991565E-8d, - -4.27932550865546E-8d, - -5.907349480138712E-8d, - +4.809072216941908E-8d, - -1.9615359732789476E-7d, - +1.6385396676990034E-7d, - +1.7642714221524228E-7d, - -1.564440844355254E-7d, - +1.2090653407564583E-7d, - +5.679855838941285E-8d, - +1.3006497185242537E-7d, - -1.341336085949317E-7d, - +2.1987686050231372E-7d, - -2.3641341460419062E-7d, - -7.048932272279454E-8d, - -2.3401958604540354E-7d, - +2.2867766559333004E-7d, - -1.1089952719756529E-7d, - +1.7977178878541792E-7d, - +1.4903074102418675E-7d, - -2.011072593789072E-7d, - +8.504948422097802E-8d, - +5.5846006716348844E-8d, - +1.9014079059505456E-7d, - +1.3119976852347583E-8d, - +3.645999732952202E-9d, - +1.6374611405314333E-7d, - +1.8612397134087598E-8d, - +4.7113225346448296E-8d, - -2.2555535676499395E-7d, - +1.5631615647329739E-7d, - -2.3574653182047758E-7d, - +3.08072210937242E-8d, - +4.344259288116142E-9d, - +1.6374489573868447E-7d, - +3.42171232580676E-8d, - +9.46452492584643E-8d, - -1.297587351085525E-7d, - -1.601065201853145E-7d, - +5.6550495386976275E-9d, - -1.0725602261510391E-7d, - -1.9945408945084193E-8d, - -2.071910882200156E-7d, - -1.900947109027913E-7d, - +3.34069282059055E-8d, - -1.145810806477298E-8d, - +1.5421457732308477E-7d, - +5.5657084775121975E-8d, - +1.7177785285061278E-7d, - +2.7813027425289027E-8d, - +1.0267509648109748E-7d, - -7.839574072711142E-8d, - -3.648293887796095E-8d, - +2.3049492079013518E-7d, - -2.290530257391564E-7d, - +1.747018414872141E-8d, - +1.8477759656842807E-8d, - -2.2394073401050633E-7d, - -2.3085653185818848E-7d, - -1.7598351175286083E-10d, - -6.640551220774385E-9d, - +2.2868466674913266E-7d, - +2.3106230530437902E-7d, - +2.594209135294356E-9d, - +2.2221434720602702E-8d, - -1.847872222755186E-7d, - -1.3948659218254467E-7d, - +1.6023339607737848E-7d, - -2.3718944120137026E-7d, - +1.0087056692827474E-7d, - +2.228553660510707E-7d, - +1.3088328582956644E-7d, - -1.7292527438195104E-7d, - -2.0961068531216087E-7d, - +2.2951597845188004E-8d, - +5.005103745740068E-8d, - -1.2618366811281002E-7d, - -2.6784582477238417E-8d, - -1.2645600379949252E-7d, - +5.3774170051560117E-8d, - +3.9205810725333715E-8d, - -1.6802196396307013E-7d, - -8.893078799284047E-8d, - -1.9821451970481713E-7d, - -1.689060694498032E-8d, - -1.9648717830943396E-8d, - -2.0433926409457167E-7d, - -9.1973399031975E-8d, - -1.5723449006087263E-7d, - +7.887051614592191E-8d, - +1.4166246290402286E-7d, - +3.330146018487787E-8d, - +2.3278688667580978E-7d, - -2.1139124097042925E-7d, - +1.334449995534113E-7d, - -1.6104730195920897E-7d, - -1.3902314592614197E-7d, - +2.0169027167169864E-7d, - -9.040643863751471E-8d, - -5.946190852360168E-8d, - -1.8013411720005014E-7d, - +2.6595401669835947E-8d, - +8.607292924069425E-8d, - +4.84038176769263E-10d, - -2.2798356346688802E-7d, - -1.203028719549339E-7d, - -1.5111906039270745E-7d, - +1.5859915617670956E-7d, - -1.426262681506497E-7d, - -9.892260062323546E-8d, - -1.8492643515928268E-7d, - +7.840210076743552E-8d, - +2.1643071541578027E-7d, - +2.313664294893465E-7d, - +1.2541842003811723E-7d, - -9.920197743470107E-8d, - +3.655589133934081E-8d, - +5.807052689551411E-8d, - -3.244024724169575E-8d, - -2.327564406466327E-7d, - -6.38187356721971E-8d, - -2.3995994000400915E-10d, - -3.9793609609721186E-8d, - -1.802510054588344E-7d, - +5.745586744591196E-8d, - +1.987228872666507E-7d, - -2.3105188606976847E-7d, - +2.0088042407239129E-7d, - +6.624793114025702E-8d, - -1.5587043044056635E-7d, - +1.3606464059428694E-8d, - +1.0008761540741556E-7d, - +1.058213771597129E-7d, - +3.3058299602856804E-8d, - -1.1594886810010702E-7d, - +1.378919824418909E-7d, - -1.5683631181406778E-7d, - -4.4200075770425176E-8d, - +1.2250985436706623E-9d, - -1.8297013058336644E-8d, - -1.005004229646318E-7d, - +2.337202285991116E-7d, - +3.296104292035678E-8d, - -2.23668185816307E-7d, - -5.7055442971184756E-8d, - +5.82391923137467E-8d, - +1.244950238958056E-7d, - +1.4399358260219398E-7d, - +1.1901862840583523E-7d, - +5.1856152603337505E-8d, - -5.520562000491495E-8d, - -1.9987622893254038E-7d, - +9.697418238031897E-8d, - -1.1603376405901542E-7d, - +1.170714288147407E-7d, - -1.550851303094034E-7d, - +2.3472546699189522E-8d, - +1.78211222185955E-7d, - -1.6540009048230807E-7d, - -5.137865010872577E-8d, - +4.57490653163866E-8d, - +1.2829599363166098E-7d, - +1.985773325073412E-7d, - -2.1792661654989742E-7d, - -1.652218131743459E-7d, - -1.178234251477505E-7d, - -7.34071933723896E-8d, - -2.9646587857612632E-8d, - +1.5787194498912167E-8d, - +6.52252321321176E-8d, - +1.2100088103262734E-7d, - +1.8544977697201776E-7d, - -2.159273204728711E-7d, - -1.2711589287782304E-7d, - -2.2610609958205195E-8d, - +9.993330547750349E-8d, - -2.33974236642384E-7d, - -6.830955860192377E-8d, - +1.2244183812423448E-7d, - -1.3620325027706252E-7d, - +1.1178574689680927E-7d, - -8.490693031052439E-8d, - +2.2975389535985893E-7d, - +1.0445707500867073E-7d, - +1.8405243253979117E-8d, - -2.6033812325397097E-8d, - -2.6489990728664908E-8d, - +1.9409124727247465E-8d, - +1.1403826867020365E-7d, - -2.1706266226554237E-7d, - -1.7839974359909697E-8d, - +2.3725087624341041E-7d, - +7.37567604176979E-8d, - -2.9098805266958403E-8d, - -6.892713087722722E-8d, - -4.333719263537725E-8d, - +5.006436936098099E-8d, - +2.1367325342138113E-7d, - -2.6949659655907758E-8d, - -1.9256682968755803E-7d, - +1.960616287777496E-7d, - +1.876664741413704E-7d, - -2.1534486893602122E-7d, - -5.688830723853217E-8d, - +1.8861113228746644E-7d, - +4.6730779443102234E-8d, - -3.275360514112964E-9d, - +4.1011920825226876E-8d, - +1.820141955326842E-7d, - -5.468175655175594E-8d, - -1.8981247089866317E-7d, - -2.209492705846306E-7d, - -1.4566110577298295E-7d, - +3.848544860465368E-8d, - -1.429109630340783E-7d, - -2.105749999899302E-7d, - -1.6206609756618993E-7d, - +5.058693461947143E-9d, - -1.8359244902596882E-7d, - +2.2810251664891242E-7d, - -1.8791776732592608E-7d, - +1.3106843166204263E-9d, - -1.5543153797220025E-7d, - -1.7884997059081524E-7d, - -6.648490725635754E-8d, - +1.8412576154421806E-7d, - +9.860939269906055E-8d, - +1.5627006743114285E-7d, - -1.17260039161597E-7d, - +2.3416513526430908E-7d, - -2.1749172296989992E-7d, - -3.9242560971295217E-8d, - -1.822826971477839E-7d, - -1.6729355321895212E-7d, - +8.208715337901827E-9d, - -1.301267783434537E-7d, - -1.029741755377153E-7d, - +9.215765583599035E-8d, - -1.907487641016455E-8d, - +4.2661388254716074E-8d, - -1.9697226735187428E-7d, - +2.1819935527247946E-7d, - -1.398318929248588E-7d, - +1.6195123407015624E-7d, - +1.723826394935661E-7d, - -1.0602700638269148E-7d, - -1.9392742205954563E-7d, - -8.880302882034106E-8d, - +2.1186420987133E-7d, - +2.3375763256988976E-7d, - -2.0599801342241997E-8d, - -7.184550924856607E-8d, - +8.254840070367875E-8d, + +0.0d, + +1.552583321178453E-10d, + +1.2423699995465188E-9d, + +4.194022929828008E-9d, + +9.94381632344361E-9d, + +1.9426261544163577E-8d, + +3.3576783010266685E-8d, + +5.3331719086630523E-8d, + +7.962832297769345E-8d, + +1.1340476362128895E-7d, + -8.281845251820919E-8d, + -3.126416414805498E-8d, + +3.058997113995161E-8d, + +1.0368579417304741E-7d, + -4.9452513107409435E-8d, + +4.8955889659397494E-8d, + -7.698155155722897E-8d, + +5.051784853384516E-8d, + -4.443661736519001E-8d, + +1.1593958457401774E-7d, + +5.575759739697068E-8d, + +1.4385227981629147E-8d, + -7.227368462584163E-9d, + -8.129108387083023E-9d, + +1.263202100290635E-8d, + +5.600896265625552E-8d, + -1.154629885168314E-7d, + -2.399186832888246E-8d, + +9.295948298604103E-8d, + -2.070841011504222E-9d, + -6.97066538508643E-8d, + -1.0898941254272996E-7d, + -1.1895963756343625E-7d, + -9.865691193993138E-8d, + -4.711988033385175E-8d, + +3.6613751875298095E-8d, + -8.491135959370133E-8d, + +6.610611940107793E-8d, + +1.3794148633283659E-8d, + -2.462631860370667E-9d, + +1.830278273495162E-8d, + +7.705834203598065E-8d, + -6.364563771711373E-8d, + +7.39978436695387E-8d, + +1.4122417557484554E-8d, + -3.881598887298574E-9d, + +2.0958481826069642E-8d, + +8.96162975425619E-8d, + -3.535214171178576E-8d, + -1.1455271549574576E-7d, + +9.140964977432485E-8d, + +1.0667524445105459E-7d, + -6.777752790396222E-8d, + +4.586785041291296E-8d, + -2.8245462428022094E-8d, + -5.071761314397018E-8d, + -2.0566368810068663E-8d, + +6.319146317890346E-8d, + -3.687854305539139E-8d, + -8.137269363160008E-8d, + -6.930491127388755E-8d, + +3.1184473002226595E-10d, + -1.0995299963140049E-7d, + +7.772668425499348E-8d, + +8.750367485925089E-8d, + -7.963112393823186E-8d, + +5.415131809829094E-8d, + +1.3006683896462346E-8d, + +3.634736373360733E-8d, + -1.132504393233074E-7d, + +4.2046187038837375E-8d, + +2.6396811618001066E-8d, + +7.92177143584738E-8d, + -3.691100820545433E-8d, + -8.257112559083188E-8d, + -5.676200971739166E-8d, + +4.151794514828518E-8d, + -2.5147255753587636E-8d, + -1.7335469415174996E-8d, + +6.595784859136531E-8d, + -1.2680354928109105E-8d, + -1.3824992526093461E-8d, + +6.353142754175797E-8d, + -1.8021197722549054E-8d, + -1.9054827792903468E-8d, + +6.144098503892116E-8d, + -1.3940903373095247E-8d, + -5.7694907599522404E-9d, + +8.696863522320578E-8d, + +2.6869297963554945E-8d, + +5.3366470162689076E-8d, + -7.094204160127543E-8d, + -1.0662027949814858E-7d, + -5.26498707801063E-8d, + +9.198855229106814E-8d, + +8.989677431456647E-8d, + -5.790384407322479E-8d, + -1.1197236522467887E-7d, + -7.12854317090566E-8d, + +6.51813137650059E-8d, + +6.003465022483798E-8d, + -8.569906238528267E-8d, + +1.0584469687624562E-7d, + -7.956144278281947E-8d, + +7.43676272093501E-8d, + +9.182512565315022E-8d, + -2.6157563728873715E-8d, + -4.012947040998503E-8d, + +5.094280572218447E-8d, + +9.675095351161728E-9d, + +7.552139802281006E-8d, + +1.1099566726533146E-8d, + +5.58656252899437E-8d, + -2.756054703800197E-8d, + +2.791018095971047E-10d, + -9.799351869734466E-8d, + -8.291832428736212E-8d, + +4.654720780112994E-8d, + +5.302803981406403E-8d, + -6.243126731995636E-8d, + -6.036655299348577E-8d, + +6.026878587378257E-8d, + +6.210379583313526E-8d, + -5.381287389094251E-8d, + -4.8012970400697E-8d, + +8.055420567281602E-8d, + +9.452180117175641E-8d, + -5.057430382371206E-9d, + +2.1288872215266507E-8d, + -6.380305844689076E-8d, + -2.0858800984600168E-8d, + -8.724006061713588E-8d, + -2.3470351753125604E-8d, + -6.690931338790221E-8d, + +2.192160831263035E-8d, + +5.6648446166177225E-9d, + -1.1461755745719884E-7d, + -9.944393412663547E-8d, + +5.2249837964645906E-8d, + +1.0311034276196487E-7d, + +5.4203784018566126E-8d, + -9.340259278913173E-8d, + -1.0022192034216903E-7d, + +3.481513333662908E-8d, + +7.436036590244714E-8d, + +1.9485199912395296E-8d, + +1.0968068384729757E-7d, + +1.0760175582979094E-7d, + +1.4322981952798675E-8d, + +6.933855730431659E-8d, + +3.530656968851287E-8d, + -8.669526204279467E-8d, + -5.7169586962345785E-8d, + -1.1345515834332824E-7d, + -1.605251622332555E-8d, + -2.298302779758532E-9d, + -7.110952399338234E-8d, + +1.70164513845372E-8d, + +2.4746155561368937E-8d, + -4.6834239957353325E-8d, + +4.1781076667923185E-8d, + +5.326182134294869E-8d, + -1.1302647617762544E-8d, + +8.759667154796094E-8d, + +1.126326877851684E-7d, + +6.48979555673987E-8d, + -5.451390316294111E-8d, + -6.0896188500539086E-9d, + -2.7152010585461855E-8d, + -1.1660424775832058E-7d, + -3.492984900939992E-8d, + -1.944841848873016E-8d, + -6.905990750285027E-8d, + +5.575538653428039E-8d, + +1.1768108384670781E-7d, + +1.178204606523101E-7d, + +5.727787111340131E-8d, + -6.284125161007433E-8d, + -3.0118152047565877E-9d, + -5.448044533034374E-10d, + -5.433154287341921E-8d, + +7.515630833946181E-8d, + -8.780756503572527E-8d, + -6.527407547535494E-8d, + -9.45487863616303E-8d, + +6.390098458668406E-8d, + -6.564672913105876E-8d, + -5.238488022920792E-9d, + +7.824500749252316E-9d, + -2.5339299158309795E-8d, + -1.036103313062145E-7d, + +1.2550633697348567E-8d, + +8.584676196065558E-8d, + +1.1740089468291563E-7d, + +1.0833697012353316E-7d, + +5.978002467397905E-8d, + -2.7143806069290897E-8d, + +8.711129287069315E-8d, + -7.316349947981893E-8d, + -3.00015852582934E-8d, + -2.0691000399732483E-8d, + -4.4100097152254264E-8d, + -9.909612209943178E-8d, + +5.38733640215475E-8d, + -6.0893829005035E-8d, + +3.457553391989844E-8d, + +1.0300006058273187E-7d, + -9.290053015365092E-8d, + -7.514966995961323E-8d, + -8.10254145615142E-8d, + -1.0938612624777085E-7d, + +7.932952721989251E-8d, + +9.428257290008738E-9d, + -7.952636967837795E-8d, + +5.203033137154554E-8d, + -7.159157201731446E-8d, + +2.7593424989059015E-8d, + +1.1231621190000476E-7d, + -5.469119869891027E-8d, + +4.560067256086347E-9d, + +5.280427179595944E-8d, + +9.119538242455128E-8d, + -1.1753008498403413E-7d, + -9.537874867759656E-8d, + -7.96118345325538E-8d, + -6.907085854395348E-8d, + -6.259620482221904E-8d, + -5.902712448725381E-8d, + -5.720173456146447E-8d, + -5.5957016861703E-8d, + -5.412881689012608E-8d, + -5.0551842723970724E-8d, + -4.405966390424518E-8d, + -3.348471032333413E-8d, + -1.7658271111516935E-8d, + +4.589506477601956E-9d, + +3.4429618182751655E-8d, + +7.303420385174346E-8d, + -1.168420305422519E-7d, + -5.718749537552229E-8d, + +1.4754809136835937E-8d, + +1.001616104682875E-7d, + -3.8207793300052055E-8d, + +7.766278405014509E-8d, + -2.7883635712109803E-8d, + -1.1524714043067699E-7d, + +5.517333625963128E-8d, + +7.724278756071081E-9d, + -1.7990934773848504E-8d, + -2.0786347668702902E-8d, + +5.251554594269693E-10d, + +4.7131849857076246E-8d, + -1.1819540733893871E-7d, + -1.742885956093543E-8d, + +1.1220467571570283E-7d, + +3.347954541376715E-8d, + -1.399157980498908E-8d, + -2.9013441705763093E-8d, + -1.0389614239253089E-8d, + +4.307749759934266E-8d, + -1.0583192018912101E-7d, + +2.0919226941745448E-8d, + -5.2305110482722706E-8d, + -8.588407110184028E-8d, + -7.861419797923639E-8d, + -2.929085835358592E-8d, + +6.329175751021792E-8d, + -3.807794163054899E-8d, + -9.377320954068088E-8d, + -1.0258469865953145E-7d, + -6.330187984612758E-8d, + +2.5286958775281306E-8d, + -7.40238661307607E-8d, + +1.1681688445204168E-7d, + -1.1623125976292733E-7d, + -5.6696107089038004E-8d, + +5.822140627806124E-8d, + -8.678466172071259E-9d, + -1.7757121899175995E-8d, + +3.220665454652531E-8d, + -9.598330731102836E-8d, + +7.573375369829243E-8d, + +7.174547784678893E-8d, + -1.0672213971363184E-7d, + +1.8395252217743006E-8d, + -2.8511112548600118E-8d, + -7.79306270997787E-9d, + +8.178019529487065E-8d, + +3.0220784595602374E-9d, + -4.4156343103298585E-9d, + +6.07014616741277E-8d, + -3.8809601937571554E-8d, + -6.329342805230603E-8d, + -1.1511990258493999E-8d, + +1.177739474561431E-7d, + +8.738625278484571E-8d, + -1.0143341551207646E-7d, + +2.9394972678456236E-8d, + +4.278345398213486E-9d, + +6.28805835150457E-8d, + -3.197037359731606E-8d, + -4.060821046423735E-8d, + +3.82160283750664E-8d, + -3.2666060441373307E-8d, + -1.3584500601329896E-8d, + +9.671332777035621E-8d, + +6.10626893063691E-8d, + +1.1913723189736356E-7d, + +3.3774671482641995E-8d, + +4.4651109654500895E-8d, + -8.539328154875224E-8d, + -1.166799420361101E-7d, + -4.794765976694151E-8d, + -1.1635256954820579E-7d, + -8.221241452580445E-8d, + +5.5737717715868425E-8d, + +6.034539636024073E-8d, + -6.712199323081945E-8d, + -8.697724830833087E-8d, + +2.0494942705297694E-9d, + -3.718924074653624E-8d, + +3.499747150995707E-8d, + -1.8535359161566028E-8d, + +4.1905679587096103E-8d, + -2.0821912536551675E-8d, + +3.297776915751238E-8d, + -3.3835280846270374E-8d, + +1.8437339356553904E-8d, + -4.734187609526424E-8d, + +8.527976799299225E-9d, + -5.1088103279787804E-8d, + +1.3513294656751725E-8d, + -3.480032127343472E-8d, + +4.367697180842916E-8d, + +1.1815196363705356E-8d, + +1.0932279207149782E-7d, + +9.907230065250944E-8d, + -1.764389559496152E-8d, + -1.1135725625095859E-9d, + -8.846040040259342E-8d, + -3.996962588736431E-8d, + -9.276238757878814E-8d, + -7.12139818505956E-9d, + -2.016525972830718E-8d, + +1.0782585410141121E-7d, + -9.868269632073771E-8d, + +7.686861750031585E-8d, + -7.947087669425045E-8d, + -8.955768055535647E-8d, + +4.791582240886607E-8d, + +9.583994718167641E-8d, + +5.5524866689108584E-8d, + -7.171796605211277E-8d, + -4.6157237582310713E-8d, + -1.0489751005162237E-7d, + -8.204903560604627E-9d, + +6.818588687884566E-9d, + -5.850916105103205E-8d, + +3.5549586192569994E-8d, + +5.1896700056778354E-8d, + -8.146080588190463E-9d, + +9.516285362051742E-8d, + -1.1368933260611668E-7d, + +8.187871486648885E-8d, + -3.206182925646474E-8d, + +2.265440168347286E-8d, + +8.938334752179552E-9d, + -7.187922490287331E-8d, + +1.9952407216533937E-8d, + +4.734805892507655E-8d, + +1.1642439930208906E-8d, + -8.582843599651953E-8d, + -5.3086706437795354E-9d, + +1.6121782610217253E-8d, + -2.0197142620980974E-8d, + -1.129242035557684E-7d, + -2.2298267863810133E-8d, + +1.4605950309628873E-8d, + -8.663710700190489E-10d, + -6.736873974532501E-8d, + +5.486523121881414E-8d, + -1.0965249168570443E-7d, + -8.27343074126263E-8d, + -1.0144703278439455E-7d, + +7.39809943048038E-8d, + -3.193297932837415E-8d, + +5.900393284617182E-8d, + +1.0973020465397083E-7d, + -1.1681436418514489E-7d, + +9.5985669644661E-8d, + +3.423560333632085E-8d, + -6.22836197265283E-8d, + +4.621027492345726E-8d, + -1.1575484316683829E-7d, + -6.997545435826076E-8d, + -5.3502441327259514E-8d, + -6.49667713553005E-8d, + -1.029980741248172E-7d, + +7.219393868923887E-8d, + -1.4854841678687828E-8d, + +1.1406713393562271E-7d, + -1.650155887561251E-8d, + +7.165331603232264E-8d, + -9.692697614257269E-8d, + -4.402550702194912E-8d, + -6.679737442193143E-9d, + +1.6492800268960003E-8d, + +2.68759245092879E-8d, + +2.5854805721793077E-8d, + +1.4815967715704613E-8d, + -4.852711011229633E-9d, + -3.176199594915881E-8d, + -6.452129525125173E-8d, + -1.01738658407525E-7d, + +9.639780418418697E-8d, + +5.4445606140746644E-8d, + +1.2219361033150988E-8d, + -2.8883532688356087E-8d, + -6.746431126005811E-8d, + -1.0212284427080097E-7d, + +1.0696094577483825E-7d, + +8.43527683868743E-8d, + +6.987544103716777E-8d, + +6.493457409236137E-8d, + +7.093715125593688E-8d, + +8.929153091001965E-8d, + -1.1701113164306871E-7d, + -6.972256643013266E-8d, + -5.848862070736576E-9d, + +7.602385197610123E-8d, + -6.110775144284437E-8d, + +6.101012058093429E-8d, + -3.304167134225169E-8d, + -1.0342514383702196E-7d, + +8.969907328603505E-8d, + +7.091600108064668E-8d, + +8.006778743052707E-8d, + +1.1857939200074815E-7d, + -5.0541412403312774E-8d, + +5.0970277930552287E-8d, + -5.229355472795119E-8d, + +1.1793478462381443E-7d, + +8.625007227318527E-8d, + +9.250422086873268E-8d, + -1.0028661472061573E-7d, + -1.384914052949463E-8d, + +1.1483560326413004E-7d, + +4.878798101459259E-8d, + +2.7866921183936055E-8d, + +5.3514180410849046E-8d, + -1.1124565511436785E-7d, + +1.186914813275767E-8d, + -5.253258132241335E-8d, + -6.458486486369316E-8d, + -2.2838888809969377E-8d, + +7.415557606805398E-8d, + -1.0568403170659571E-8d, + -3.7139182948393606E-8d, + -4.1022790876160215E-9d, + +8.999821367768787E-8d, + +8.201043988912348E-9d, + -9.616457442665051E-9d, + +3.8005886250603055E-8d, + -8.588890051473289E-8d, + +9.699937202692456E-8d, + +1.11298006674538E-7d, + -4.1527104733570825E-8d, + +1.1682852007826251E-7d, + +1.1099648061301941E-7d, + -5.755303038890997E-8d, + +8.948877445235827E-8d, + +7.675780395028194E-8d, + -9.427143563390596E-8d, + +5.471416081500162E-8d, + +4.8354824064383506E-8d, + -1.118706134478866E-7d, + +5.235528379688445E-8d, + +6.567708120053687E-8d, + -7.042204992948526E-8d, + -1.1603891006723397E-7d, + -6.968742825553785E-8d, + +7.01199184127881E-8d, + +6.645352711199266E-8d, + -7.919617109348822E-8d, + +1.1149986927391714E-7d, + -7.522074418324674E-8d, + +7.739252980388984E-8d, + +9.39987974788905E-8d, + -2.390421480210064E-8d, + -3.639873824357815E-8d, + +5.8015881615938497E-8d, + +2.2423186335040668E-8d, + +9.674534330665206E-8d, + +4.4068830785712375E-8d, + +1.0431875573076199E-7d, + +4.0584538834428926E-8d, + +9.279423236781974E-8d, + +2.404020521381534E-8d, + +7.425346071427343E-8d, + +6.529321706138789E-9d, + +6.080174837146273E-8d, + +1.6902327633329284E-10d, + +6.456806922371733E-8d, + +1.7100134295216033E-8d, + +9.770510970673519E-8d, + +6.94872148530716E-8d, + -6.602926393514549E-8d, + -6.889997193778161E-8d, + +6.240235720677117E-8d, + +9.098790295810902E-8d, + +1.8386917534879182E-8d, + +8.454972737414241E-8d, + +5.259099728747365E-8d, + -7.595453077213505E-8d, + -6.113203624663034E-8d, + +9.859622328905143E-8d, + -7.206766550807255E-8d, + -9.474579567171831E-8d, + +3.210408693366267E-8d, + +7.160716418525417E-8d, + +2.530870537724554E-8d, + -1.0524451040704701E-7d, + -8.008561371849434E-8d, + +1.0233519853128553E-7d, + -3.326791455362767E-8d, + -8.504961764629757E-9d, + -6.024017201863256E-8d, + +5.1500902632092514E-8d, + +8.98570720774568E-8d, + +5.638724693948384E-8d, + -4.734813904255994E-8d, + +1.8631451577542948E-8d, + +1.7470924137873214E-8d, + -4.926470933588261E-8d, + +5.84096713620797E-8d, + +1.0364355880696472E-7d, + +8.800655674349468E-8d, + +1.3069802481237792E-8d, + +1.1882454749452428E-7d, + -6.999215748398631E-8d, + -7.49674072510849E-8d, + +1.054760847603618E-7d, + -3.920012014371067E-9d, + +7.526183084319617E-8d, + +1.0618494853096868E-7d, + +9.043280094115832E-8d, + +2.9590395068826316E-8d, + -7.475571347653619E-8d, + +1.7401160143611842E-8d, + +6.923209420670962E-8d, + +8.232829924979753E-8d, + +5.82825404854514E-8d, + -1.3108606792380822E-9d, + -9.485602512220194E-8d, + +1.7663064617118723E-8d, + +9.942682855652123E-8d, + -8.638275100090915E-8d, + -6.132639063569726E-8d, + -6.221897889344726E-8d, + -8.745525834919404E-8d, + +1.029901759234897E-7d, + +3.3888561478632076E-8d, + -5.47315553588771E-8d, + +7.715994473741065E-8d, + -4.566098167230033E-8d, + +5.5257514455273825E-8d, + -9.530545662611411E-8d, + -1.889488909834863E-8d, + +4.769006625301079E-8d, + +1.0607041998938709E-7d, + -8.054981263802322E-8d, + -3.370929373457322E-8d, + +9.799164177397836E-9d, + +5.160291611526656E-8d, + +9.333090708652975E-8d, + -1.0180490545927503E-7d, + -5.533523366931846E-8d, + -4.044932340334176E-9d, + +5.370131904567218E-8d, + -1.1887814032213867E-7d, + -4.3307634616102625E-8d, + +4.363437558318513E-8d, + -9.482896784430338E-8d, + +1.9782818312325887E-8d, + -8.77224935488516E-8d, + +6.113879253864931E-8d, + -8.822335132515693E-9d, + -5.753754066078771E-8d, + -8.335545536862392E-8d, + -8.462309712606694E-8d, + -5.968586877433824E-8d, + -6.887556547891059E-9d, + +7.542967150507818E-8d, + -4.949331199790077E-8d, + +9.684172421525468E-8d, + +3.9260317944365246E-8d, + +1.784536881359796E-8d, + +3.426282345243592E-8d, + +9.018025618601154E-8d, + -5.1151708476133135E-8d, + +8.877492215808044E-8d, + +3.479545684576179E-8d, + +2.7002575714977818E-8d, + +6.707201545505014E-8d, + -8.173742908533777E-8d, + +5.909041310777802E-8d, + +1.439903710393587E-8d, + +2.4289317341982113E-8d, + +9.044519282818302E-8d, + -2.3866331257845713E-8d, + -7.853944465095286E-8d, + -7.188526769607005E-8d, + -2.2132706360079843E-9d, + -1.0624985110080394E-7d, + +9.453598391231829E-8d, + -1.134160131581847E-7d, + -1.315295870404327E-8d, + -7.981320644583728E-8d, + -7.327771300038971E-8d, + +8.155647334672472E-9d, + -7.222791579580787E-8d, + -7.430436987497092E-8d, + +3.633404807819848E-9d, + -7.512438321498593E-8d, + -7.044869765481105E-8d, + +1.9372589859580955E-8d, + -4.2365298585101096E-8d, + -1.552830824758035E-8d, + +1.0160071259930585E-7d, + +7.232201430620959E-8d, + -1.0164389431039905E-7d, + +5.826233477413577E-8d, + +7.6927415825689E-8d, + -4.392309439525734E-8d, + -6.414337408955734E-8d, + +1.799550702470095E-8d, + -3.4194410638967946E-8d, + +1.9437762419688045E-8d, + -5.7792549966531335E-8d, + -2.5731071572354522E-8d, + +1.173595905705643E-7d, + -1.0361863127101014E-7d, + +2.8330789837569332E-8d, + +3.81131861433539E-8d, + -7.252724942149532E-8d, + -6.342604067787756E-8d, + +6.716441526213986E-8d, + +8.257484966196574E-8d, + -1.5443717968117592E-8d, + +1.3280021798948244E-8d, + -6.79180673261558E-8d, + -1.8863249269709046E-8d, + -7.62162303263991E-8d, + +2.011589233663723E-10d, + -2.62683511147141E-8d, + +8.455684903712996E-8d, + +9.602293320384794E-8d, + +9.896378545255258E-9d, + +6.636396724067746E-8d, + +2.8777050870552646E-8d, + -1.0109271059094341E-7d, + -8.305334708631055E-8d, + +8.467026501338835E-8d, + -7.29821745001452E-8d, + -7.739491336852633E-8d, + +7.321238022013781E-8d, + -9.621538067089515E-8d, + -1.0705722541811197E-7d, + +4.247240125405735E-8d, + +1.1574222007764044E-7d, + +1.145412771487496E-7d, + +4.066036653218687E-8d, + -1.0410796803072171E-7d, + -7.955085231106037E-8d, + +1.1612776191572459E-7d, + +7.888519481107568E-9d, + +7.436813814737735E-8d, + +7.894935661289349E-8d, + +2.343525263620692E-8d, + -9.036933434595339E-8d, + -2.2239222395888823E-8d, + -8.784622656707742E-9d, + -4.819540032304379E-8d, + +9.975892708522332E-8d, + -3.9945124955316294E-8d, + +1.1345047468988893E-8d, + +1.702808472925844E-8d, + -2.10770182066344E-8d, + -1.0114948914089626E-7d, + +1.70518021921727E-8d, + +9.693260855961159E-8d, + -9.809953482725758E-8d, + -8.937957126662392E-8d, + -1.134963954323427E-7d, + +6.980004387880031E-8d, + -1.4494150014095534E-8d, + +1.122932337832262E-7d, + -2.483811732227808E-8d, + +5.278759515330048E-8d, + +1.0859222881334994E-7d, + -9.400056055939758E-8d, + -7.630957994128623E-8d, + -7.490757191850264E-8d, + -8.794689652049879E-8d, + -1.1357810855950775E-7d, + +8.846862323478745E-8d, + +4.32092015744956E-8d, + -9.082923009890997E-9d, + -6.655106680680314E-8d, + +1.1108184705020206E-7d, + +4.8838973948592766E-8d, + -1.2998975819628988E-8d, + -7.25680516883106E-8d, + -1.280024819379844E-7d, + -1.7743467191652895E-7d, + -2.1899520225809197E-7d, + +2.2602433110285232E-7d, + +2.0582268590356215E-7d, + +1.9911192455808124E-7d, + +2.0776878313278689E-7d, + +2.3367183133931002E-7d, + -1.9813568387704588E-7d, + -1.320972037315105E-7d, + -4.316580502355056E-8d, + +7.054443447243064E-8d, + +2.109212796025238E-7d, + -9.698281856949837E-8d, + +1.0239791185239086E-7d, + -1.4271754202157014E-7d, + +1.232402895636637E-7d, + -5.150590480969644E-8d, + -1.882201085012735E-7d, + +1.918355503889933E-7d, + +1.368893262241355E-7d, + +1.256828068633383E-7d, + +1.601222826656464E-7d, + -2.3472125169205568E-7d, + -1.032634625827871E-7d, + +7.957037517331382E-8d, + -1.6114314525832115E-7d, + +1.3018591370778052E-7d, + +1.8007284821359149E-9d, + -6.75421764491544E-8d, + -7.592155950645605E-8d, + -2.1414301981236817E-8d, + +9.79045937979623E-8d, + -1.9287515190177685E-7d, + +6.184953843236509E-8d, + -8.966500602352001E-8d, + -1.686490951669855E-7d, + -1.7316830893872364E-7d, + -1.0128633727463388E-7d, + +4.8935021740786486E-8d, + -1.9740129448026905E-7d, + +1.1532102163380318E-7d, + +3.5371542244169364E-8d, + +4.153321337726989E-8d, + +1.3575372396796738E-7d, + -1.5685449228299222E-7d, + +1.1933437776279623E-7d, + +1.2599421120614435E-8d, + +1.7331079674066365E-9d, + +8.869266069401045E-8d, + -2.013999442282902E-7d, + +8.709065843311144E-8d, + +2.453117120472083E-9d, + +2.3489472779602617E-8d, + +1.5216652792122652E-7d, + -8.638415150333099E-8d, + -2.1335475961524608E-7d, + -2.2677272333821516E-7d, + -1.246635423141374E-7d, + +9.494921297991565E-8d, + -4.27932550865546E-8d, + -5.907349480138712E-8d, + +4.809072216941908E-8d, + -1.9615359732789476E-7d, + +1.6385396676990034E-7d, + +1.7642714221524228E-7d, + -1.564440844355254E-7d, + +1.2090653407564583E-7d, + +5.679855838941285E-8d, + +1.3006497185242537E-7d, + -1.341336085949317E-7d, + +2.1987686050231372E-7d, + -2.3641341460419062E-7d, + -7.048932272279454E-8d, + -2.3401958604540354E-7d, + +2.2867766559333004E-7d, + -1.1089952719756529E-7d, + +1.7977178878541792E-7d, + +1.4903074102418675E-7d, + -2.011072593789072E-7d, + +8.504948422097802E-8d, + +5.5846006716348844E-8d, + +1.9014079059505456E-7d, + +1.3119976852347583E-8d, + +3.645999732952202E-9d, + +1.6374611405314333E-7d, + +1.8612397134087598E-8d, + +4.7113225346448296E-8d, + -2.2555535676499395E-7d, + +1.5631615647329739E-7d, + -2.3574653182047758E-7d, + +3.08072210937242E-8d, + +4.344259288116142E-9d, + +1.6374489573868447E-7d, + +3.42171232580676E-8d, + +9.46452492584643E-8d, + -1.297587351085525E-7d, + -1.601065201853145E-7d, + +5.6550495386976275E-9d, + -1.0725602261510391E-7d, + -1.9945408945084193E-8d, + -2.071910882200156E-7d, + -1.900947109027913E-7d, + +3.34069282059055E-8d, + -1.145810806477298E-8d, + +1.5421457732308477E-7d, + +5.5657084775121975E-8d, + +1.7177785285061278E-7d, + +2.7813027425289027E-8d, + +1.0267509648109748E-7d, + -7.839574072711142E-8d, + -3.648293887796095E-8d, + +2.3049492079013518E-7d, + -2.290530257391564E-7d, + +1.747018414872141E-8d, + +1.8477759656842807E-8d, + -2.2394073401050633E-7d, + -2.3085653185818848E-7d, + -1.7598351175286083E-10d, + -6.640551220774385E-9d, + +2.2868466674913266E-7d, + +2.3106230530437902E-7d, + +2.594209135294356E-9d, + +2.2221434720602702E-8d, + -1.847872222755186E-7d, + -1.3948659218254467E-7d, + +1.6023339607737848E-7d, + -2.3718944120137026E-7d, + +1.0087056692827474E-7d, + +2.228553660510707E-7d, + +1.3088328582956644E-7d, + -1.7292527438195104E-7d, + -2.0961068531216087E-7d, + +2.2951597845188004E-8d, + +5.005103745740068E-8d, + -1.2618366811281002E-7d, + -2.6784582477238417E-8d, + -1.2645600379949252E-7d, + +5.3774170051560117E-8d, + +3.9205810725333715E-8d, + -1.6802196396307013E-7d, + -8.893078799284047E-8d, + -1.9821451970481713E-7d, + -1.689060694498032E-8d, + -1.9648717830943396E-8d, + -2.0433926409457167E-7d, + -9.1973399031975E-8d, + -1.5723449006087263E-7d, + +7.887051614592191E-8d, + +1.4166246290402286E-7d, + +3.330146018487787E-8d, + +2.3278688667580978E-7d, + -2.1139124097042925E-7d, + +1.334449995534113E-7d, + -1.6104730195920897E-7d, + -1.3902314592614197E-7d, + +2.0169027167169864E-7d, + -9.040643863751471E-8d, + -5.946190852360168E-8d, + -1.8013411720005014E-7d, + +2.6595401669835947E-8d, + +8.607292924069425E-8d, + +4.84038176769263E-10d, + -2.2798356346688802E-7d, + -1.203028719549339E-7d, + -1.5111906039270745E-7d, + +1.5859915617670956E-7d, + -1.426262681506497E-7d, + -9.892260062323546E-8d, + -1.8492643515928268E-7d, + +7.840210076743552E-8d, + +2.1643071541578027E-7d, + +2.313664294893465E-7d, + +1.2541842003811723E-7d, + -9.920197743470107E-8d, + +3.655589133934081E-8d, + +5.807052689551411E-8d, + -3.244024724169575E-8d, + -2.327564406466327E-7d, + -6.38187356721971E-8d, + -2.3995994000400915E-10d, + -3.9793609609721186E-8d, + -1.802510054588344E-7d, + +5.745586744591196E-8d, + +1.987228872666507E-7d, + -2.3105188606976847E-7d, + +2.0088042407239129E-7d, + +6.624793114025702E-8d, + -1.5587043044056635E-7d, + +1.3606464059428694E-8d, + +1.0008761540741556E-7d, + +1.058213771597129E-7d, + +3.3058299602856804E-8d, + -1.1594886810010702E-7d, + +1.378919824418909E-7d, + -1.5683631181406778E-7d, + -4.4200075770425176E-8d, + +1.2250985436706623E-9d, + -1.8297013058336644E-8d, + -1.005004229646318E-7d, + +2.337202285991116E-7d, + +3.296104292035678E-8d, + -2.23668185816307E-7d, + -5.7055442971184756E-8d, + +5.82391923137467E-8d, + +1.244950238958056E-7d, + +1.4399358260219398E-7d, + +1.1901862840583523E-7d, + +5.1856152603337505E-8d, + -5.520562000491495E-8d, + -1.9987622893254038E-7d, + +9.697418238031897E-8d, + -1.1603376405901542E-7d, + +1.170714288147407E-7d, + -1.550851303094034E-7d, + +2.3472546699189522E-8d, + +1.78211222185955E-7d, + -1.6540009048230807E-7d, + -5.137865010872577E-8d, + +4.57490653163866E-8d, + +1.2829599363166098E-7d, + +1.985773325073412E-7d, + -2.1792661654989742E-7d, + -1.652218131743459E-7d, + -1.178234251477505E-7d, + -7.34071933723896E-8d, + -2.9646587857612632E-8d, + +1.5787194498912167E-8d, + +6.52252321321176E-8d, + +1.2100088103262734E-7d, + +1.8544977697201776E-7d, + -2.159273204728711E-7d, + -1.2711589287782304E-7d, + -2.2610609958205195E-8d, + +9.993330547750349E-8d, + -2.33974236642384E-7d, + -6.830955860192377E-8d, + +1.2244183812423448E-7d, + -1.3620325027706252E-7d, + +1.1178574689680927E-7d, + -8.490693031052439E-8d, + +2.2975389535985893E-7d, + +1.0445707500867073E-7d, + +1.8405243253979117E-8d, + -2.6033812325397097E-8d, + -2.6489990728664908E-8d, + +1.9409124727247465E-8d, + +1.1403826867020365E-7d, + -2.1706266226554237E-7d, + -1.7839974359909697E-8d, + +2.3725087624341041E-7d, + +7.37567604176979E-8d, + -2.9098805266958403E-8d, + -6.892713087722722E-8d, + -4.333719263537725E-8d, + +5.006436936098099E-8d, + +2.1367325342138113E-7d, + -2.6949659655907758E-8d, + -1.9256682968755803E-7d, + +1.960616287777496E-7d, + +1.876664741413704E-7d, + -2.1534486893602122E-7d, + -5.688830723853217E-8d, + +1.8861113228746644E-7d, + +4.6730779443102234E-8d, + -3.275360514112964E-9d, + +4.1011920825226876E-8d, + +1.820141955326842E-7d, + -5.468175655175594E-8d, + -1.8981247089866317E-7d, + -2.209492705846306E-7d, + -1.4566110577298295E-7d, + +3.848544860465368E-8d, + -1.429109630340783E-7d, + -2.105749999899302E-7d, + -1.6206609756618993E-7d, + +5.058693461947143E-9d, + -1.8359244902596882E-7d, + +2.2810251664891242E-7d, + -1.8791776732592608E-7d, + +1.3106843166204263E-9d, + -1.5543153797220025E-7d, + -1.7884997059081524E-7d, + -6.648490725635754E-8d, + +1.8412576154421806E-7d, + +9.860939269906055E-8d, + +1.5627006743114285E-7d, + -1.17260039161597E-7d, + +2.3416513526430908E-7d, + -2.1749172296989992E-7d, + -3.9242560971295217E-8d, + -1.822826971477839E-7d, + -1.6729355321895212E-7d, + +8.208715337901827E-9d, + -1.301267783434537E-7d, + -1.029741755377153E-7d, + +9.215765583599035E-8d, + -1.907487641016455E-8d, + +4.2661388254716074E-8d, + -1.9697226735187428E-7d, + +2.1819935527247946E-7d, + -1.398318929248588E-7d, + +1.6195123407015624E-7d, + +1.723826394935661E-7d, + -1.0602700638269148E-7d, + -1.9392742205954563E-7d, + -8.880302882034106E-8d, + +2.1186420987133E-7d, + +2.3375763256988976E-7d, + -2.0599801342241997E-8d, + -7.184550924856607E-8d, + +8.254840070367875E-8d, }; /** Extended precision logarithm table over the range 1 - 2 in increments of 2^-10. */ private static final double[][] LN_MANT = new double[][] { - {+0.0d, +0.0d, }, // 0 - {+9.760860120877624E-4d, -3.903230345984362E-11d, }, // 1 - {+0.0019512202125042677d, -8.124251825289188E-11d, }, // 2 - {+0.0029254043474793434d, -1.8374207360194882E-11d,}, // 3 - {+0.0038986406289041042d, -2.1324678121885073E-10d,}, // 4 - {+0.004870930686593056d, -4.5199654318611534E-10d,}, // 5 - {+0.00584227591753006d, -2.933016992001806E-10d, }, // 6 - {+0.006812678650021553d, -2.325147219074669E-10d, }, // 7 - {+0.007782140746712685d, -3.046577356838847E-10d, }, // 8 - {+0.008750664070248604d, -5.500631513861575E-10d, }, // 9 - {+0.00971824862062931d, +8.48292035519895E-10d, }, // 10 - {+0.010684899985790253d, +1.1422610134013436E-10d,}, // 11 - {+0.01165061630308628d, +9.168889933128375E-10d, }, // 12 - {+0.012615403160452843d, -5.303786078838E-10d, }, // 13 - {+0.013579258695244789d, -5.688639355498786E-10d, }, // 14 - {+0.01454218477010727d, +7.296670293275653E-10d, }, // 15 - {+0.015504186972975731d, -4.370104767451421E-10d, }, // 16 - {+0.016465261578559875d, +1.43695591408832E-9d, }, // 17 - {+0.01742541790008545d, -1.1862263158849434E-9d, }, // 18 - {+0.018384650349617004d, -9.482976524690715E-10d, }, // 19 - {+0.01934296265244484d, +1.9068609515836638E-10d,}, // 20 - {+0.020300358533859253d, +2.655990315697216E-10d, }, // 21 - {+0.021256837993860245d, +1.0315548713040775E-9d, }, // 22 - {+0.022212404757738113d, +5.13345647019085E-10d, }, // 23 - {+0.02316705882549286d, +4.5604151934208014E-10d,}, // 24 - {+0.02412080392241478d, -1.1255706987475148E-9d, }, // 25 - {+0.025073636323213577d, +1.2289023836765196E-9d, }, // 26 - {+0.02602556347846985d, +1.7990281828096504E-9d, }, // 27 - {+0.026976589113473892d, -1.4152718164638451E-9d, }, // 28 - {+0.02792670577764511d, +7.568772963781632E-10d, }, // 29 - {+0.0288759246468544d, -1.1449998592111558E-9d, }, // 30 - {+0.029824241995811462d, -1.6850976862319495E-9d, }, // 31 - {+0.030771657824516296d, +8.422373919843096E-10d, }, // 32 - {+0.0317181795835495d, +6.872350402175489E-10d, }, // 33 - {+0.03266380727291107d, -4.541194749189272E-10d, }, // 34 - {+0.03360854089260101d, -8.9064764856495E-10d, }, // 35 - {+0.034552380442619324d, +1.0640404096769032E-9d, }, // 36 - {+0.0354953333735466d, -3.5901655945224663E-10d,}, // 37 - {+0.03643739968538284d, -3.4829517943661266E-9d, }, // 38 - {+0.037378571927547455d, +8.149473794244232E-10d, }, // 39 - {+0.03831886500120163d, -6.990650304449166E-10d, }, // 40 - {+0.03925827145576477d, +1.0883076226453258E-9d, }, // 41 - {+0.040196798741817474d, +3.845192807999274E-10d, }, // 42 - {+0.04113444685935974d, -1.1570594692045927E-9d, }, // 43 - {+0.04207121580839157d, -1.8877045166697178E-9d, }, // 44 - {+0.043007105588912964d, -1.6332083257987747E-10d,}, // 45 - {+0.04394212365150452d, -1.7950057534514933E-9d, }, // 46 - {+0.04487626254558563d, +2.302710041648838E-9d, }, // 47 - {+0.045809537172317505d, -1.1410233017161343E-9d, }, // 48 - {+0.04674194008111954d, -3.0498741599744685E-9d, }, // 49 - {+0.04767347127199173d, -1.8026348269183678E-9d, }, // 50 - {+0.04860413819551468d, -3.233204600453039E-9d, }, // 51 - {+0.04953393340110779d, +1.7211688427961583E-9d, }, // 52 - {+0.05046287178993225d, -2.329967807055457E-10d, }, // 53 - {+0.05139094591140747d, -4.191810118556531E-11d, }, // 54 - {+0.052318163216114044d, -3.5574324788328143E-9d, }, // 55 - {+0.053244516253471375d, -1.7346590916458485E-9d, }, // 56 - {+0.05417001247406006d, -4.343048751383674E-10d, }, // 57 - {+0.055094651877880096d, +1.92909364037955E-9d, }, // 58 - {+0.056018441915512085d, -5.139745677199588E-10d, }, // 59 - {+0.05694137513637543d, +1.2637629975129189E-9d, }, // 60 - {+0.05786345899105072d, +1.3840561112481119E-9d, }, // 61 - {+0.058784693479537964d, +1.414889689612056E-9d, }, // 62 - {+0.05970507860183716d, +2.9199191907666474E-9d, }, // 63 - {+0.0606246218085289d, +7.90594243412116E-12d, }, // 64 - {+0.06154331564903259d, +1.6844747839686189E-9d, }, // 65 - {+0.06246116757392883d, +2.0498074572151747E-9d, }, // 66 - {+0.06337818503379822d, -4.800180493433863E-9d, }, // 67 - {+0.06429435312747955d, -2.4220822960064277E-9d, }, // 68 - {+0.06520968675613403d, -4.179048566709334E-9d, }, // 69 - {+0.06612417101860046d, +6.363872957010456E-9d, }, // 70 - {+0.06703783571720123d, +9.339468680056365E-10d, }, // 71 - {+0.06795066595077515d, -4.04226739708981E-9d, }, // 72 - {+0.0688626617193222d, -7.043545052852817E-9d, }, // 73 - {+0.06977382302284241d, -6.552819560439773E-9d, }, // 74 - {+0.07068414986133575d, -1.0571674860370546E-9d, }, // 75 - {+0.07159365713596344d, -3.948954622015801E-9d, }, // 76 - {+0.07250232994556427d, +1.1776625988228244E-9d, }, // 77 - {+0.07341018319129944d, +9.221072639606492E-10d, }, // 78 - {+0.07431721687316895d, -3.219119568928366E-9d, }, // 79 - {+0.0752234160900116d, +5.147575929018918E-9d, }, // 80 - {+0.07612881064414978d, -2.291749683541979E-9d, }, // 81 - {+0.07703337073326111d, +5.749565906124772E-9d, }, // 82 - {+0.07793712615966797d, +9.495158151301779E-10d, }, // 83 - {+0.07884006202220917d, -3.144331429489291E-10d, }, // 84 - {+0.0797421783208847d, +3.430029236134205E-9d, }, // 85 - {+0.08064348995685577d, -1.2499290483167703E-9d, }, // 86 - {+0.08154398202896118d, +2.011215719133196E-9d, }, // 87 - {+0.08244366943836212d, -2.2728753031387152E-10d,}, // 88 - {+0.0833425521850586d, -6.508966857277253E-9d, }, // 89 - {+0.0842406153678894d, -4.801131671405377E-10d, }, // 90 - {+0.08513787388801575d, +4.406750291994231E-9d, }, // 91 - {+0.08603434264659882d, -5.304795662536171E-9d, }, // 92 - {+0.08692999184131622d, +1.6284313912612293E-9d, }, // 93 - {+0.08782485127449036d, -3.158898981674071E-9d, }, // 94 - {+0.08871890604496002d, -3.3324878834139977E-9d, }, // 95 - {+0.08961215615272522d, +2.536961912893389E-9d, }, // 96 - {+0.09050461649894714d, +9.737596728980696E-10d, }, // 97 - {+0.0913962870836258d, -6.600437262505396E-9d, }, // 98 - {+0.09228715300559998d, -3.866609889222889E-9d, }, // 99 - {+0.09317722916603088d, -4.311847594020281E-9d, }, // 100 - {+0.09406651556491852d, -6.525851105645959E-9d, }, // 101 - {+0.09495499730110168d, +5.799080912675435E-9d, }, // 102 - {+0.09584270417690277d, +4.2634204358490415E-9d, }, // 103 - {+0.09672962129116058d, +5.167390528799477E-9d, }, // 104 - {+0.09761576354503632d, -4.994827392841906E-9d, }, // 105 - {+0.09850110113620758d, +4.970725577861395E-9d, }, // 106 - {+0.09938566386699677d, +6.6496705953229645E-9d, }, // 107 - {+0.10026945173740387d, +1.4262712796792241E-9d, }, // 108 - {+0.1011524498462677d, +5.5822855204629114E-9d, }, // 109 - {+0.10203467309474945d, +5.593494835247651E-9d, }, // 110 - {+0.10291612148284912d, +2.8332008343480686E-9d, }, // 111 - {+0.10379679501056671d, -1.3289231465997192E-9d, }, // 112 - {+0.10467669367790222d, -5.526819276639527E-9d, }, // 113 - {+0.10555580258369446d, +6.503128678219282E-9d, }, // 114 - {+0.10643415153026581d, +6.317463237641817E-9d, }, // 115 - {+0.10731174051761627d, -4.728528221305482E-9d, }, // 116 - {+0.10818853974342346d, +4.519199083083901E-9d, }, // 117 - {+0.10906457901000977d, +5.606492666349878E-9d, }, // 118 - {+0.10993985831737518d, -1.220176214398581E-10d, }, // 119 - {+0.11081436276435852d, +3.5759315936869937E-9d, }, // 120 - {+0.11168810725212097d, +3.1367659571899855E-9d, }, // 121 - {+0.11256109178066254d, -1.0543075713098835E-10d,}, // 122 - {+0.11343331634998322d, -4.820065619207094E-9d, }, // 123 - {+0.11430476605892181d, +5.221136819669415E-9d, }, // 124 - {+0.11517547070980072d, +1.5395018670011342E-9d, }, // 125 - {+0.11604541540145874d, +3.5638391501880846E-10d,}, // 126 - {+0.11691460013389587d, +2.9885336757136527E-9d, }, // 127 - {+0.11778303980827332d, -4.151889860890893E-9d, }, // 128 - {+0.11865071952342987d, -4.853823938804204E-9d, }, // 129 - {+0.11951763927936554d, +2.189226237170704E-9d, }, // 130 - {+0.12038381397724152d, +3.3791993048776982E-9d, }, // 131 - {+0.1212492436170578d, +1.5811884868243975E-11d,}, // 132 - {+0.12211392819881439d, -6.6045909118908625E-9d, }, // 133 - {+0.1229778528213501d, -2.8786263916116364E-10d,}, // 134 - {+0.12384103238582611d, +5.354472503748251E-9d, }, // 135 - {+0.12470348179340363d, -3.2924463896248744E-9d, }, // 136 - {+0.12556517124176025d, +4.856678149580005E-9d, }, // 137 - {+0.12642613053321838d, +1.2791850600366742E-9d, }, // 138 - {+0.12728634476661682d, +2.1525945093362843E-9d, }, // 139 - {+0.12814581394195557d, +8.749974471767862E-9d, }, // 140 - {+0.129004567861557d, -7.461209161105275E-9d, }, // 141 - {+0.12986254692077637d, +1.4390208226263824E-8d, }, // 142 - {+0.1307198405265808d, -1.3839477920475328E-8d, }, // 143 - {+0.13157635927200317d, -1.483283901239408E-9d, }, // 144 - {+0.13243216276168823d, -6.889072914229094E-9d, }, // 145 - {+0.1332872211933136d, +9.990351100568362E-10d, }, // 146 - {+0.13414156436920166d, -6.370937412495338E-9d, }, // 147 - {+0.13499516248703003d, +2.05047480130511E-9d, }, // 148 - {+0.1358480453491211d, -2.29509872547079E-9d, }, // 149 - {+0.13670018315315247d, +1.16354361977249E-8d, }, // 150 - {+0.13755163550376892d, -1.452496267904829E-8d, }, // 151 - {+0.1384023129940033d, +9.865115839786888E-9d, }, // 152 - {+0.13925230503082275d, -3.369999130712228E-9d, }, // 153 - {+0.14010155200958252d, +6.602496401651853E-9d, }, // 154 - {+0.14095008373260498d, +1.1205312852298845E-8d, }, // 155 - {+0.14179790019989014d, +1.1660367213160203E-8d, }, // 156 - {+0.142645001411438d, +9.186471222585239E-9d, }, // 157 - {+0.14349138736724854d, +4.999341878263704E-9d, }, // 158 - {+0.14433705806732178d, +3.11611905696257E-10d, }, // 159 - {+0.14518201351165771d, -3.6671598175618173E-9d, }, // 160 - {+0.14602625370025635d, -5.730477881659618E-9d, }, // 161 - {+0.14686977863311768d, -4.674900007989718E-9d, }, // 162 - {+0.1477125883102417d, +6.999732437141968E-10d, }, // 163 - {+0.14855468273162842d, +1.159150872494107E-8d, }, // 164 - {+0.14939609169960022d, -6.082714828488485E-10d, }, // 165 - {+0.15023678541183472d, -4.905712741596318E-9d, }, // 166 - {+0.1510767638683319d, -1.124848988733307E-10d, }, // 167 - {+0.15191605687141418d, -1.484557220949851E-8d, }, // 168 - {+0.15275460481643677d, +1.1682026251371384E-8d, }, // 169 - {+0.15359249711036682d, -8.757272519238786E-9d, }, // 170 - {+0.15442964434623718d, +1.4419920764774415E-8d, }, // 171 - {+0.15526613593101501d, -7.019891063126053E-9d, }, // 172 - {+0.15610191226005554d, -1.230153548825964E-8d, }, // 173 - {+0.15693697333335876d, -2.574172005933276E-10d, }, // 174 - {+0.15777134895324707d, +4.748140799544371E-10d, }, // 175 - {+0.15860503911972046d, -8.943081874891003E-9d, }, // 176 - {+0.15943801403045654d, +2.4500739038517657E-9d, }, // 177 - {+0.1602703034877777d, +6.007922084557054E-9d, }, // 178 - {+0.16110190749168396d, +2.8835418231126645E-9d, }, // 179 - {+0.1619328260421753d, -5.772862039728412E-9d, }, // 180 - {+0.16276302933692932d, +1.0988372954605789E-8d, }, // 181 - {+0.16359257698059082d, -5.292913162607026E-9d, }, // 182 - {+0.16442140936851501d, +6.12956339275823E-9d, }, // 183 - {+0.16524958610534668d, -1.3210039516811888E-8d, }, // 184 - {+0.16607704758644104d, -2.5711014608334873E-9d, }, // 185 - {+0.16690382361412048d, +9.37721319457112E-9d, }, // 186 - {+0.1677299439907074d, -6.0370682395944045E-9d, }, // 187 - {+0.168555349111557d, +1.1918249660105651E-8d, }, // 188 - {+0.1693800985813141d, +4.763282949656017E-9d, }, // 189 - {+0.17020416259765625d, +3.4223342273948817E-9d, }, // 190 - {+0.1710275411605835d, +9.014612241310916E-9d, }, // 191 - {+0.1718502640724182d, -7.145758990550526E-9d, }, // 192 - {+0.172672301530838d, -1.4142763934081504E-8d, }, // 193 - {+0.1734936535358429d, -1.0865453656579032E-8d, }, // 194 - {+0.17431432008743286d, +3.794385569450774E-9d, }, // 195 - {+0.1751343309879303d, +1.1399188501627291E-9d, }, // 196 - {+0.17595365643501282d, +1.2076238768270153E-8d, }, // 197 - {+0.1767723262310028d, +7.901084730502162E-9d, }, // 198 - {+0.17759034037590027d, -1.0288181007465474E-8d, }, // 199 - {+0.1784076690673828d, -1.15945645153806E-8d, }, // 200 - {+0.17922431230545044d, +5.073923825786778E-9d, }, // 201 - {+0.18004029989242554d, +1.1004278077575267E-8d, }, // 202 - {+0.1808556318283081d, +7.2831502374676964E-9d, }, // 203 - {+0.18167030811309814d, -5.0054634662706464E-9d, }, // 204 - {+0.18248429894447327d, +5.022108460298934E-9d, }, // 205 - {+0.18329763412475586d, +8.642254225732676E-9d, }, // 206 - {+0.18411031365394592d, +6.931054493326395E-9d, }, // 207 - {+0.18492233753204346d, +9.619685356326533E-10d, }, // 208 - {+0.18573370575904846d, -8.194157257980706E-9d, }, // 209 - {+0.18654438853263855d, +1.0333241479437797E-8d, }, // 210 - {+0.1873544454574585d, -1.9948340196027965E-9d, }, // 211 - {+0.1881638467311859d, -1.4313002926259948E-8d, }, // 212 - {+0.1889725625514984d, +4.241536392174967E-9d, }, // 213 - {+0.18978065252304077d, -4.877952454011428E-9d, }, // 214 - {+0.1905880868434906d, -1.0813801247641613E-8d, }, // 215 - {+0.1913948655128479d, -1.2513218445781325E-8d, }, // 216 - {+0.19220098853111267d, -8.925958555729115E-9d, }, // 217 - {+0.1930064558982849d, +9.956860681280245E-10d, }, // 218 - {+0.193811297416687d, -1.1505428993246996E-8d, }, // 219 - {+0.1946154534816742d, +1.4217997464522202E-8d, }, // 220 - {+0.19541901350021362d, -1.0200858727747717E-8d, }, // 221 - {+0.19622188806533813d, +5.682607223902455E-9d, }, // 222 - {+0.1970241367816925d, +3.2988908516009827E-9d, }, // 223 - {+0.19782572984695435d, +1.3482965534659446E-8d, }, // 224 - {+0.19862669706344604d, +7.462678536479685E-9d, }, // 225 - {+0.1994270384311676d, -1.3734273888891115E-8d, }, // 226 - {+0.20022669434547424d, +1.0521983802642893E-8d, }, // 227 - {+0.20102575421333313d, -8.152742388541905E-9d, }, // 228 - {+0.2018241584300995d, -9.133484280193855E-9d, }, // 229 - {+0.20262190699577332d, +8.59763959528144E-9d, }, // 230 - {+0.2034190595149994d, -1.3548568223001414E-8d, }, // 231 - {+0.20421552658081055d, +1.4847880344628818E-8d, }, // 232 - {+0.20501139760017395d, +5.390620378060543E-9d, }, // 233 - {+0.2058066427707672d, -1.1109834472051523E-8d, }, // 234 - {+0.20660123229026794d, -3.845373872038116E-9d, }, // 235 - {+0.20739519596099854d, -1.6149279479975042E-9d, }, // 236 - {+0.20818853378295898d, -3.4174925203771133E-9d, }, // 237 - {+0.2089812457561493d, -8.254443919468538E-9d, }, // 238 - {+0.20977330207824707d, +1.4672790944499144E-8d, }, // 239 - {+0.2105647623538971d, +6.753452542942992E-9d, }, // 240 - {+0.21135559678077698d, -1.218609462241927E-9d, }, // 241 - {+0.21214580535888672d, -8.254218316367887E-9d, }, // 242 - {+0.21293538808822632d, -1.3366540360587255E-8d, }, // 243 - {+0.2137243151664734d, +1.4231244750190031E-8d, }, // 244 - {+0.2145126760005951d, -1.3885660525939072E-8d, }, // 245 - {+0.21530038118362427d, -7.3304404046850136E-9d, }, // 246 - {+0.2160874605178833d, +5.072117654842356E-9d, }, // 247 - {+0.21687394380569458d, -5.505080220459036E-9d, }, // 248 - {+0.21765980124473572d, -8.286782292266659E-9d, }, // 249 - {+0.2184450328350067d, -2.302351152358085E-9d, }, // 250 - {+0.21922963857650757d, +1.3416565858314603E-8d, }, // 251 - {+0.22001364827156067d, +1.0033721426962048E-8d, }, // 252 - {+0.22079706192016602d, -1.1487079818684332E-8d, }, // 253 - {+0.22157981991767883d, +9.420348186357043E-9d, }, // 254 - {+0.2223619818687439d, +1.4110645699377834E-8d, }, // 255 - {+0.2231435477733612d, +3.5408485497116107E-9d, }, // 256 - {+0.22392448782920837d, +8.468072777056227E-9d, }, // 257 - {+0.2247048318386078d, +4.255446699237779E-11d, }, // 258 - {+0.22548454999923706d, +9.016946273084244E-9d, }, // 259 - {+0.22626367211341858d, +6.537034810260226E-9d, }, // 260 - {+0.22704219818115234d, -6.451285264969768E-9d, }, // 261 - {+0.22782009840011597d, +7.979956357126066E-10d, }, // 262 - {+0.22859740257263184d, -5.759582672039005E-10d, }, // 263 - {+0.22937411069869995d, -9.633854121180397E-9d, }, // 264 - {+0.23015019297599792d, +4.363736368635843E-9d, }, // 265 - {+0.23092567920684814d, +1.2549416560182509E-8d, }, // 266 - {+0.231700599193573d, -1.3946383592553814E-8d, }, // 267 - {+0.2324748933315277d, -1.458843364504023E-8d, }, // 268 - {+0.23324856162071228d, +1.1551692104697154E-8d, }, // 269 - {+0.23402166366577148d, +5.795621295524984E-9d, }, // 270 - {+0.23479416966438293d, -1.1301979046684263E-9d, }, // 271 - {+0.23556607961654663d, -8.303779721781787E-9d, }, // 272 - {+0.23633739352226257d, -1.4805271785394075E-8d, }, // 273 - {+0.23710808157920837d, +1.0085373835899469E-8d, }, // 274 - {+0.2378782033920288d, +7.679117635349454E-9d, }, // 275 - {+0.2386477291584015d, +8.69177352065934E-9d, }, // 276 - {+0.23941665887832642d, +1.4034725764547136E-8d, }, // 277 - {+0.24018502235412598d, -5.185064518887831E-9d, }, // 278 - {+0.2409527599811554d, +1.1544236628121676E-8d, }, // 279 - {+0.24171993136405945d, +5.523085719902123E-9d, }, // 280 - {+0.24248650670051575d, +7.456824943331887E-9d, }, // 281 - {+0.24325251579284668d, -1.1555923403029638E-8d, }, // 282 - {+0.24401789903640747d, +8.988361382732908E-9d, }, // 283 - {+0.2447827160358429d, +1.0381848020926893E-8d, }, // 284 - {+0.24554696679115295d, -6.480706118857055E-9d, }, // 285 - {+0.24631062150001526d, -1.0904271124793968E-8d, }, // 286 - {+0.2470736801624298d, -1.998183061531611E-9d, }, // 287 - {+0.247836172580719d, -8.676137737360023E-9d, }, // 288 - {+0.24859806895256042d, -2.4921733203932487E-10d,}, // 289 - {+0.2493593990802765d, -5.635173762130303E-9d, }, // 290 - {+0.2501201629638672d, -2.3951455355985637E-8d, }, // 291 - {+0.25088030099868774d, +5.287121672447825E-9d, }, // 292 - {+0.2516399025917053d, -6.447877375049486E-9d, }, // 293 - {+0.25239890813827515d, +1.32472428796441E-9d, }, // 294 - {+0.2531573176383972d, +2.9479464287605006E-8d, }, // 295 - {+0.2539151906967163d, +1.9284247135543574E-8d, }, // 296 - {+0.2546725273132324d, -2.8390360197221716E-8d, }, // 297 - {+0.255429208278656d, +6.533522495226226E-9d, }, // 298 - {+0.2561853528022766d, +5.713225978895991E-9d, }, // 299 - {+0.25694090127944946d, +2.9618050962556135E-8d, }, // 300 - {+0.25769591331481934d, +1.950605015323617E-8d, }, // 301 - {+0.25845038890838623d, -2.3762031507525576E-8d, }, // 302 - {+0.2592042088508606d, +1.98818938195077E-8d, }, // 303 - {+0.25995755195617676d, -2.751925069084042E-8d, }, // 304 - {+0.2607102394104004d, +1.3703391844683932E-8d, }, // 305 - {+0.26146239042282104d, +2.5193525310038174E-8d, }, // 306 - {+0.2622140049934387d, +7.802219817310385E-9d, }, // 307 - {+0.26296502351760864d, +2.1983272709242607E-8d, }, // 308 - {+0.2637155055999756d, +8.979279989292184E-9d, }, // 309 - {+0.2644653916358948d, +2.9240221157844312E-8d, }, // 310 - {+0.265214741230011d, +2.4004885823813374E-8d, }, // 311 - {+0.2659635543823242d, -5.885186277410878E-9d, }, // 312 - {+0.2667117714881897d, +1.4300386517357162E-11d,}, // 313 - {+0.2674594521522522d, -1.7063531531989365E-8d, }, // 314 - {+0.26820653676986694d, +3.3218524692903896E-9d, }, // 315 - {+0.2689530849456787d, +2.3998252479954764E-9d, }, // 316 - {+0.2696990966796875d, -1.8997462070389404E-8d, }, // 317 - {+0.27044451236724854d, -4.350745270980051E-10d, }, // 318 - {+0.2711893916130066d, -6.892221115467135E-10d, }, // 319 - {+0.27193373441696167d, -1.89333199110902E-8d, }, // 320 - {+0.272677481174469d, +5.262017392507765E-9d, }, // 321 - {+0.27342069149017334d, +1.3115046679980076E-8d, }, // 322 - {+0.2741633653640747d, +5.4468361834451975E-9d, }, // 323 - {+0.2749055027961731d, -1.692337384653611E-8d, }, // 324 - {+0.27564704418182373d, +6.426479056697412E-9d, }, // 325 - {+0.2763880491256714d, +1.670735065191342E-8d, }, // 326 - {+0.27712851762771606d, +1.4733029698334834E-8d, }, // 327 - {+0.27786844968795776d, +1.315498542514467E-9d, }, // 328 - {+0.2786078453063965d, -2.2735061539223372E-8d, }, // 329 - {+0.27934664487838745d, +2.994379757313727E-9d, }, // 330 - {+0.28008490800857544d, +1.970577274107218E-8d, }, // 331 - {+0.28082263469696045d, +2.820392733542077E-8d, }, // 332 - {+0.2815598249435425d, +2.929187356678173E-8d, }, // 333 - {+0.28229647874832153d, +2.377086680926386E-8d, }, // 334 - {+0.2830325961112976d, +1.2440393009992529E-8d, }, // 335 - {+0.2837681770324707d, -3.901826104778096E-9d, }, // 336 - {+0.2845032215118408d, -2.4459827842685974E-8d, }, // 337 - {+0.2852376699447632d, +1.1165241398059789E-8d, }, // 338 - {+0.28597164154052734d, -1.54434478239181E-8d, }, // 339 - {+0.28670501708984375d, +1.5714110564653245E-8d, }, // 340 - {+0.28743791580200195d, -1.3782394940142479E-8d, }, // 341 - {+0.2881702184677124d, +1.6063569876284005E-8d, }, // 342 - {+0.28890204429626465d, -1.317176818216125E-8d, }, // 343 - {+0.28963327407836914d, +1.8504673536253893E-8d, }, // 344 - {+0.29036402702331543d, -7.334319635123628E-9d, }, // 345 - {+0.29109418392181396d, +2.9300903540317107E-8d, }, // 346 - {+0.2918238639831543d, +9.979706999541057E-9d, }, // 347 - {+0.29255300760269165d, -4.916314210412424E-9d, }, // 348 - {+0.293281614780426d, -1.4611908070155308E-8d, }, // 349 - {+0.2940096855163574d, -1.833351586679361E-8d, }, // 350 - {+0.29473721981048584d, -1.530926726615185E-8d, }, // 351 - {+0.2954642176628113d, -4.7689754029101934E-9d, }, // 352 - {+0.29619067907333374d, +1.4055868011423819E-8d, }, // 353 - {+0.296916663646698d, -1.7672547212604003E-8d, }, // 354 - {+0.2976420521736145d, +2.0020234215759705E-8d, }, // 355 - {+0.2983669638633728d, +8.688424478730524E-9d, }, // 356 - {+0.2990913391113281d, +8.69851089918337E-9d, }, // 357 - {+0.29981517791748047d, +2.0810681643102672E-8d, }, // 358 - {+0.3005385398864746d, -1.3821169493779352E-8d, }, // 359 - {+0.301261305809021d, +2.4769140784919128E-8d, }, // 360 - {+0.3019835948944092d, +1.8127576600610336E-8d, }, // 361 - {+0.3027053475379944d, +2.6612401062437074E-8d, }, // 362 - {+0.3034266233444214d, -8.629042891789934E-9d, }, // 363 - {+0.3041473627090454d, -2.724174869314043E-8d, }, // 364 - {+0.30486756563186646d, -2.8476975783775358E-8d, }, // 365 - {+0.3055872321128845d, -1.1587600174449919E-8d, }, // 366 - {+0.3063063621520996d, +2.417189020581056E-8d, }, // 367 - {+0.3070250153541565d, +1.99407553679345E-8d, }, // 368 - {+0.3077431917190552d, -2.35387025694381E-8d, }, // 369 - {+0.3084607720375061d, +1.3683509995845583E-8d, }, // 370 - {+0.30917787551879883d, +1.3137214081023085E-8d, }, // 371 - {+0.30989450216293335d, -2.444006866174775E-8d, }, // 372 - {+0.3106105327606201d, +2.0896888605749563E-8d, }, // 373 - {+0.31132614612579346d, -2.893149098508887E-8d, }, // 374 - {+0.31204116344451904d, +5.621509038251498E-9d, }, // 375 - {+0.3127557039260864d, +6.0778104626050015E-9d, }, // 376 - {+0.3134697675704956d, -2.6832941696716294E-8d, }, // 377 - {+0.31418323516845703d, +2.6826625274495256E-8d, }, // 378 - {+0.31489628553390503d, -1.1030897183911054E-8d, }, // 379 - {+0.31560879945755005d, -2.047124671392676E-8d, }, // 380 - {+0.3163207769393921d, -7.709990443086711E-10d, }, // 381 - {+0.3170322775840759d, -1.0812918808112342E-8d, }, // 382 - {+0.3177432417869568d, +9.727979174888975E-9d, }, // 383 - {+0.31845372915267944d, +1.9658551724508715E-9d, }, // 384 - {+0.3191636800765991d, +2.6222628001695826E-8d, }, // 385 - {+0.3198731541633606d, +2.3609400272358744E-8d, }, // 386 - {+0.32058215141296387d, -5.159602957634814E-9d, }, // 387 - {+0.32129061222076416d, +2.329701319016099E-10d, }, // 388 - {+0.32199859619140625d, -1.910633190395738E-8d, }, // 389 - {+0.32270604372024536d, -2.863180390093667E-9d, }, // 390 - {+0.32341301441192627d, -9.934041364456825E-9d, }, // 391 - {+0.3241194486618042d, +1.999240777687192E-8d, }, // 392 - {+0.3248254060745239d, +2.801670341647724E-8d, }, // 393 - {+0.32553088665008545d, +1.4842534265191358E-8d, }, // 394 - {+0.32623589038848877d, -1.882789920477354E-8d, }, // 395 - {+0.3269403576850891d, -1.268923579073577E-8d, }, // 396 - {+0.32764434814453125d, -2.564688370677835E-8d, }, // 397 - {+0.3283478021621704d, +2.6015626820520968E-9d, }, // 398 - {+0.32905077934265137d, +1.3147747907784344E-8d, }, // 399 - {+0.3297532796859741d, +6.686493860720675E-9d, }, // 400 - {+0.33045530319213867d, -1.608884086544153E-8d, }, // 401 - {+0.33115679025650024d, +5.118287907840204E-9d, }, // 402 - {+0.3318578004837036d, +1.139367970944884E-8d, }, // 403 - {+0.3325583338737488d, +3.426327822115399E-9d, }, // 404 - {+0.33325839042663574d, -1.809622142990733E-8d, }, // 405 - {+0.3339579105377197d, +7.116780143398601E-9d, }, // 406 - {+0.3346569538116455d, +2.0145352306345386E-8d, }, // 407 - {+0.3353555202484131d, +2.167272474431968E-8d, }, // 408 - {+0.33605360984802246d, +1.2380696294966822E-8d, }, // 409 - {+0.33675122261047363d, -7.050361059209181E-9d, }, // 410 - {+0.3374482989311218d, +2.366314656322868E-8d, }, // 411 - {+0.3381449580192566d, -1.4010540194086646E-8d, }, // 412 - {+0.3388410806655884d, -1.860165465666482E-10d, }, // 413 - {+0.33953672647476196d, +6.206776940880773E-9d, }, // 414 - {+0.34023189544677734d, +5.841137379010982E-9d, }, // 415 - {+0.3409265875816345d, -6.11041311179286E-10d, }, // 416 - {+0.3416208028793335d, -1.2479264502054702E-8d, }, // 417 - {+0.34231454133987427d, -2.909443297645926E-8d, }, // 418 - {+0.34300774335861206d, +9.815805717097634E-9d, }, // 419 - {+0.3437005281448364d, -1.4291517981101049E-8d, }, // 420 - {+0.3443927764892578d, +1.8457821628427503E-8d, }, // 421 - {+0.34508460760116577d, -1.0481908869377813E-8d, }, // 422 - {+0.34577590227127075d, +1.876076001514746E-8d, }, // 423 - {+0.3464667797088623d, -1.2362653723769037E-8d, }, // 424 - {+0.3471571207046509d, +1.6016578405624026E-8d, }, // 425 - {+0.347847044467926d, -1.4652759033760925E-8d, }, // 426 - {+0.3485364317893982d, +1.549533655901835E-8d, }, // 427 - {+0.34922540187835693d, -1.2093068629412478E-8d, }, // 428 - {+0.3499138355255127d, +2.244531711424792E-8d, }, // 429 - {+0.35060185194015503d, +5.538565518604807E-10d, }, // 430 - {+0.35128939151763916d, -1.7511499366215853E-8d, }, // 431 - {+0.3519763946533203d, +2.850385787215544E-8d, }, // 432 - {+0.35266298055648804d, +2.003926370146842E-8d, }, // 433 - {+0.35334908962249756d, +1.734665280502264E-8d, }, // 434 - {+0.3540347218513489d, +2.1071983674869414E-8d, }, // 435 - {+0.35471993684768677d, -2.774475773922311E-8d, }, // 436 - {+0.3554046154022217d, -9.250975291734664E-9d, }, // 437 - {+0.3560888171195984d, +1.7590672330295415E-8d, }, // 438 - {+0.35677260160446167d, -6.1837904549178745E-9d, }, // 439 - {+0.35745590925216675d, -2.0330362973820856E-8d, }, // 440 - {+0.3581387400627136d, -2.42109990366786E-8d, }, // 441 - {+0.3588210940361023d, -1.7188958587407816E-8d, }, // 442 - {+0.35950297117233276d, +1.3711958590112228E-9d, }, // 443 - {+0.3601844310760498d, -2.7501042008405925E-8d, }, // 444 - {+0.36086535453796387d, +1.6036460343275798E-8d, }, // 445 - {+0.3615458607673645d, +1.3405964389498495E-8d, }, // 446 - {+0.36222589015960693d, +2.484237749027735E-8d, }, // 447 - {+0.36290550231933594d, -8.629967484362177E-9d, }, // 448 - {+0.36358463764190674d, -2.6778729562324134E-8d, }, // 449 - {+0.36426329612731934d, -2.8977490516960565E-8d, }, // 450 - {+0.36494147777557373d, -1.4601106624823502E-8d, }, // 451 - {+0.3656191825866699d, +1.69742947894444E-8d, }, // 452 - {+0.3662964701652527d, +6.7666740211281175E-9d, }, // 453 - {+0.36697328090667725d, +1.500201674336832E-8d, }, // 454 - {+0.3676496744155884d, -1.730424167425052E-8d, }, // 455 - {+0.36832553148269653d, +2.9676011119845104E-8d, }, // 456 - {+0.36900103092193604d, -2.2253590346826743E-8d, }, // 457 - {+0.36967599391937256d, +6.3372065441089185E-9d, }, // 458 - {+0.37035053968429565d, -3.145816653215968E-9d, }, // 459 - {+0.37102460861206055d, +9.515812117036965E-9d, }, // 460 - {+0.371698260307312d, -1.4669965113042639E-8d, }, // 461 - {+0.3723714351654053d, -1.548715389333397E-8d, }, // 462 - {+0.37304413318634033d, +7.674361647125109E-9d, }, // 463 - {+0.37371641397476196d, -4.181177882069608E-9d, }, // 464 - {+0.3743882179260254d, +9.158530500130718E-9d, }, // 465 - {+0.3750596046447754d, -1.13047236597869E-8d, }, // 466 - {+0.3757305145263672d, -5.36108186384227E-9d, }, // 467 - {+0.3764009475708008d, +2.7593452284747873E-8d, }, // 468 - {+0.37707096338272095d, +2.8557016344085205E-8d, }, // 469 - {+0.3777405619621277d, -1.868818164036E-9d, }, // 470 - {+0.3784096837043762d, -3.479042513414447E-9d, }, // 471 - {+0.37907832860946655d, +2.432550290565648E-8d, }, // 472 - {+0.37974655628204346d, +2.2538131805476768E-8d, }, // 473 - {+0.38041436672210693d, -8.244395239939089E-9d, }, // 474 - {+0.3810817003250122d, -7.821867597227376E-9d, }, // 475 - {+0.3817485570907593d, +2.4400089062515914E-8d, }, // 476 - {+0.3824149966239929d, +2.9410015940087773E-8d, }, // 477 - {+0.38308101892471313d, +7.799913824734797E-9d, }, // 478 - {+0.38374656438827515d, +1.976524624939355E-8d, }, // 479 - {+0.38441169261932373d, +6.291008309266035E-9d, }, // 480 - {+0.3850763440132141d, +2.757030889767851E-8d, }, // 481 - {+0.38574057817459106d, +2.4585794728405612E-8d, }, // 482 - {+0.3864043951034546d, -2.0764122246389383E-9d, }, // 483 - {+0.3870677351951599d, +7.77328837578952E-9d, }, // 484 - {+0.3877306580543518d, -4.8859560029989374E-9d, }, // 485 - {+0.3883931040763855d, +2.0133131420595028E-8d, }, // 486 - {+0.38905513286590576d, +2.380738071335498E-8d, }, // 487 - {+0.3897167444229126d, +6.7171126157142075E-9d, }, // 488 - {+0.39037787914276123d, +2.9046141593926277E-8d, }, // 489 - {+0.3910386562347412d, -2.7836800219410262E-8d, }, // 490 - {+0.3916988968849182d, +1.545909820981726E-8d, }, // 491 - {+0.39235877990722656d, -1.930436269002062E-8d, }, // 492 - {+0.3930181860923767d, -1.2343297554921835E-8d, }, // 493 - {+0.3936771750450134d, -2.268889128622553E-8d, }, // 494 - {+0.39433568716049194d, +9.835827818608177E-9d, }, // 495 - {+0.39499378204345703d, +2.6197411946856397E-8d, }, // 496 - {+0.3956514596939087d, +2.6965931069318893E-8d, }, // 497 - {+0.3963087201118469d, +1.2710331127772166E-8d, }, // 498 - {+0.39696556329727173d, -1.6001563011916016E-8d, }, // 499 - {+0.39762192964553833d, +1.0016001590267064E-9d, }, // 500 - {+0.3982778787612915d, +4.680767399874334E-9d, }, // 501 - {+0.39893341064453125d, -4.399582029272418E-9d, }, // 502 - {+0.39958852529525757d, -2.5676078228301587E-8d, }, // 503 - {+0.4002431631088257d, +1.0181870233355787E-9d, }, // 504 - {+0.40089738368988037d, +1.6639728835984655E-8d, }, // 505 - {+0.40155118703842163d, +2.174860642202632E-8d, }, // 506 - {+0.40220457315444946d, +1.6903781197123503E-8d, }, // 507 - {+0.40285754203796387d, +2.663119647467697E-9d, }, // 508 - {+0.40351009368896484d, -2.0416603812329616E-8d, }, // 509 - {+0.4041621685028076d, +7.82494078472695E-9d, }, // 510 - {+0.40481382608413696d, +2.833770747113627E-8d, }, // 511 - {+0.40546512603759766d, -1.7929433274271985E-8d, }, // 512 - {+0.40611594915390015d, -1.1214757379328965E-8d, }, // 513 - {+0.4067663550376892d, -1.0571553019207106E-8d, }, // 514 - {+0.40741634368896484d, -1.5449538712332313E-8d, }, // 515 - {+0.40806591510772705d, -2.529950530235105E-8d, }, // 516 - {+0.40871500968933105d, +2.0031331601617008E-8d, }, // 517 - {+0.4093637466430664d, +1.880755298741952E-9d, }, // 518 - {+0.41001206636428833d, -1.9600580584843318E-8d, }, // 519 - {+0.41065990924835205d, +1.573691633515306E-8d, }, // 520 - {+0.4113073945045471d, -1.0772154376548336E-8d, }, // 521 - {+0.411954402923584d, +2.0624330192486066E-8d, }, // 522 - {+0.4126010537147522d, -8.741139170029572E-9d, }, // 523 - {+0.4132472276687622d, +2.0881457123894216E-8d, }, // 524 - {+0.41389304399490356d, -9.177488027521808E-9d, }, // 525 - {+0.4145383834838867d, +2.0829952491625585E-8d, }, // 526 - {+0.4151833653450012d, -7.767915492597301E-9d, }, // 527 - {+0.4158278703689575d, +2.4774753446082082E-8d, }, // 528 - {+0.41647201776504517d, -2.1581119071750435E-10d,}, // 529 - {+0.4171157479286194d, -2.260047972865202E-8d, }, // 530 - {+0.4177590012550354d, +1.775884601423381E-8d, }, // 531 - {+0.41840189695358276d, +2.185301053838889E-9d, }, // 532 - {+0.4190443754196167d, -9.185071463667081E-9d, }, // 533 - {+0.4196864366531372d, -1.5821896727910552E-8d, }, // 534 - {+0.4203280806541443d, -1.719582086188318E-8d, }, // 535 - {+0.42096930742263794d, -1.2778508303324259E-8d, }, // 536 - {+0.42161011695861816d, -2.042639194493364E-9d, }, // 537 - {+0.42225050926208496d, +1.5538093219698803E-8d, }, // 538 - {+0.4228905439376831d, -1.9115659590156936E-8d, }, // 539 - {+0.42353010177612305d, +1.3729680248843432E-8d, }, // 540 - {+0.42416930198669434d, -4.611893838830296E-9d, }, // 541 - {+0.4248080849647522d, -1.4013456880651706E-8d, }, // 542 - {+0.42544645071029663d, -1.3953728897042917E-8d, }, // 543 - {+0.42608439922332764d, -3.912427573594197E-9d, }, // 544 - {+0.4267219305038452d, +1.6629734283189315E-8d, }, // 545 - {+0.42735910415649414d, -1.1413593493354881E-8d, }, // 546 - {+0.42799586057662964d, -2.792046157580119E-8d, }, // 547 - {+0.42863214015960693d, +2.723009182661306E-8d, }, // 548 - {+0.42926812171936035d, -2.4260535621557444E-8d, }, // 549 - {+0.42990362644195557d, -3.064060124024764E-9d, }, // 550 - {+0.43053877353668213d, -2.787640178598121E-8d, }, // 551 - {+0.4311734437942505d, +2.102412085257792E-8d, }, // 552 - {+0.4318077564239502d, +2.4939635093999683E-8d, }, // 553 - {+0.43244171142578125d, -1.5619414792273914E-8d, }, // 554 - {+0.4330751895904541d, +1.9065734894871523E-8d, }, // 555 - {+0.4337083101272583d, +1.0294301092654604E-8d, }, // 556 - {+0.4343410134315491d, +1.8178469851136E-8d, }, // 557 - {+0.4349733591079712d, -1.6379825102473853E-8d, }, // 558 - {+0.4356052279472351d, +2.6334323946685834E-8d, }, // 559 - {+0.43623673915863037d, +2.761628769925529E-8d, }, // 560 - {+0.436867892742157d, -1.2030229087793677E-8d, }, // 561 - {+0.4374985694885254d, +2.7106814809424793E-8d, }, // 562 - {+0.43812888860702515d, +2.631993083235205E-8d, }, // 563 - {+0.43875885009765625d, -1.3890028312254422E-8d, }, // 564 - {+0.43938833475112915d, +2.6186133735555794E-8d, }, // 565 - {+0.4400174617767334d, +2.783809071694788E-8d, }, // 566 - {+0.440646231174469d, -8.436135220472006E-9d, }, // 567 - {+0.44127458333969116d, -2.2534815932619883E-8d, }, // 568 - {+0.4419025182723999d, -1.3961804471714283E-8d, }, // 569 - {+0.4425300359725952d, +1.7778112039716255E-8d, }, // 570 - {+0.4431571960449219d, +1.3574569976673652E-8d, }, // 571 - {+0.4437839984893799d, -2.607907890164073E-8d, }, // 572 - {+0.4444103240966797d, +1.8518879652136628E-8d, }, // 573 - {+0.44503629207611084d, +2.865065604247164E-8d, }, // 574 - {+0.44566190242767334d, +4.806827797299427E-9d, }, // 575 - {+0.4462870955467224d, +7.0816970994232115E-9d, }, // 576 - {+0.44691193103790283d, -2.3640641240074437E-8d, }, // 577 - {+0.4475363492965698d, -2.7267718387865538E-8d, }, // 578 - {+0.4481603503227234d, -3.3126235292976077E-9d, }, // 579 - {+0.4487839937210083d, -1.0894001590268427E-8d, }, // 580 - {+0.4494072198867798d, +1.0077883359971829E-8d, }, // 581 - {+0.4500300884246826d, +4.825712712114668E-10d, }, // 582 - {+0.450652539730072d, +2.0407987470746858E-8d, }, // 583 - {+0.4512746334075928d, +1.073186581170719E-8d, }, // 584 - {+0.4518963694572449d, -2.8064314757880205E-8d, }, // 585 - {+0.45251762866973877d, +2.3709316816226527E-8d, }, // 586 - {+0.4531385898590088d, -1.2281487504266522E-8d, }, // 587 - {+0.4537591338157654d, -1.634864487421458E-8d, }, // 588 - {+0.45437926054000854d, +1.1985747222409522E-8d, }, // 589 - {+0.45499902963638306d, +1.3594057956219485E-8d, }, // 590 - {+0.4556184411048889d, -1.1047585095328619E-8d, }, // 591 - {+0.45623743534088135d, -1.8592937532754405E-9d, }, // 592 - {+0.4568560719490051d, -1.797135137545755E-8d, }, // 593 - {+0.4574742913246155d, +6.943684261645378E-10d, }, // 594 - {+0.4580921530723572d, -4.994175141684681E-9d, }, // 595 - {+0.45870959758758545d, +2.5039391215625133E-8d, }, // 596 - {+0.45932674407958984d, -2.7943366835352838E-8d, }, // 597 - {+0.45994341373443604d, +1.534146910128904E-8d, }, // 598 - {+0.46055978536605835d, -2.3450920230816267E-8d, }, // 599 - {+0.46117573976516724d, -2.4642997069960124E-8d, }, // 600 - {+0.4617912769317627d, +1.2232622070370946E-8d, }, // 601 - {+0.4624064564704895d, +2.80378133047839E-8d, }, // 602 - {+0.46302127838134766d, +2.3238237048117092E-8d, }, // 603 - {+0.46363574266433716d, -1.7013046451109475E-9d, }, // 604 - {+0.46424978971481323d, +1.3287778803035383E-8d, }, // 605 - {+0.46486347913742065d, +9.06393426961373E-9d, }, // 606 - {+0.4654768109321594d, -1.3910598647592876E-8d, }, // 607 - {+0.46608972549438477d, +4.430214458933614E-9d, }, // 608 - {+0.46670228242874146d, +4.942270562885745E-9d, }, // 609 - {+0.4673144817352295d, -1.1914734393460718E-8d, }, // 610 - {+0.4679262638092041d, +1.3922696570638494E-8d, }, // 611 - {+0.46853768825531006d, +2.3307929211781914E-8d, }, // 612 - {+0.46914875507354736d, +1.669813444584674E-8d, }, // 613 - {+0.469759464263916d, -5.450354376430758E-9d, }, // 614 - {+0.47036975622177124d, +1.6922605350647674E-8d, }, // 615 - {+0.4709796905517578d, +2.4667033200046904E-8d, }, // 616 - {+0.47158926725387573d, +1.8236762070433784E-8d, }, // 617 - {+0.472198486328125d, -1.915204563140137E-9d, }, // 618 - {+0.47280728816986084d, +2.426795414605756E-8d, }, // 619 - {+0.4734157919883728d, -2.19717006713618E-8d, }, // 620 - {+0.47402387857437134d, -2.0974352165535873E-8d, }, // 621 - {+0.47463154792785645d, +2.770970558184228E-8d, }, // 622 - {+0.4752389192581177d, +5.32006955298355E-9d, }, // 623 - {+0.47584593296051025d, -2.809054633964104E-8d, }, // 624 - {+0.4764525294303894d, -1.2470243596102937E-8d, }, // 625 - {+0.4770587682723999d, -6.977226702440138E-9d, }, // 626 - {+0.47766464948654175d, -1.1165866833118273E-8d, }, // 627 - {+0.47827017307281494d, -2.4591344661022708E-8d, }, // 628 - {+0.4788752794265747d, +1.2794996377383974E-8d, }, // 629 - {+0.4794800877571106d, -1.7772927065973874E-8d, }, // 630 - {+0.48008447885513306d, +3.35657712457243E-9d, }, // 631 - {+0.48068851232528687d, +1.7020465042442242E-8d, }, // 632 - {+0.481292188167572d, +2.365953779624783E-8d, }, // 633 - {+0.4818955063819885d, +2.3713798664443718E-8d, }, // 634 - {+0.4824984669685364d, +1.7622455019548098E-8d, }, // 635 - {+0.4831010699272156d, +5.823920246566496E-9d, }, // 636 - {+0.4837033152580261d, -1.1244184344361017E-8d, }, // 637 - {+0.48430514335632324d, +2.645961716432205E-8d, }, // 638 - {+0.4849066734313965d, +1.6207809718247905E-10d,}, // 639 - {+0.4855077862739563d, +2.9507744508973654E-8d, }, // 640 - {+0.48610860109329224d, -4.278201128741098E-9d, }, // 641 - {+0.48670899868011475d, +1.844722015961139E-8d, }, // 642 - {+0.4873090982437134d, -2.1092372471088425E-8d, }, // 643 - {+0.4879087805747986d, -3.2555596107382053E-9d, }, // 644 - {+0.48850810527801514d, +1.2784366845429667E-8d, }, // 645 - {+0.48910707235336304d, +2.7457984659996047E-8d, }, // 646 - {+0.48970574140548706d, -1.8409546441412518E-8d, }, // 647 - {+0.49030399322509766d, -5.179903818099661E-9d, }, // 648 - {+0.4909018874168396d, +7.97053127828682E-9d, }, // 649 - {+0.4914994239807129d, +2.146925464473481E-8d, }, // 650 - {+0.4920966625213623d, -2.3861648589988232E-8d, }, // 651 - {+0.4926934838294983d, -8.386923035320549E-9d, }, // 652 - {+0.4932899475097656d, +8.713990131749256E-9d, }, // 653 - {+0.4938860535621643d, +2.7865534085810115E-8d, }, // 654 - {+0.4944818615913391d, -1.011325138560159E-8d, }, // 655 - {+0.4950772523880005d, +1.4409851026316708E-8d, }, // 656 - {+0.495672345161438d, -1.735227547472004E-8d, }, // 657 - {+0.49626702070236206d, +1.4231078209064581E-8d, }, // 658 - {+0.49686139822006226d, -9.628709342929729E-9d, }, // 659 - {+0.4974554181098938d, -2.8907074856577267E-8d, }, // 660 - {+0.4980490207672119d, +1.6419797090870802E-8d, }, // 661 - {+0.49864232540130615d, +7.561041519403049E-9d, }, // 662 - {+0.49923527240753174d, +4.538983468118194E-9d, }, // 663 - {+0.49982786178588867d, +7.770560657946324E-9d, }, // 664 - {+0.500420093536377d, +1.767197002609876E-8d, }, // 665 - {+0.5010119676589966d, +3.46586694799214E-8d, }, // 666 - {+0.5016034841537476d, +5.914537964556077E-8d, }, // 667 - {+0.5021947622299194d, -2.7663203939320167E-8d, }, // 668 - {+0.5027855634689331d, +1.3064749115929298E-8d, }, // 669 - {+0.5033761262893677d, -5.667682106730711E-8d, }, // 670 - {+0.503966212272644d, +1.9424534974370594E-9d, }, // 671 - {+0.5045560598373413d, -4.908494602153544E-8d, }, // 672 - {+0.5051454305648804d, +2.906989285008994E-8d, }, // 673 - {+0.5057345628738403d, -1.602000800745108E-9d, }, // 674 - {+0.5063233375549316d, -2.148245271118002E-8d, }, // 675 - {+0.5069117546081543d, -3.016329994276181E-8d, }, // 676 - {+0.5074998140335083d, -2.7237099632871992E-8d, }, // 677 - {+0.5080875158309937d, -1.2297127301923986E-8d, }, // 678 - {+0.5086748600006104d, +1.5062624834468093E-8d, }, // 679 - {+0.5092618465423584d, +5.524744954836658E-8d, }, // 680 - {+0.5098485946655273d, -1.054736327333046E-8d, }, // 681 - {+0.5104348659515381d, +5.650063324725722E-8d, }, // 682 - {+0.5110208988189697d, +1.8376017791642605E-8d, }, // 683 - {+0.5116065740585327d, -5.309470636324855E-9d, }, // 684 - {+0.512191891670227d, -1.4154089255217218E-8d, }, // 685 - {+0.5127768516540527d, -7.756800301729815E-9d, }, // 686 - {+0.5133614540100098d, +1.4282730618002001E-8d, }, // 687 - {+0.5139456987380981d, +5.2364136172269755E-8d, }, // 688 - {+0.5145297050476074d, -1.2322940607922115E-8d, }, // 689 - {+0.5151132345199585d, +5.903831350855322E-8d, }, // 690 - {+0.5156965255737305d, +2.8426856726994483E-8d, }, // 691 - {+0.5162794589996338d, +1.544882070711032E-8d, }, // 692 - {+0.5168620347976685d, +2.0500353979930155E-8d, }, // 693 - {+0.5174442529678345d, +4.397691311390564E-8d, }, // 694 - {+0.5180262327194214d, -3.2936025225250634E-8d, }, // 695 - {+0.5186077356338501d, +2.857419553449673E-8d, }, // 696 - {+0.5191890001296997d, -9.51761338269325E-9d, }, // 697 - {+0.5197699069976807d, -2.7609457648450225E-8d, }, // 698 - {+0.520350456237793d, -2.5309316441333305E-8d, }, // 699 - {+0.5209306478500366d, -2.2258513086839407E-9d, }, // 700 - {+0.5215104818344116d, +4.203159541613745E-8d, }, // 701 - {+0.5220900774002075d, -1.1356287358852729E-8d, }, // 702 - {+0.5226693153381348d, -4.279090925831093E-8d, }, // 703 - {+0.5232481956481934d, -5.188364552285819E-8d, }, // 704 - {+0.5238267183303833d, -3.82465458937857E-8d, }, // 705 - {+0.5244048833847046d, -1.4923330530645769E-9d, }, // 706 - {+0.5249826908111572d, +5.8765598932137004E-8d, }, // 707 - {+0.5255602598190308d, +2.3703896609663678E-8d, }, // 708 - {+0.5261374711990356d, +1.2917117341231647E-8d, }, // 709 - {+0.5267143249511719d, +2.6789862192139226E-8d, }, // 710 - {+0.527290940284729d, -5.350322253112414E-8d, }, // 711 - {+0.5278670787811279d, +1.0839714455426386E-8d, }, // 712 - {+0.5284429788589478d, -1.821729591343314E-8d, }, // 713 - {+0.5290185213088989d, -2.1083014672301448E-8d, }, // 714 - {+0.5295937061309814d, +2.623848491704216E-9d, }, // 715 - {+0.5301685333251953d, +5.328392630534142E-8d, }, // 716 - {+0.5307431221008301d, +1.206790586971942E-8d, }, // 717 - {+0.5313173532485962d, -1.4356011804377797E-9d, }, // 718 - {+0.5318912267684937d, +1.3152074173459994E-8d, }, // 719 - {+0.5324647426605225d, +5.6208949382936426E-8d, }, // 720 - {+0.5330380201339722d, +8.90310227565917E-9d, }, // 721 - {+0.5336109399795532d, -9.179458802504127E-9d, }, // 722 - {+0.5341835021972656d, +2.337337845617735E-9d, }, // 723 - {+0.5347557067871094d, +4.3828918300477925E-8d, }, // 724 - {+0.535327672958374d, -3.5392250480081715E-9d, }, // 725 - {+0.53589928150177d, -2.0183663375378704E-8d, }, // 726 - {+0.5364705324172974d, -5.730898606435436E-9d, }, // 727 - {+0.537041425704956d, +4.0191927599879235E-8d, }, // 728 - {+0.5376120805740356d, -1.2522542401353875E-9d, }, // 729 - {+0.5381823778152466d, -1.0482571326594316E-8d, }, // 730 - {+0.5387523174285889d, +1.2871924223480165E-8d, }, // 731 - {+0.539322018623352d, -5.002774317612589E-8d, }, // 732 - {+0.539891242980957d, +3.960668706590162E-8d, }, // 733 - {+0.5404602289199829d, +4.372568630242375E-8d, }, // 734 - {+0.5410289764404297d, -3.730232461206926E-8d, }, // 735 - {+0.5415972471237183d, +3.5309026109857795E-8d, }, // 736 - {+0.5421652793884277d, +2.3508325311148225E-8d, }, // 737 - {+0.5427329540252686d, +4.6871403168921666E-8d, }, // 738 - {+0.5433003902435303d, -1.3445113140270216E-8d, }, // 739 - {+0.5438674688339233d, -3.786663982218041E-8d, }, // 740 - {+0.5444341897964478d, -2.602850370608209E-8d, }, // 741 - {+0.5450005531311035d, +2.2433348713144506E-8d, }, // 742 - {+0.5455666780471802d, -1.1326936872620137E-8d, }, // 743 - {+0.5461324453353882d, -7.737252533211342E-9d, }, // 744 - {+0.5466978549957275d, +3.3564604642699844E-8d, }, // 745 - {+0.5472630262374878d, -6.269066061111782E-9d, }, // 746 - {+0.5478278398513794d, -7.667998948729528E-9d, }, // 747 - {+0.5483922958374023d, +2.9728170818998143E-8d, }, // 748 - {+0.5489565134048462d, -1.2930091396008281E-8d, }, // 749 - {+0.5495203733444214d, -1.607434968107079E-8d, }, // 750 - {+0.5500838756561279d, +2.0653935146671156E-8d, }, // 751 - {+0.5506471395492554d, -2.1596593091833788E-8d, }, // 752 - {+0.5512100458145142d, -2.3259315921149476E-8d, }, // 753 - {+0.5517725944519043d, +1.6022492496522704E-8d, }, // 754 - {+0.5523349046707153d, -2.260433328226171E-8d, }, // 755 - {+0.5528968572616577d, -1.957497997726303E-8d, }, // 756 - {+0.5534584522247314d, +2.5465477111883854E-8d, }, // 757 - {+0.5540198087692261d, -6.33792454933092E-9d, }, // 758 - {+0.554580807685852d, +4.577835263278281E-9d, }, // 759 - {+0.5551414489746094d, +5.856589221771548E-8d, }, // 760 - {+0.5557018518447876d, +3.6769498759522324E-8d, }, // 761 - {+0.5562618970870972d, +5.874989409410614E-8d, }, // 762 - {+0.5568217039108276d, +5.649147309876989E-9d, }, // 763 - {+0.5573811531066895d, -2.9726830960751796E-9d, }, // 764 - {+0.5579402446746826d, +3.323458344853057E-8d, }, // 765 - {+0.5584990978240967d, -4.588749093664028E-9d, }, // 766 - {+0.5590575933456421d, +3.115616594184543E-9d, }, // 767 - {+0.5596157312393188d, +5.6696103838614634E-8d, }, // 768 - {+0.5601736307144165d, +3.7291263280048303E-8d, }, // 769 - {+0.5607312917709351d, -5.4751646725093355E-8d, }, // 770 - {+0.5612884759902954d, +1.9332630743320287E-8d, }, // 771 - {+0.5618454217910767d, +2.147161515775941E-8d, }, // 772 - {+0.5624021291732788d, -4.7989172862560625E-8d, }, // 773 - {+0.5629583597183228d, +4.971378973445109E-8d, }, // 774 - {+0.5635144710540771d, -4.2702997139152675E-8d, }, // 775 - {+0.5640701055526733d, +3.273212962622764E-8d, }, // 776 - {+0.5646255016326904d, +3.79438125545842E-8d, }, // 777 - {+0.5651806592941284d, -2.6725298288329835E-8d, }, // 778 - {+0.5657354593276978d, -4.1723833577410244E-8d, }, // 779 - {+0.5662899017333984d, -6.71028256490915E-9d, }, // 780 - {+0.56684410572052d, -4.055299181908475E-8d, }, // 781 - {+0.567397952079773d, -2.3702295314000405E-8d, }, // 782 - {+0.5679514408111572d, +4.4181618172507453E-8d, }, // 783 - {+0.5685046911239624d, +4.4228706309734985E-8d, }, // 784 - {+0.5690577030181885d, -2.3222346436879016E-8d, }, // 785 - {+0.5696103572845459d, -3.862412756175274E-8d, }, // 786 - {+0.5701626539230347d, -1.6390743801589046E-9d, }, // 787 - {+0.5707147121429443d, -3.1139472791083883E-8d, }, // 788 - {+0.5712664127349854d, -7.579587391156013E-9d, }, // 789 - {+0.5718178749084473d, -4.983281844744412E-8d, }, // 790 - {+0.5723689794540405d, -3.835454246739619E-8d, }, // 791 - {+0.5729197263717651d, +2.7190020372374008E-8d, }, // 792 - {+0.5734702348709106d, +2.7925807446276126E-8d, }, // 793 - {+0.574020504951477d, -3.5813506001861646E-8d, }, // 794 - {+0.5745704174041748d, -4.448550564530588E-8d, }, // 795 - {+0.5751199722290039d, +2.2423840341717488E-9d, }, // 796 - {+0.5756692886352539d, -1.450709904687712E-8d, }, // 797 - {+0.5762182474136353d, +2.4806815282282017E-8d, }, // 798 - {+0.5767669677734375d, +1.3057724436551892E-9d, }, // 799 - {+0.5773153305053711d, +3.4529452510568104E-8d, }, // 800 - {+0.5778634548187256d, +5.598413198183808E-9d, }, // 801 - {+0.5784112215042114d, +3.405124925700107E-8d, }, // 802 - {+0.5789587497711182d, +1.0074354568442952E-9d, }, // 803 - {+0.5795059204101562d, +2.600448597385527E-8d, }, // 804 - {+0.5800528526306152d, -9.83920263200211E-9d, }, // 805 - {+0.5805994272232056d, +1.3012807963586057E-8d, }, // 806 - {+0.5811457633972168d, -2.432215917965441E-8d, }, // 807 - {+0.5816917419433594d, -2.308736892479391E-9d, }, // 808 - {+0.5822374820709229d, -3.983067093146514E-8d, }, // 809 - {+0.5827828645706177d, -1.735366061128156E-8d, }, // 810 - {+0.5833280086517334d, -5.376251584638963E-8d, }, // 811 - {+0.5838727951049805d, -2.952399778965259E-8d, }, // 812 - {+0.5844172239303589d, +5.5685313670430624E-8d, }, // 813 - {+0.5849615335464478d, -3.6230268489088716E-8d, }, // 814 - {+0.5855053663253784d, +5.267948957869391E-8d, }, // 815 - {+0.5860490798950195d, -3.489144132234588E-8d, }, // 816 - {+0.5865923166275024d, +5.9006122320612716E-8d, }, // 817 - {+0.5871354341506958d, -2.2934896740542648E-8d, }, // 818 - {+0.5876781940460205d, -4.1975650319859075E-8d, }, // 819 - {+0.5882205963134766d, +2.2036094805348692E-9d, }, // 820 - {+0.5887627601623535d, -9.287179048539306E-9d, }, // 821 - {+0.5893045663833618d, +4.3079982556221595E-8d, }, // 822 - {+0.589846134185791d, +4.041399585161321E-8d, }, // 823 - {+0.5903874635696411d, -1.696746473863933E-8d, }, // 824 - {+0.5909284353256226d, -9.53795080582038E-9d, }, // 825 - {+0.5914691686630249d, -5.619010749352923E-8d, }, // 826 - {+0.5920095443725586d, -3.7398514182529506E-8d, }, // 827 - {+0.5925495624542236d, +4.71524479659295E-8d, }, // 828 - {+0.5930894613265991d, -4.0640692434639215E-8d, }, // 829 - {+0.5936288833618164d, +5.716453096255401E-8d, }, // 830 - {+0.5941681861877441d, -1.6745661720946737E-8d, }, // 831 - {+0.5947071313858032d, -2.3639110433141897E-8d, }, // 832 - {+0.5952457189559937d, +3.67972590471072E-8d, }, // 833 - {+0.595784068107605d, +4.566672575206695E-8d, }, // 834 - {+0.5963221788406372d, +3.2813537149653483E-9d, }, // 835 - {+0.5968599319458008d, +2.916199305533732E-8d, }, // 836 - {+0.5973974466323853d, +4.410412409109416E-9d, }, // 837 - {+0.5979346036911011d, +4.85464582112459E-8d, }, // 838 - {+0.5984715223312378d, +4.267089756924666E-8d, }, // 839 - {+0.5990082025527954d, -1.2906712010774655E-8d, }, // 840 - {+0.5995445251464844d, +1.3319784467641742E-9d, }, // 841 - {+0.6000806093215942d, -3.35137581974451E-8d, }, // 842 - {+0.6006163358688354d, +2.0734340706476473E-9d, }, // 843 - {+0.6011518239974976d, -1.0808162722402073E-8d, }, // 844 - {+0.601686954498291d, +4.735781872502109E-8d, }, // 845 - {+0.6022218465805054d, +5.76686738430634E-8d, }, // 846 - {+0.6027565002441406d, +2.043049589651736E-8d, }, // 847 - {+0.6032907962799072d, +5.515817703577808E-8d, }, // 848 - {+0.6038248538970947d, +4.2947540692649586E-8d, }, // 849 - {+0.6043586730957031d, -1.589678872195875E-8d, }, // 850 - {+0.6048921346664429d, -1.8613847754677912E-9d, }, // 851 - {+0.6054253578186035d, -3.3851886626187444E-8d, }, // 852 - {+0.6059582233428955d, +7.64416021682279E-9d, }, // 853 - {+0.6064908504486084d, +3.7201467248814224E-9d, }, // 854 - {+0.6070232391357422d, -4.532172996647129E-8d, }, // 855 - {+0.6075552701950073d, -1.997046552871766E-8d, }, // 856 - {+0.6080870628356934d, -3.913411606668587E-8d, }, // 857 - {+0.6086184978485107d, +1.6697361107868944E-8d, }, // 858 - {+0.609149694442749d, +2.8614950293715483E-8d, }, // 859 - {+0.6096806526184082d, -3.081552929643174E-9d, }, // 860 - {+0.6102112531661987d, +4.111645931319645E-8d, }, // 861 - {+0.6107416152954102d, +4.2298539553668435E-8d, }, // 862 - {+0.6112717390060425d, +7.630546413718035E-10d, }, // 863 - {+0.6118015050888062d, +3.601718675118614E-8d, }, // 864 - {+0.6123310327529907d, +2.914906573537692E-8d, }, // 865 - {+0.6128603219985962d, -1.9544361222269494E-8d, }, // 866 - {+0.613389253616333d, +9.442671392695732E-9d, }, // 867 - {+0.6139179468154907d, -2.8031202304593286E-9d, }, // 868 - {+0.6144464015960693d, -5.598619958143586E-8d, }, // 869 - {+0.6149744987487793d, -3.060220883766096E-8d, }, // 870 - {+0.6155023574829102d, -4.556583652800433E-8d, }, // 871 - {+0.6160298585891724d, +1.8626341656366314E-8d, }, // 872 - {+0.6165571212768555d, +4.305870564227991E-8d, }, // 873 - {+0.6170841455459595d, +2.8024460607734262E-8d, }, // 874 - {+0.6176109313964844d, -2.6183651590639875E-8d, }, // 875 - {+0.6181373596191406d, -6.406189112730307E-11d, }, // 876 - {+0.6186635494232178d, -1.2534241706168776E-8d, }, // 877 - {+0.6191893815994263d, +5.5906456251308664E-8d, }, // 878 - {+0.6197150945663452d, -3.286964881802063E-8d, }, // 879 - {+0.6202404499053955d, -4.0153537978961E-8d, }, // 880 - {+0.6207654476165771d, +3.434477109643361E-8d, }, // 881 - {+0.6212903261184692d, -4.750377491075032E-8d, }, // 882 - {+0.6218148469924927d, -4.699152670372743E-8d, }, // 883 - {+0.6223390102386475d, +3.617013128065961E-8d, }, // 884 - {+0.6228630542755127d, -3.6149218175202596E-8d, }, // 885 - {+0.6233867406845093d, -2.5243286814648133E-8d, }, // 886 - {+0.6239101886749268d, -5.003410681432538E-8d, }, // 887 - {+0.6244332790374756d, +8.974417915105033E-9d, }, // 888 - {+0.6249561309814453d, +3.285935446876949E-8d, }, // 889 - {+0.6254787445068359d, +2.190661054038537E-8d, }, // 890 - {+0.6260011196136475d, -2.3598354190515998E-8d, }, // 891 - {+0.6265231370925903d, +1.5838762427747586E-8d, }, // 892 - {+0.6270449161529541d, +2.129323729978037E-8d, }, // 893 - {+0.6275664567947388d, -6.950808333865794E-9d, }, // 894 - {+0.6280876398086548d, +5.059959203156465E-8d, }, // 895 - {+0.6286087036132812d, -4.41909071122557E-8d, }, // 896 - {+0.6291294097900391d, -5.262093550784066E-8d, }, // 897 - {+0.6296497583389282d, +2.559185648444699E-8d, }, // 898 - {+0.6301699876785278d, -4.768920119497491E-8d, }, // 899 - {+0.6306898593902588d, -3.376406008397877E-8d, }, // 900 - {+0.6312094926834106d, -5.156097914033476E-8d, }, // 901 - {+0.6317287683486938d, +1.840992392368355E-8d, }, // 902 - {+0.632247805595398d, +5.721951534729663E-8d, }, // 903 - {+0.6327667236328125d, -5.406177467045421E-8d, }, // 904 - {+0.6332851648330688d, +4.247320713683124E-8d, }, // 905 - {+0.6338034868240356d, -1.0524557502830645E-8d, }, // 906 - {+0.6343214511871338d, +2.5641927558519502E-8d, }, // 907 - {+0.6348391771316528d, +3.204135737993823E-8d, }, // 908 - {+0.6353566646575928d, +8.951285029786536E-9d, }, // 909 - {+0.6358739137649536d, -4.335116707228395E-8d, }, // 910 - {+0.6363908052444458d, -5.380016714089483E-9d, }, // 911 - {+0.6369074583053589d, +3.931710344901743E-9d, }, // 912 - {+0.6374238729476929d, -1.5140150088220166E-8d, }, // 913 - {+0.6379399299621582d, +5.688910024377372E-8d, }, // 914 - {+0.638455867767334d, -1.8124135273572568E-8d, }, // 915 - {+0.6389714479446411d, -1.486720391901626E-9d, }, // 916 - {+0.6394867897033691d, -1.2133811978747018E-8d, }, // 917 - {+0.6400018930435181d, -4.9791700939901716E-8d, }, // 918 - {+0.6405166387557983d, +5.022188652837274E-9d, }, // 919 - {+0.6410311460494995d, +3.337143177933685E-8d, }, // 920 - {+0.6415454149246216d, +3.55284719912458E-8d, }, // 921 - {+0.6420594453811646d, +1.1765332726757802E-8d, }, // 922 - {+0.6425732374191284d, -3.7646381826067834E-8d, }, // 923 - {+0.6430866718292236d, +6.773803682579552E-9d, }, // 924 - {+0.6435998678207397d, +2.608736797081283E-8d, }, // 925 - {+0.6441128253936768d, +2.056466263408266E-8d, }, // 926 - {+0.6446255445480347d, -9.524376551107945E-9d, }, // 927 - {+0.6451379060745239d, +5.5299060775883977E-8d, }, // 928 - {+0.6456501483917236d, -2.3114497793159813E-8d, }, // 929 - {+0.6461620330810547d, -6.077779731902102E-9d, }, // 930 - {+0.6466736793518066d, -1.2531793589140273E-8d, }, // 931 - {+0.6471850872039795d, -4.220866994206517E-8d, }, // 932 - {+0.6476961374282837d, +2.4368339445199057E-8d, }, // 933 - {+0.6482070684432983d, -5.095229574221907E-8d, }, // 934 - {+0.6487176418304443d, -2.9485356677301627E-8d, }, // 935 - {+0.6492279767990112d, -3.0173901411577916E-8d, }, // 936 - {+0.649738073348999d, -5.275210583909726E-8d, }, // 937 - {+0.6502478122711182d, +2.2254737134350224E-8d, }, // 938 - {+0.6507574319839478d, -4.330693978322885E-8d, }, // 939 - {+0.6512666940689087d, -1.0753950588009912E-8d, }, // 940 - {+0.6517757177352905d, +9.686179886293545E-10d, }, // 941 - {+0.6522845029830933d, -7.875434494414498E-9d, }, // 942 - {+0.6527930498123169d, -3.702271091849158E-8d, }, // 943 - {+0.6533012390136719d, +3.2999073763758614E-8d, }, // 944 - {+0.6538093090057373d, -3.5966064858620067E-8d, }, // 945 - {+0.6543170213699341d, -5.23735298540578E-9d, }, // 946 - {+0.6548244953155518d, +6.237715351293023E-9d, }, // 947 - {+0.6553317308425903d, -1.279462699936282E-9d, }, // 948 - {+0.6558387279510498d, -2.7527887552743672E-8d, }, // 949 - {+0.6563453674316406d, +4.696233317356646E-8d, }, // 950 - {+0.6568518877029419d, -1.5967172745329108E-8d, }, // 951 - {+0.6573580503463745d, +2.2361985518423144E-8d, }, // 952 - {+0.657863974571228d, +4.2999935789083046E-8d, }, // 953 - {+0.6583696603775024d, +4.620570188811826E-8d, }, // 954 - {+0.6588751077651978d, +3.223791487908353E-8d, }, // 955 - {+0.659380316734314d, +1.3548138612715822E-9d, }, // 956 - {+0.6598852872848511d, -4.618575323863973E-8d, }, // 957 - {+0.6603899002075195d, +9.082960673843353E-9d, }, // 958 - {+0.6608942747116089d, +4.820873399634487E-8d, }, // 959 - {+0.6613985300064087d, -4.776104368314602E-8d, }, // 960 - {+0.6619024276733398d, -4.0151502150238136E-8d, }, // 961 - {+0.6624060869216919d, -4.791602708710648E-8d, }, // 962 - {+0.6629093885421753d, +4.8410188461165925E-8d, }, // 963 - {+0.6634125709533691d, +1.0663697110471944E-8d, }, // 964 - {+0.6639155149459839d, -4.1691464781797555E-8d, }, // 965 - {+0.66441810131073d, +1.080835500478704E-8d, }, // 966 - {+0.664920449256897d, +4.920784622407246E-8d, }, // 967 - {+0.6654226779937744d, -4.544868396511241E-8d, }, // 968 - {+0.6659245491027832d, -3.448944157854234E-8d, }, // 969 - {+0.6664261817932129d, -3.6870882345139385E-8d, }, // 970 - {+0.6669275760650635d, -5.234055273962444E-8d, }, // 971 - {+0.6674286127090454d, +3.856291077979099E-8d, }, // 972 - {+0.6679295301437378d, -2.327375671320742E-9d, }, // 973 - {+0.6684302091598511d, -5.555080534042001E-8d, }, // 974 - {+0.6689305305480957d, -1.6471487337453832E-9d, }, // 975 - {+0.6694306135177612d, +4.042486803683015E-8d, }, // 976 - {+0.6699305772781372d, -4.8293856891818295E-8d, }, // 977 - {+0.6704301834106445d, -2.9134931730784303E-8d, }, // 978 - {+0.6709295511245728d, -2.1058207594753368E-8d, }, // 979 - {+0.6714286804199219d, -2.3814619551682855E-8d, }, // 980 - {+0.6719275712966919d, -3.7155475428252136E-8d, }, // 981 - {+0.6724261045455933d, +5.8376834484391746E-8d, }, // 982 - {+0.6729245185852051d, +2.4611679969129262E-8d, }, // 983 - {+0.6734226942062378d, -1.899407107267079E-8d, }, // 984 - {+0.6739205121994019d, +4.7016079464436395E-8d, }, // 985 - {+0.6744182109832764d, -1.5529608026276525E-8d, }, // 986 - {+0.6749155521392822d, +3.203391672602453E-8d, }, // 987 - {+0.6754127740859985d, -4.8465821804075345E-8d, }, // 988 - {+0.6759096384048462d, -1.8364507801369988E-8d, }, // 989 - {+0.6764062643051147d, +3.3739397633046517E-9d, }, // 990 - {+0.6769026517868042d, +1.6994526063192333E-8d, }, // 991 - {+0.6773988008499146d, +2.2741891590028428E-8d, }, // 992 - {+0.6778947114944458d, +2.0860312877435047E-8d, }, // 993 - {+0.678390383720398d, +1.1593703222523284E-8d, }, // 994 - {+0.678885817527771d, -4.814386594291911E-9d, }, // 995 - {+0.6793810129165649d, -2.812076759125914E-8d, }, // 996 - {+0.6798759698867798d, -5.808261186903479E-8d, }, // 997 - {+0.680370569229126d, +2.4751837654582522E-8d, }, // 998 - {+0.6808650493621826d, -1.7793890245755405E-8d, }, // 999 - {+0.6813591718673706d, +5.294053246347931E-8d, }, // 1000 - {+0.681853175163269d, -1.2220826223585654E-9d, }, // 1001 - {+0.6823468208312988d, +5.8377876767612725E-8d, }, // 1002 - {+0.6828403472900391d, -6.437492120743254E-9d, }, // 1003 - {+0.6833335161209106d, +4.2990710043633113E-8d, }, // 1004 - {+0.6838265657424927d, -3.1516131027023284E-8d, }, // 1005 - {+0.684319257736206d, +8.70017386744679E-9d, }, // 1006 - {+0.6848117113113403d, +4.466959125843237E-8d, }, // 1007 - {+0.6853040456771851d, -4.25782656420497E-8d, }, // 1008 - {+0.6857960224151611d, -1.4386267593671393E-8d, }, // 1009 - {+0.6862877607345581d, +1.0274494061148778E-8d, }, // 1010 - {+0.686779260635376d, +3.164186629229597E-8d, }, // 1011 - {+0.6872705221176147d, +4.995334552140326E-8d, }, // 1012 - {+0.687761664390564d, -5.3763211240398744E-8d, }, // 1013 - {+0.6882524490356445d, -4.0852427502515625E-8d, }, // 1014 - {+0.688742995262146d, -3.0287143914420064E-8d, }, // 1015 - {+0.6892333030700684d, -2.183125937905008E-8d, }, // 1016 - {+0.6897233724594116d, -1.524901992178814E-8d, }, // 1017 - {+0.6902132034301758d, -1.0305018010328949E-8d, }, // 1018 - {+0.6907027959823608d, -6.764191876212205E-9d, }, // 1019 - {+0.6911921501159668d, -4.391824838015402E-9d, }, // 1020 - {+0.6916812658309937d, -2.9535446262017846E-9d, }, // 1021 - {+0.6921701431274414d, -2.2153227096187463E-9d, }, // 1022 - {+0.6926587820053101d, -1.943473623641502E-9d, }, // 1023 + {+0.0d, +0.0d }, // 0 + {+9.760860120877624E-4d, -3.903230345984362E-11d }, // 1 + {+0.0019512202125042677d, -8.124251825289188E-11d }, // 2 + {+0.0029254043474793434d, -1.8374207360194882E-11d}, // 3 + {+0.0038986406289041042d, -2.1324678121885073E-10d}, // 4 + {+0.004870930686593056d, -4.5199654318611534E-10d}, // 5 + {+0.00584227591753006d, -2.933016992001806E-10d }, // 6 + {+0.006812678650021553d, -2.325147219074669E-10d }, // 7 + {+0.007782140746712685d, -3.046577356838847E-10d }, // 8 + {+0.008750664070248604d, -5.500631513861575E-10d }, // 9 + {+0.00971824862062931d, +8.48292035519895E-10d }, // 10 + {+0.010684899985790253d, +1.1422610134013436E-10d}, // 11 + {+0.01165061630308628d, +9.168889933128375E-10d }, // 12 + {+0.012615403160452843d, -5.303786078838E-10d }, // 13 + {+0.013579258695244789d, -5.688639355498786E-10d }, // 14 + {+0.01454218477010727d, +7.296670293275653E-10d }, // 15 + {+0.015504186972975731d, -4.370104767451421E-10d }, // 16 + {+0.016465261578559875d, +1.43695591408832E-9d }, // 17 + {+0.01742541790008545d, -1.1862263158849434E-9d }, // 18 + {+0.018384650349617004d, -9.482976524690715E-10d }, // 19 + {+0.01934296265244484d, +1.9068609515836638E-10d}, // 20 + {+0.020300358533859253d, +2.655990315697216E-10d }, // 21 + {+0.021256837993860245d, +1.0315548713040775E-9d }, // 22 + {+0.022212404757738113d, +5.13345647019085E-10d }, // 23 + {+0.02316705882549286d, +4.5604151934208014E-10d}, // 24 + {+0.02412080392241478d, -1.1255706987475148E-9d }, // 25 + {+0.025073636323213577d, +1.2289023836765196E-9d }, // 26 + {+0.02602556347846985d, +1.7990281828096504E-9d }, // 27 + {+0.026976589113473892d, -1.4152718164638451E-9d }, // 28 + {+0.02792670577764511d, +7.568772963781632E-10d }, // 29 + {+0.0288759246468544d, -1.1449998592111558E-9d }, // 30 + {+0.029824241995811462d, -1.6850976862319495E-9d }, // 31 + {+0.030771657824516296d, +8.422373919843096E-10d }, // 32 + {+0.0317181795835495d, +6.872350402175489E-10d }, // 33 + {+0.03266380727291107d, -4.541194749189272E-10d }, // 34 + {+0.03360854089260101d, -8.9064764856495E-10d }, // 35 + {+0.034552380442619324d, +1.0640404096769032E-9d }, // 36 + {+0.0354953333735466d, -3.5901655945224663E-10d}, // 37 + {+0.03643739968538284d, -3.4829517943661266E-9d }, // 38 + {+0.037378571927547455d, +8.149473794244232E-10d }, // 39 + {+0.03831886500120163d, -6.990650304449166E-10d }, // 40 + {+0.03925827145576477d, +1.0883076226453258E-9d }, // 41 + {+0.040196798741817474d, +3.845192807999274E-10d }, // 42 + {+0.04113444685935974d, -1.1570594692045927E-9d }, // 43 + {+0.04207121580839157d, -1.8877045166697178E-9d }, // 44 + {+0.043007105588912964d, -1.6332083257987747E-10d}, // 45 + {+0.04394212365150452d, -1.7950057534514933E-9d }, // 46 + {+0.04487626254558563d, +2.302710041648838E-9d }, // 47 + {+0.045809537172317505d, -1.1410233017161343E-9d }, // 48 + {+0.04674194008111954d, -3.0498741599744685E-9d }, // 49 + {+0.04767347127199173d, -1.8026348269183678E-9d }, // 50 + {+0.04860413819551468d, -3.233204600453039E-9d }, // 51 + {+0.04953393340110779d, +1.7211688427961583E-9d }, // 52 + {+0.05046287178993225d, -2.329967807055457E-10d }, // 53 + {+0.05139094591140747d, -4.191810118556531E-11d }, // 54 + {+0.052318163216114044d, -3.5574324788328143E-9d }, // 55 + {+0.053244516253471375d, -1.7346590916458485E-9d }, // 56 + {+0.05417001247406006d, -4.343048751383674E-10d }, // 57 + {+0.055094651877880096d, +1.92909364037955E-9d }, // 58 + {+0.056018441915512085d, -5.139745677199588E-10d }, // 59 + {+0.05694137513637543d, +1.2637629975129189E-9d }, // 60 + {+0.05786345899105072d, +1.3840561112481119E-9d }, // 61 + {+0.058784693479537964d, +1.414889689612056E-9d }, // 62 + {+0.05970507860183716d, +2.9199191907666474E-9d }, // 63 + {+0.0606246218085289d, +7.90594243412116E-12d }, // 64 + {+0.06154331564903259d, +1.6844747839686189E-9d }, // 65 + {+0.06246116757392883d, +2.0498074572151747E-9d }, // 66 + {+0.06337818503379822d, -4.800180493433863E-9d }, // 67 + {+0.06429435312747955d, -2.4220822960064277E-9d }, // 68 + {+0.06520968675613403d, -4.179048566709334E-9d }, // 69 + {+0.06612417101860046d, +6.363872957010456E-9d }, // 70 + {+0.06703783571720123d, +9.339468680056365E-10d }, // 71 + {+0.06795066595077515d, -4.04226739708981E-9d }, // 72 + {+0.0688626617193222d, -7.043545052852817E-9d }, // 73 + {+0.06977382302284241d, -6.552819560439773E-9d }, // 74 + {+0.07068414986133575d, -1.0571674860370546E-9d }, // 75 + {+0.07159365713596344d, -3.948954622015801E-9d }, // 76 + {+0.07250232994556427d, +1.1776625988228244E-9d }, // 77 + {+0.07341018319129944d, +9.221072639606492E-10d }, // 78 + {+0.07431721687316895d, -3.219119568928366E-9d }, // 79 + {+0.0752234160900116d, +5.147575929018918E-9d }, // 80 + {+0.07612881064414978d, -2.291749683541979E-9d }, // 81 + {+0.07703337073326111d, +5.749565906124772E-9d }, // 82 + {+0.07793712615966797d, +9.495158151301779E-10d }, // 83 + {+0.07884006202220917d, -3.144331429489291E-10d }, // 84 + {+0.0797421783208847d, +3.430029236134205E-9d }, // 85 + {+0.08064348995685577d, -1.2499290483167703E-9d }, // 86 + {+0.08154398202896118d, +2.011215719133196E-9d }, // 87 + {+0.08244366943836212d, -2.2728753031387152E-10d}, // 88 + {+0.0833425521850586d, -6.508966857277253E-9d }, // 89 + {+0.0842406153678894d, -4.801131671405377E-10d }, // 90 + {+0.08513787388801575d, +4.406750291994231E-9d }, // 91 + {+0.08603434264659882d, -5.304795662536171E-9d }, // 92 + {+0.08692999184131622d, +1.6284313912612293E-9d }, // 93 + {+0.08782485127449036d, -3.158898981674071E-9d }, // 94 + {+0.08871890604496002d, -3.3324878834139977E-9d }, // 95 + {+0.08961215615272522d, +2.536961912893389E-9d }, // 96 + {+0.09050461649894714d, +9.737596728980696E-10d }, // 97 + {+0.0913962870836258d, -6.600437262505396E-9d }, // 98 + {+0.09228715300559998d, -3.866609889222889E-9d }, // 99 + {+0.09317722916603088d, -4.311847594020281E-9d }, // 100 + {+0.09406651556491852d, -6.525851105645959E-9d }, // 101 + {+0.09495499730110168d, +5.799080912675435E-9d }, // 102 + {+0.09584270417690277d, +4.2634204358490415E-9d }, // 103 + {+0.09672962129116058d, +5.167390528799477E-9d }, // 104 + {+0.09761576354503632d, -4.994827392841906E-9d }, // 105 + {+0.09850110113620758d, +4.970725577861395E-9d }, // 106 + {+0.09938566386699677d, +6.6496705953229645E-9d }, // 107 + {+0.10026945173740387d, +1.4262712796792241E-9d }, // 108 + {+0.1011524498462677d, +5.5822855204629114E-9d }, // 109 + {+0.10203467309474945d, +5.593494835247651E-9d }, // 110 + {+0.10291612148284912d, +2.8332008343480686E-9d }, // 111 + {+0.10379679501056671d, -1.3289231465997192E-9d }, // 112 + {+0.10467669367790222d, -5.526819276639527E-9d }, // 113 + {+0.10555580258369446d, +6.503128678219282E-9d }, // 114 + {+0.10643415153026581d, +6.317463237641817E-9d }, // 115 + {+0.10731174051761627d, -4.728528221305482E-9d }, // 116 + {+0.10818853974342346d, +4.519199083083901E-9d }, // 117 + {+0.10906457901000977d, +5.606492666349878E-9d }, // 118 + {+0.10993985831737518d, -1.220176214398581E-10d }, // 119 + {+0.11081436276435852d, +3.5759315936869937E-9d }, // 120 + {+0.11168810725212097d, +3.1367659571899855E-9d }, // 121 + {+0.11256109178066254d, -1.0543075713098835E-10d}, // 122 + {+0.11343331634998322d, -4.820065619207094E-9d }, // 123 + {+0.11430476605892181d, +5.221136819669415E-9d }, // 124 + {+0.11517547070980072d, +1.5395018670011342E-9d }, // 125 + {+0.11604541540145874d, +3.5638391501880846E-10d}, // 126 + {+0.11691460013389587d, +2.9885336757136527E-9d }, // 127 + {+0.11778303980827332d, -4.151889860890893E-9d }, // 128 + {+0.11865071952342987d, -4.853823938804204E-9d }, // 129 + {+0.11951763927936554d, +2.189226237170704E-9d }, // 130 + {+0.12038381397724152d, +3.3791993048776982E-9d }, // 131 + {+0.1212492436170578d, +1.5811884868243975E-11d}, // 132 + {+0.12211392819881439d, -6.6045909118908625E-9d }, // 133 + {+0.1229778528213501d, -2.8786263916116364E-10d}, // 134 + {+0.12384103238582611d, +5.354472503748251E-9d }, // 135 + {+0.12470348179340363d, -3.2924463896248744E-9d }, // 136 + {+0.12556517124176025d, +4.856678149580005E-9d }, // 137 + {+0.12642613053321838d, +1.2791850600366742E-9d }, // 138 + {+0.12728634476661682d, +2.1525945093362843E-9d }, // 139 + {+0.12814581394195557d, +8.749974471767862E-9d }, // 140 + {+0.129004567861557d, -7.461209161105275E-9d }, // 141 + {+0.12986254692077637d, +1.4390208226263824E-8d }, // 142 + {+0.1307198405265808d, -1.3839477920475328E-8d }, // 143 + {+0.13157635927200317d, -1.483283901239408E-9d }, // 144 + {+0.13243216276168823d, -6.889072914229094E-9d }, // 145 + {+0.1332872211933136d, +9.990351100568362E-10d }, // 146 + {+0.13414156436920166d, -6.370937412495338E-9d }, // 147 + {+0.13499516248703003d, +2.05047480130511E-9d }, // 148 + {+0.1358480453491211d, -2.29509872547079E-9d }, // 149 + {+0.13670018315315247d, +1.16354361977249E-8d }, // 150 + {+0.13755163550376892d, -1.452496267904829E-8d }, // 151 + {+0.1384023129940033d, +9.865115839786888E-9d }, // 152 + {+0.13925230503082275d, -3.369999130712228E-9d }, // 153 + {+0.14010155200958252d, +6.602496401651853E-9d }, // 154 + {+0.14095008373260498d, +1.1205312852298845E-8d }, // 155 + {+0.14179790019989014d, +1.1660367213160203E-8d }, // 156 + {+0.142645001411438d, +9.186471222585239E-9d }, // 157 + {+0.14349138736724854d, +4.999341878263704E-9d }, // 158 + {+0.14433705806732178d, +3.11611905696257E-10d }, // 159 + {+0.14518201351165771d, -3.6671598175618173E-9d }, // 160 + {+0.14602625370025635d, -5.730477881659618E-9d }, // 161 + {+0.14686977863311768d, -4.674900007989718E-9d }, // 162 + {+0.1477125883102417d, +6.999732437141968E-10d }, // 163 + {+0.14855468273162842d, +1.159150872494107E-8d }, // 164 + {+0.14939609169960022d, -6.082714828488485E-10d }, // 165 + {+0.15023678541183472d, -4.905712741596318E-9d }, // 166 + {+0.1510767638683319d, -1.124848988733307E-10d }, // 167 + {+0.15191605687141418d, -1.484557220949851E-8d }, // 168 + {+0.15275460481643677d, +1.1682026251371384E-8d }, // 169 + {+0.15359249711036682d, -8.757272519238786E-9d }, // 170 + {+0.15442964434623718d, +1.4419920764774415E-8d }, // 171 + {+0.15526613593101501d, -7.019891063126053E-9d }, // 172 + {+0.15610191226005554d, -1.230153548825964E-8d }, // 173 + {+0.15693697333335876d, -2.574172005933276E-10d }, // 174 + {+0.15777134895324707d, +4.748140799544371E-10d }, // 175 + {+0.15860503911972046d, -8.943081874891003E-9d }, // 176 + {+0.15943801403045654d, +2.4500739038517657E-9d }, // 177 + {+0.1602703034877777d, +6.007922084557054E-9d }, // 178 + {+0.16110190749168396d, +2.8835418231126645E-9d }, // 179 + {+0.1619328260421753d, -5.772862039728412E-9d }, // 180 + {+0.16276302933692932d, +1.0988372954605789E-8d }, // 181 + {+0.16359257698059082d, -5.292913162607026E-9d }, // 182 + {+0.16442140936851501d, +6.12956339275823E-9d }, // 183 + {+0.16524958610534668d, -1.3210039516811888E-8d }, // 184 + {+0.16607704758644104d, -2.5711014608334873E-9d }, // 185 + {+0.16690382361412048d, +9.37721319457112E-9d }, // 186 + {+0.1677299439907074d, -6.0370682395944045E-9d }, // 187 + {+0.168555349111557d, +1.1918249660105651E-8d }, // 188 + {+0.1693800985813141d, +4.763282949656017E-9d }, // 189 + {+0.17020416259765625d, +3.4223342273948817E-9d }, // 190 + {+0.1710275411605835d, +9.014612241310916E-9d }, // 191 + {+0.1718502640724182d, -7.145758990550526E-9d }, // 192 + {+0.172672301530838d, -1.4142763934081504E-8d }, // 193 + {+0.1734936535358429d, -1.0865453656579032E-8d }, // 194 + {+0.17431432008743286d, +3.794385569450774E-9d }, // 195 + {+0.1751343309879303d, +1.1399188501627291E-9d }, // 196 + {+0.17595365643501282d, +1.2076238768270153E-8d }, // 197 + {+0.1767723262310028d, +7.901084730502162E-9d }, // 198 + {+0.17759034037590027d, -1.0288181007465474E-8d }, // 199 + {+0.1784076690673828d, -1.15945645153806E-8d }, // 200 + {+0.17922431230545044d, +5.073923825786778E-9d }, // 201 + {+0.18004029989242554d, +1.1004278077575267E-8d }, // 202 + {+0.1808556318283081d, +7.2831502374676964E-9d }, // 203 + {+0.18167030811309814d, -5.0054634662706464E-9d }, // 204 + {+0.18248429894447327d, +5.022108460298934E-9d }, // 205 + {+0.18329763412475586d, +8.642254225732676E-9d }, // 206 + {+0.18411031365394592d, +6.931054493326395E-9d }, // 207 + {+0.18492233753204346d, +9.619685356326533E-10d }, // 208 + {+0.18573370575904846d, -8.194157257980706E-9d }, // 209 + {+0.18654438853263855d, +1.0333241479437797E-8d }, // 210 + {+0.1873544454574585d, -1.9948340196027965E-9d }, // 211 + {+0.1881638467311859d, -1.4313002926259948E-8d }, // 212 + {+0.1889725625514984d, +4.241536392174967E-9d }, // 213 + {+0.18978065252304077d, -4.877952454011428E-9d }, // 214 + {+0.1905880868434906d, -1.0813801247641613E-8d }, // 215 + {+0.1913948655128479d, -1.2513218445781325E-8d }, // 216 + {+0.19220098853111267d, -8.925958555729115E-9d }, // 217 + {+0.1930064558982849d, +9.956860681280245E-10d }, // 218 + {+0.193811297416687d, -1.1505428993246996E-8d }, // 219 + {+0.1946154534816742d, +1.4217997464522202E-8d }, // 220 + {+0.19541901350021362d, -1.0200858727747717E-8d }, // 221 + {+0.19622188806533813d, +5.682607223902455E-9d }, // 222 + {+0.1970241367816925d, +3.2988908516009827E-9d }, // 223 + {+0.19782572984695435d, +1.3482965534659446E-8d }, // 224 + {+0.19862669706344604d, +7.462678536479685E-9d }, // 225 + {+0.1994270384311676d, -1.3734273888891115E-8d }, // 226 + {+0.20022669434547424d, +1.0521983802642893E-8d }, // 227 + {+0.20102575421333313d, -8.152742388541905E-9d }, // 228 + {+0.2018241584300995d, -9.133484280193855E-9d }, // 229 + {+0.20262190699577332d, +8.59763959528144E-9d }, // 230 + {+0.2034190595149994d, -1.3548568223001414E-8d }, // 231 + {+0.20421552658081055d, +1.4847880344628818E-8d }, // 232 + {+0.20501139760017395d, +5.390620378060543E-9d }, // 233 + {+0.2058066427707672d, -1.1109834472051523E-8d }, // 234 + {+0.20660123229026794d, -3.845373872038116E-9d }, // 235 + {+0.20739519596099854d, -1.6149279479975042E-9d }, // 236 + {+0.20818853378295898d, -3.4174925203771133E-9d }, // 237 + {+0.2089812457561493d, -8.254443919468538E-9d }, // 238 + {+0.20977330207824707d, +1.4672790944499144E-8d }, // 239 + {+0.2105647623538971d, +6.753452542942992E-9d }, // 240 + {+0.21135559678077698d, -1.218609462241927E-9d }, // 241 + {+0.21214580535888672d, -8.254218316367887E-9d }, // 242 + {+0.21293538808822632d, -1.3366540360587255E-8d }, // 243 + {+0.2137243151664734d, +1.4231244750190031E-8d }, // 244 + {+0.2145126760005951d, -1.3885660525939072E-8d }, // 245 + {+0.21530038118362427d, -7.3304404046850136E-9d }, // 246 + {+0.2160874605178833d, +5.072117654842356E-9d }, // 247 + {+0.21687394380569458d, -5.505080220459036E-9d }, // 248 + {+0.21765980124473572d, -8.286782292266659E-9d }, // 249 + {+0.2184450328350067d, -2.302351152358085E-9d }, // 250 + {+0.21922963857650757d, +1.3416565858314603E-8d }, // 251 + {+0.22001364827156067d, +1.0033721426962048E-8d }, // 252 + {+0.22079706192016602d, -1.1487079818684332E-8d }, // 253 + {+0.22157981991767883d, +9.420348186357043E-9d }, // 254 + {+0.2223619818687439d, +1.4110645699377834E-8d }, // 255 + {+0.2231435477733612d, +3.5408485497116107E-9d }, // 256 + {+0.22392448782920837d, +8.468072777056227E-9d }, // 257 + {+0.2247048318386078d, +4.255446699237779E-11d }, // 258 + {+0.22548454999923706d, +9.016946273084244E-9d }, // 259 + {+0.22626367211341858d, +6.537034810260226E-9d }, // 260 + {+0.22704219818115234d, -6.451285264969768E-9d }, // 261 + {+0.22782009840011597d, +7.979956357126066E-10d }, // 262 + {+0.22859740257263184d, -5.759582672039005E-10d }, // 263 + {+0.22937411069869995d, -9.633854121180397E-9d }, // 264 + {+0.23015019297599792d, +4.363736368635843E-9d }, // 265 + {+0.23092567920684814d, +1.2549416560182509E-8d }, // 266 + {+0.231700599193573d, -1.3946383592553814E-8d }, // 267 + {+0.2324748933315277d, -1.458843364504023E-8d }, // 268 + {+0.23324856162071228d, +1.1551692104697154E-8d }, // 269 + {+0.23402166366577148d, +5.795621295524984E-9d }, // 270 + {+0.23479416966438293d, -1.1301979046684263E-9d }, // 271 + {+0.23556607961654663d, -8.303779721781787E-9d }, // 272 + {+0.23633739352226257d, -1.4805271785394075E-8d }, // 273 + {+0.23710808157920837d, +1.0085373835899469E-8d }, // 274 + {+0.2378782033920288d, +7.679117635349454E-9d }, // 275 + {+0.2386477291584015d, +8.69177352065934E-9d }, // 276 + {+0.23941665887832642d, +1.4034725764547136E-8d }, // 277 + {+0.24018502235412598d, -5.185064518887831E-9d }, // 278 + {+0.2409527599811554d, +1.1544236628121676E-8d }, // 279 + {+0.24171993136405945d, +5.523085719902123E-9d }, // 280 + {+0.24248650670051575d, +7.456824943331887E-9d }, // 281 + {+0.24325251579284668d, -1.1555923403029638E-8d }, // 282 + {+0.24401789903640747d, +8.988361382732908E-9d }, // 283 + {+0.2447827160358429d, +1.0381848020926893E-8d }, // 284 + {+0.24554696679115295d, -6.480706118857055E-9d }, // 285 + {+0.24631062150001526d, -1.0904271124793968E-8d }, // 286 + {+0.2470736801624298d, -1.998183061531611E-9d }, // 287 + {+0.247836172580719d, -8.676137737360023E-9d }, // 288 + {+0.24859806895256042d, -2.4921733203932487E-10d}, // 289 + {+0.2493593990802765d, -5.635173762130303E-9d }, // 290 + {+0.2501201629638672d, -2.3951455355985637E-8d }, // 291 + {+0.25088030099868774d, +5.287121672447825E-9d }, // 292 + {+0.2516399025917053d, -6.447877375049486E-9d }, // 293 + {+0.25239890813827515d, +1.32472428796441E-9d }, // 294 + {+0.2531573176383972d, +2.9479464287605006E-8d }, // 295 + {+0.2539151906967163d, +1.9284247135543574E-8d }, // 296 + {+0.2546725273132324d, -2.8390360197221716E-8d }, // 297 + {+0.255429208278656d, +6.533522495226226E-9d }, // 298 + {+0.2561853528022766d, +5.713225978895991E-9d }, // 299 + {+0.25694090127944946d, +2.9618050962556135E-8d }, // 300 + {+0.25769591331481934d, +1.950605015323617E-8d }, // 301 + {+0.25845038890838623d, -2.3762031507525576E-8d }, // 302 + {+0.2592042088508606d, +1.98818938195077E-8d }, // 303 + {+0.25995755195617676d, -2.751925069084042E-8d }, // 304 + {+0.2607102394104004d, +1.3703391844683932E-8d }, // 305 + {+0.26146239042282104d, +2.5193525310038174E-8d }, // 306 + {+0.2622140049934387d, +7.802219817310385E-9d }, // 307 + {+0.26296502351760864d, +2.1983272709242607E-8d }, // 308 + {+0.2637155055999756d, +8.979279989292184E-9d }, // 309 + {+0.2644653916358948d, +2.9240221157844312E-8d }, // 310 + {+0.265214741230011d, +2.4004885823813374E-8d }, // 311 + {+0.2659635543823242d, -5.885186277410878E-9d }, // 312 + {+0.2667117714881897d, +1.4300386517357162E-11d}, // 313 + {+0.2674594521522522d, -1.7063531531989365E-8d }, // 314 + {+0.26820653676986694d, +3.3218524692903896E-9d }, // 315 + {+0.2689530849456787d, +2.3998252479954764E-9d }, // 316 + {+0.2696990966796875d, -1.8997462070389404E-8d }, // 317 + {+0.27044451236724854d, -4.350745270980051E-10d }, // 318 + {+0.2711893916130066d, -6.892221115467135E-10d }, // 319 + {+0.27193373441696167d, -1.89333199110902E-8d }, // 320 + {+0.272677481174469d, +5.262017392507765E-9d }, // 321 + {+0.27342069149017334d, +1.3115046679980076E-8d }, // 322 + {+0.2741633653640747d, +5.4468361834451975E-9d }, // 323 + {+0.2749055027961731d, -1.692337384653611E-8d }, // 324 + {+0.27564704418182373d, +6.426479056697412E-9d }, // 325 + {+0.2763880491256714d, +1.670735065191342E-8d }, // 326 + {+0.27712851762771606d, +1.4733029698334834E-8d }, // 327 + {+0.27786844968795776d, +1.315498542514467E-9d }, // 328 + {+0.2786078453063965d, -2.2735061539223372E-8d }, // 329 + {+0.27934664487838745d, +2.994379757313727E-9d }, // 330 + {+0.28008490800857544d, +1.970577274107218E-8d }, // 331 + {+0.28082263469696045d, +2.820392733542077E-8d }, // 332 + {+0.2815598249435425d, +2.929187356678173E-8d }, // 333 + {+0.28229647874832153d, +2.377086680926386E-8d }, // 334 + {+0.2830325961112976d, +1.2440393009992529E-8d }, // 335 + {+0.2837681770324707d, -3.901826104778096E-9d }, // 336 + {+0.2845032215118408d, -2.4459827842685974E-8d }, // 337 + {+0.2852376699447632d, +1.1165241398059789E-8d }, // 338 + {+0.28597164154052734d, -1.54434478239181E-8d }, // 339 + {+0.28670501708984375d, +1.5714110564653245E-8d }, // 340 + {+0.28743791580200195d, -1.3782394940142479E-8d }, // 341 + {+0.2881702184677124d, +1.6063569876284005E-8d }, // 342 + {+0.28890204429626465d, -1.317176818216125E-8d }, // 343 + {+0.28963327407836914d, +1.8504673536253893E-8d }, // 344 + {+0.29036402702331543d, -7.334319635123628E-9d }, // 345 + {+0.29109418392181396d, +2.9300903540317107E-8d }, // 346 + {+0.2918238639831543d, +9.979706999541057E-9d }, // 347 + {+0.29255300760269165d, -4.916314210412424E-9d }, // 348 + {+0.293281614780426d, -1.4611908070155308E-8d }, // 349 + {+0.2940096855163574d, -1.833351586679361E-8d }, // 350 + {+0.29473721981048584d, -1.530926726615185E-8d }, // 351 + {+0.2954642176628113d, -4.7689754029101934E-9d }, // 352 + {+0.29619067907333374d, +1.4055868011423819E-8d }, // 353 + {+0.296916663646698d, -1.7672547212604003E-8d }, // 354 + {+0.2976420521736145d, +2.0020234215759705E-8d }, // 355 + {+0.2983669638633728d, +8.688424478730524E-9d }, // 356 + {+0.2990913391113281d, +8.69851089918337E-9d }, // 357 + {+0.29981517791748047d, +2.0810681643102672E-8d }, // 358 + {+0.3005385398864746d, -1.3821169493779352E-8d }, // 359 + {+0.301261305809021d, +2.4769140784919128E-8d }, // 360 + {+0.3019835948944092d, +1.8127576600610336E-8d }, // 361 + {+0.3027053475379944d, +2.6612401062437074E-8d }, // 362 + {+0.3034266233444214d, -8.629042891789934E-9d }, // 363 + {+0.3041473627090454d, -2.724174869314043E-8d }, // 364 + {+0.30486756563186646d, -2.8476975783775358E-8d }, // 365 + {+0.3055872321128845d, -1.1587600174449919E-8d }, // 366 + {+0.3063063621520996d, +2.417189020581056E-8d }, // 367 + {+0.3070250153541565d, +1.99407553679345E-8d }, // 368 + {+0.3077431917190552d, -2.35387025694381E-8d }, // 369 + {+0.3084607720375061d, +1.3683509995845583E-8d }, // 370 + {+0.30917787551879883d, +1.3137214081023085E-8d }, // 371 + {+0.30989450216293335d, -2.444006866174775E-8d }, // 372 + {+0.3106105327606201d, +2.0896888605749563E-8d }, // 373 + {+0.31132614612579346d, -2.893149098508887E-8d }, // 374 + {+0.31204116344451904d, +5.621509038251498E-9d }, // 375 + {+0.3127557039260864d, +6.0778104626050015E-9d }, // 376 + {+0.3134697675704956d, -2.6832941696716294E-8d }, // 377 + {+0.31418323516845703d, +2.6826625274495256E-8d }, // 378 + {+0.31489628553390503d, -1.1030897183911054E-8d }, // 379 + {+0.31560879945755005d, -2.047124671392676E-8d }, // 380 + {+0.3163207769393921d, -7.709990443086711E-10d }, // 381 + {+0.3170322775840759d, -1.0812918808112342E-8d }, // 382 + {+0.3177432417869568d, +9.727979174888975E-9d }, // 383 + {+0.31845372915267944d, +1.9658551724508715E-9d }, // 384 + {+0.3191636800765991d, +2.6222628001695826E-8d }, // 385 + {+0.3198731541633606d, +2.3609400272358744E-8d }, // 386 + {+0.32058215141296387d, -5.159602957634814E-9d }, // 387 + {+0.32129061222076416d, +2.329701319016099E-10d }, // 388 + {+0.32199859619140625d, -1.910633190395738E-8d }, // 389 + {+0.32270604372024536d, -2.863180390093667E-9d }, // 390 + {+0.32341301441192627d, -9.934041364456825E-9d }, // 391 + {+0.3241194486618042d, +1.999240777687192E-8d }, // 392 + {+0.3248254060745239d, +2.801670341647724E-8d }, // 393 + {+0.32553088665008545d, +1.4842534265191358E-8d }, // 394 + {+0.32623589038848877d, -1.882789920477354E-8d }, // 395 + {+0.3269403576850891d, -1.268923579073577E-8d }, // 396 + {+0.32764434814453125d, -2.564688370677835E-8d }, // 397 + {+0.3283478021621704d, +2.6015626820520968E-9d }, // 398 + {+0.32905077934265137d, +1.3147747907784344E-8d }, // 399 + {+0.3297532796859741d, +6.686493860720675E-9d }, // 400 + {+0.33045530319213867d, -1.608884086544153E-8d }, // 401 + {+0.33115679025650024d, +5.118287907840204E-9d }, // 402 + {+0.3318578004837036d, +1.139367970944884E-8d }, // 403 + {+0.3325583338737488d, +3.426327822115399E-9d }, // 404 + {+0.33325839042663574d, -1.809622142990733E-8d }, // 405 + {+0.3339579105377197d, +7.116780143398601E-9d }, // 406 + {+0.3346569538116455d, +2.0145352306345386E-8d }, // 407 + {+0.3353555202484131d, +2.167272474431968E-8d }, // 408 + {+0.33605360984802246d, +1.2380696294966822E-8d }, // 409 + {+0.33675122261047363d, -7.050361059209181E-9d }, // 410 + {+0.3374482989311218d, +2.366314656322868E-8d }, // 411 + {+0.3381449580192566d, -1.4010540194086646E-8d }, // 412 + {+0.3388410806655884d, -1.860165465666482E-10d }, // 413 + {+0.33953672647476196d, +6.206776940880773E-9d }, // 414 + {+0.34023189544677734d, +5.841137379010982E-9d }, // 415 + {+0.3409265875816345d, -6.11041311179286E-10d }, // 416 + {+0.3416208028793335d, -1.2479264502054702E-8d }, // 417 + {+0.34231454133987427d, -2.909443297645926E-8d }, // 418 + {+0.34300774335861206d, +9.815805717097634E-9d }, // 419 + {+0.3437005281448364d, -1.4291517981101049E-8d }, // 420 + {+0.3443927764892578d, +1.8457821628427503E-8d }, // 421 + {+0.34508460760116577d, -1.0481908869377813E-8d }, // 422 + {+0.34577590227127075d, +1.876076001514746E-8d }, // 423 + {+0.3464667797088623d, -1.2362653723769037E-8d }, // 424 + {+0.3471571207046509d, +1.6016578405624026E-8d }, // 425 + {+0.347847044467926d, -1.4652759033760925E-8d }, // 426 + {+0.3485364317893982d, +1.549533655901835E-8d }, // 427 + {+0.34922540187835693d, -1.2093068629412478E-8d }, // 428 + {+0.3499138355255127d, +2.244531711424792E-8d }, // 429 + {+0.35060185194015503d, +5.538565518604807E-10d }, // 430 + {+0.35128939151763916d, -1.7511499366215853E-8d }, // 431 + {+0.3519763946533203d, +2.850385787215544E-8d }, // 432 + {+0.35266298055648804d, +2.003926370146842E-8d }, // 433 + {+0.35334908962249756d, +1.734665280502264E-8d }, // 434 + {+0.3540347218513489d, +2.1071983674869414E-8d }, // 435 + {+0.35471993684768677d, -2.774475773922311E-8d }, // 436 + {+0.3554046154022217d, -9.250975291734664E-9d }, // 437 + {+0.3560888171195984d, +1.7590672330295415E-8d }, // 438 + {+0.35677260160446167d, -6.1837904549178745E-9d }, // 439 + {+0.35745590925216675d, -2.0330362973820856E-8d }, // 440 + {+0.3581387400627136d, -2.42109990366786E-8d }, // 441 + {+0.3588210940361023d, -1.7188958587407816E-8d }, // 442 + {+0.35950297117233276d, +1.3711958590112228E-9d }, // 443 + {+0.3601844310760498d, -2.7501042008405925E-8d }, // 444 + {+0.36086535453796387d, +1.6036460343275798E-8d }, // 445 + {+0.3615458607673645d, +1.3405964389498495E-8d }, // 446 + {+0.36222589015960693d, +2.484237749027735E-8d }, // 447 + {+0.36290550231933594d, -8.629967484362177E-9d }, // 448 + {+0.36358463764190674d, -2.6778729562324134E-8d }, // 449 + {+0.36426329612731934d, -2.8977490516960565E-8d }, // 450 + {+0.36494147777557373d, -1.4601106624823502E-8d }, // 451 + {+0.3656191825866699d, +1.69742947894444E-8d }, // 452 + {+0.3662964701652527d, +6.7666740211281175E-9d }, // 453 + {+0.36697328090667725d, +1.500201674336832E-8d }, // 454 + {+0.3676496744155884d, -1.730424167425052E-8d }, // 455 + {+0.36832553148269653d, +2.9676011119845104E-8d }, // 456 + {+0.36900103092193604d, -2.2253590346826743E-8d }, // 457 + {+0.36967599391937256d, +6.3372065441089185E-9d }, // 458 + {+0.37035053968429565d, -3.145816653215968E-9d }, // 459 + {+0.37102460861206055d, +9.515812117036965E-9d }, // 460 + {+0.371698260307312d, -1.4669965113042639E-8d }, // 461 + {+0.3723714351654053d, -1.548715389333397E-8d }, // 462 + {+0.37304413318634033d, +7.674361647125109E-9d }, // 463 + {+0.37371641397476196d, -4.181177882069608E-9d }, // 464 + {+0.3743882179260254d, +9.158530500130718E-9d }, // 465 + {+0.3750596046447754d, -1.13047236597869E-8d }, // 466 + {+0.3757305145263672d, -5.36108186384227E-9d }, // 467 + {+0.3764009475708008d, +2.7593452284747873E-8d }, // 468 + {+0.37707096338272095d, +2.8557016344085205E-8d }, // 469 + {+0.3777405619621277d, -1.868818164036E-9d }, // 470 + {+0.3784096837043762d, -3.479042513414447E-9d }, // 471 + {+0.37907832860946655d, +2.432550290565648E-8d }, // 472 + {+0.37974655628204346d, +2.2538131805476768E-8d }, // 473 + {+0.38041436672210693d, -8.244395239939089E-9d }, // 474 + {+0.3810817003250122d, -7.821867597227376E-9d }, // 475 + {+0.3817485570907593d, +2.4400089062515914E-8d }, // 476 + {+0.3824149966239929d, +2.9410015940087773E-8d }, // 477 + {+0.38308101892471313d, +7.799913824734797E-9d }, // 478 + {+0.38374656438827515d, +1.976524624939355E-8d }, // 479 + {+0.38441169261932373d, +6.291008309266035E-9d }, // 480 + {+0.3850763440132141d, +2.757030889767851E-8d }, // 481 + {+0.38574057817459106d, +2.4585794728405612E-8d }, // 482 + {+0.3864043951034546d, -2.0764122246389383E-9d }, // 483 + {+0.3870677351951599d, +7.77328837578952E-9d }, // 484 + {+0.3877306580543518d, -4.8859560029989374E-9d }, // 485 + {+0.3883931040763855d, +2.0133131420595028E-8d }, // 486 + {+0.38905513286590576d, +2.380738071335498E-8d }, // 487 + {+0.3897167444229126d, +6.7171126157142075E-9d }, // 488 + {+0.39037787914276123d, +2.9046141593926277E-8d }, // 489 + {+0.3910386562347412d, -2.7836800219410262E-8d }, // 490 + {+0.3916988968849182d, +1.545909820981726E-8d }, // 491 + {+0.39235877990722656d, -1.930436269002062E-8d }, // 492 + {+0.3930181860923767d, -1.2343297554921835E-8d }, // 493 + {+0.3936771750450134d, -2.268889128622553E-8d }, // 494 + {+0.39433568716049194d, +9.835827818608177E-9d }, // 495 + {+0.39499378204345703d, +2.6197411946856397E-8d }, // 496 + {+0.3956514596939087d, +2.6965931069318893E-8d }, // 497 + {+0.3963087201118469d, +1.2710331127772166E-8d }, // 498 + {+0.39696556329727173d, -1.6001563011916016E-8d }, // 499 + {+0.39762192964553833d, +1.0016001590267064E-9d }, // 500 + {+0.3982778787612915d, +4.680767399874334E-9d }, // 501 + {+0.39893341064453125d, -4.399582029272418E-9d }, // 502 + {+0.39958852529525757d, -2.5676078228301587E-8d }, // 503 + {+0.4002431631088257d, +1.0181870233355787E-9d }, // 504 + {+0.40089738368988037d, +1.6639728835984655E-8d }, // 505 + {+0.40155118703842163d, +2.174860642202632E-8d }, // 506 + {+0.40220457315444946d, +1.6903781197123503E-8d }, // 507 + {+0.40285754203796387d, +2.663119647467697E-9d }, // 508 + {+0.40351009368896484d, -2.0416603812329616E-8d }, // 509 + {+0.4041621685028076d, +7.82494078472695E-9d }, // 510 + {+0.40481382608413696d, +2.833770747113627E-8d }, // 511 + {+0.40546512603759766d, -1.7929433274271985E-8d }, // 512 + {+0.40611594915390015d, -1.1214757379328965E-8d }, // 513 + {+0.4067663550376892d, -1.0571553019207106E-8d }, // 514 + {+0.40741634368896484d, -1.5449538712332313E-8d }, // 515 + {+0.40806591510772705d, -2.529950530235105E-8d }, // 516 + {+0.40871500968933105d, +2.0031331601617008E-8d }, // 517 + {+0.4093637466430664d, +1.880755298741952E-9d }, // 518 + {+0.41001206636428833d, -1.9600580584843318E-8d }, // 519 + {+0.41065990924835205d, +1.573691633515306E-8d }, // 520 + {+0.4113073945045471d, -1.0772154376548336E-8d }, // 521 + {+0.411954402923584d, +2.0624330192486066E-8d }, // 522 + {+0.4126010537147522d, -8.741139170029572E-9d }, // 523 + {+0.4132472276687622d, +2.0881457123894216E-8d }, // 524 + {+0.41389304399490356d, -9.177488027521808E-9d }, // 525 + {+0.4145383834838867d, +2.0829952491625585E-8d }, // 526 + {+0.4151833653450012d, -7.767915492597301E-9d }, // 527 + {+0.4158278703689575d, +2.4774753446082082E-8d }, // 528 + {+0.41647201776504517d, -2.1581119071750435E-10d}, // 529 + {+0.4171157479286194d, -2.260047972865202E-8d }, // 530 + {+0.4177590012550354d, +1.775884601423381E-8d }, // 531 + {+0.41840189695358276d, +2.185301053838889E-9d }, // 532 + {+0.4190443754196167d, -9.185071463667081E-9d }, // 533 + {+0.4196864366531372d, -1.5821896727910552E-8d }, // 534 + {+0.4203280806541443d, -1.719582086188318E-8d }, // 535 + {+0.42096930742263794d, -1.2778508303324259E-8d }, // 536 + {+0.42161011695861816d, -2.042639194493364E-9d }, // 537 + {+0.42225050926208496d, +1.5538093219698803E-8d }, // 538 + {+0.4228905439376831d, -1.9115659590156936E-8d }, // 539 + {+0.42353010177612305d, +1.3729680248843432E-8d }, // 540 + {+0.42416930198669434d, -4.611893838830296E-9d }, // 541 + {+0.4248080849647522d, -1.4013456880651706E-8d }, // 542 + {+0.42544645071029663d, -1.3953728897042917E-8d }, // 543 + {+0.42608439922332764d, -3.912427573594197E-9d }, // 544 + {+0.4267219305038452d, +1.6629734283189315E-8d }, // 545 + {+0.42735910415649414d, -1.1413593493354881E-8d }, // 546 + {+0.42799586057662964d, -2.792046157580119E-8d }, // 547 + {+0.42863214015960693d, +2.723009182661306E-8d }, // 548 + {+0.42926812171936035d, -2.4260535621557444E-8d }, // 549 + {+0.42990362644195557d, -3.064060124024764E-9d }, // 550 + {+0.43053877353668213d, -2.787640178598121E-8d }, // 551 + {+0.4311734437942505d, +2.102412085257792E-8d }, // 552 + {+0.4318077564239502d, +2.4939635093999683E-8d }, // 553 + {+0.43244171142578125d, -1.5619414792273914E-8d }, // 554 + {+0.4330751895904541d, +1.9065734894871523E-8d }, // 555 + {+0.4337083101272583d, +1.0294301092654604E-8d }, // 556 + {+0.4343410134315491d, +1.8178469851136E-8d }, // 557 + {+0.4349733591079712d, -1.6379825102473853E-8d }, // 558 + {+0.4356052279472351d, +2.6334323946685834E-8d }, // 559 + {+0.43623673915863037d, +2.761628769925529E-8d }, // 560 + {+0.436867892742157d, -1.2030229087793677E-8d }, // 561 + {+0.4374985694885254d, +2.7106814809424793E-8d }, // 562 + {+0.43812888860702515d, +2.631993083235205E-8d }, // 563 + {+0.43875885009765625d, -1.3890028312254422E-8d }, // 564 + {+0.43938833475112915d, +2.6186133735555794E-8d }, // 565 + {+0.4400174617767334d, +2.783809071694788E-8d }, // 566 + {+0.440646231174469d, -8.436135220472006E-9d }, // 567 + {+0.44127458333969116d, -2.2534815932619883E-8d }, // 568 + {+0.4419025182723999d, -1.3961804471714283E-8d }, // 569 + {+0.4425300359725952d, +1.7778112039716255E-8d }, // 570 + {+0.4431571960449219d, +1.3574569976673652E-8d }, // 571 + {+0.4437839984893799d, -2.607907890164073E-8d }, // 572 + {+0.4444103240966797d, +1.8518879652136628E-8d }, // 573 + {+0.44503629207611084d, +2.865065604247164E-8d }, // 574 + {+0.44566190242767334d, +4.806827797299427E-9d }, // 575 + {+0.4462870955467224d, +7.0816970994232115E-9d }, // 576 + {+0.44691193103790283d, -2.3640641240074437E-8d }, // 577 + {+0.4475363492965698d, -2.7267718387865538E-8d }, // 578 + {+0.4481603503227234d, -3.3126235292976077E-9d }, // 579 + {+0.4487839937210083d, -1.0894001590268427E-8d }, // 580 + {+0.4494072198867798d, +1.0077883359971829E-8d }, // 581 + {+0.4500300884246826d, +4.825712712114668E-10d }, // 582 + {+0.450652539730072d, +2.0407987470746858E-8d }, // 583 + {+0.4512746334075928d, +1.073186581170719E-8d }, // 584 + {+0.4518963694572449d, -2.8064314757880205E-8d }, // 585 + {+0.45251762866973877d, +2.3709316816226527E-8d }, // 586 + {+0.4531385898590088d, -1.2281487504266522E-8d }, // 587 + {+0.4537591338157654d, -1.634864487421458E-8d }, // 588 + {+0.45437926054000854d, +1.1985747222409522E-8d }, // 589 + {+0.45499902963638306d, +1.3594057956219485E-8d }, // 590 + {+0.4556184411048889d, -1.1047585095328619E-8d }, // 591 + {+0.45623743534088135d, -1.8592937532754405E-9d }, // 592 + {+0.4568560719490051d, -1.797135137545755E-8d }, // 593 + {+0.4574742913246155d, +6.943684261645378E-10d }, // 594 + {+0.4580921530723572d, -4.994175141684681E-9d }, // 595 + {+0.45870959758758545d, +2.5039391215625133E-8d }, // 596 + {+0.45932674407958984d, -2.7943366835352838E-8d }, // 597 + {+0.45994341373443604d, +1.534146910128904E-8d }, // 598 + {+0.46055978536605835d, -2.3450920230816267E-8d }, // 599 + {+0.46117573976516724d, -2.4642997069960124E-8d }, // 600 + {+0.4617912769317627d, +1.2232622070370946E-8d }, // 601 + {+0.4624064564704895d, +2.80378133047839E-8d }, // 602 + {+0.46302127838134766d, +2.3238237048117092E-8d }, // 603 + {+0.46363574266433716d, -1.7013046451109475E-9d }, // 604 + {+0.46424978971481323d, +1.3287778803035383E-8d }, // 605 + {+0.46486347913742065d, +9.06393426961373E-9d }, // 606 + {+0.4654768109321594d, -1.3910598647592876E-8d }, // 607 + {+0.46608972549438477d, +4.430214458933614E-9d }, // 608 + {+0.46670228242874146d, +4.942270562885745E-9d }, // 609 + {+0.4673144817352295d, -1.1914734393460718E-8d }, // 610 + {+0.4679262638092041d, +1.3922696570638494E-8d }, // 611 + {+0.46853768825531006d, +2.3307929211781914E-8d }, // 612 + {+0.46914875507354736d, +1.669813444584674E-8d }, // 613 + {+0.469759464263916d, -5.450354376430758E-9d }, // 614 + {+0.47036975622177124d, +1.6922605350647674E-8d }, // 615 + {+0.4709796905517578d, +2.4667033200046904E-8d }, // 616 + {+0.47158926725387573d, +1.8236762070433784E-8d }, // 617 + {+0.472198486328125d, -1.915204563140137E-9d }, // 618 + {+0.47280728816986084d, +2.426795414605756E-8d }, // 619 + {+0.4734157919883728d, -2.19717006713618E-8d }, // 620 + {+0.47402387857437134d, -2.0974352165535873E-8d }, // 621 + {+0.47463154792785645d, +2.770970558184228E-8d }, // 622 + {+0.4752389192581177d, +5.32006955298355E-9d }, // 623 + {+0.47584593296051025d, -2.809054633964104E-8d }, // 624 + {+0.4764525294303894d, -1.2470243596102937E-8d }, // 625 + {+0.4770587682723999d, -6.977226702440138E-9d }, // 626 + {+0.47766464948654175d, -1.1165866833118273E-8d }, // 627 + {+0.47827017307281494d, -2.4591344661022708E-8d }, // 628 + {+0.4788752794265747d, +1.2794996377383974E-8d }, // 629 + {+0.4794800877571106d, -1.7772927065973874E-8d }, // 630 + {+0.48008447885513306d, +3.35657712457243E-9d }, // 631 + {+0.48068851232528687d, +1.7020465042442242E-8d }, // 632 + {+0.481292188167572d, +2.365953779624783E-8d }, // 633 + {+0.4818955063819885d, +2.3713798664443718E-8d }, // 634 + {+0.4824984669685364d, +1.7622455019548098E-8d }, // 635 + {+0.4831010699272156d, +5.823920246566496E-9d }, // 636 + {+0.4837033152580261d, -1.1244184344361017E-8d }, // 637 + {+0.48430514335632324d, +2.645961716432205E-8d }, // 638 + {+0.4849066734313965d, +1.6207809718247905E-10d}, // 639 + {+0.4855077862739563d, +2.9507744508973654E-8d }, // 640 + {+0.48610860109329224d, -4.278201128741098E-9d }, // 641 + {+0.48670899868011475d, +1.844722015961139E-8d }, // 642 + {+0.4873090982437134d, -2.1092372471088425E-8d }, // 643 + {+0.4879087805747986d, -3.2555596107382053E-9d }, // 644 + {+0.48850810527801514d, +1.2784366845429667E-8d }, // 645 + {+0.48910707235336304d, +2.7457984659996047E-8d }, // 646 + {+0.48970574140548706d, -1.8409546441412518E-8d }, // 647 + {+0.49030399322509766d, -5.179903818099661E-9d }, // 648 + {+0.4909018874168396d, +7.97053127828682E-9d }, // 649 + {+0.4914994239807129d, +2.146925464473481E-8d }, // 650 + {+0.4920966625213623d, -2.3861648589988232E-8d }, // 651 + {+0.4926934838294983d, -8.386923035320549E-9d }, // 652 + {+0.4932899475097656d, +8.713990131749256E-9d }, // 653 + {+0.4938860535621643d, +2.7865534085810115E-8d }, // 654 + {+0.4944818615913391d, -1.011325138560159E-8d }, // 655 + {+0.4950772523880005d, +1.4409851026316708E-8d }, // 656 + {+0.495672345161438d, -1.735227547472004E-8d }, // 657 + {+0.49626702070236206d, +1.4231078209064581E-8d }, // 658 + {+0.49686139822006226d, -9.628709342929729E-9d }, // 659 + {+0.4974554181098938d, -2.8907074856577267E-8d }, // 660 + {+0.4980490207672119d, +1.6419797090870802E-8d }, // 661 + {+0.49864232540130615d, +7.561041519403049E-9d }, // 662 + {+0.49923527240753174d, +4.538983468118194E-9d }, // 663 + {+0.49982786178588867d, +7.770560657946324E-9d }, // 664 + {+0.500420093536377d, +1.767197002609876E-8d }, // 665 + {+0.5010119676589966d, +3.46586694799214E-8d }, // 666 + {+0.5016034841537476d, +5.914537964556077E-8d }, // 667 + {+0.5021947622299194d, -2.7663203939320167E-8d }, // 668 + {+0.5027855634689331d, +1.3064749115929298E-8d }, // 669 + {+0.5033761262893677d, -5.667682106730711E-8d }, // 670 + {+0.503966212272644d, +1.9424534974370594E-9d }, // 671 + {+0.5045560598373413d, -4.908494602153544E-8d }, // 672 + {+0.5051454305648804d, +2.906989285008994E-8d }, // 673 + {+0.5057345628738403d, -1.602000800745108E-9d }, // 674 + {+0.5063233375549316d, -2.148245271118002E-8d }, // 675 + {+0.5069117546081543d, -3.016329994276181E-8d }, // 676 + {+0.5074998140335083d, -2.7237099632871992E-8d }, // 677 + {+0.5080875158309937d, -1.2297127301923986E-8d }, // 678 + {+0.5086748600006104d, +1.5062624834468093E-8d }, // 679 + {+0.5092618465423584d, +5.524744954836658E-8d }, // 680 + {+0.5098485946655273d, -1.054736327333046E-8d }, // 681 + {+0.5104348659515381d, +5.650063324725722E-8d }, // 682 + {+0.5110208988189697d, +1.8376017791642605E-8d }, // 683 + {+0.5116065740585327d, -5.309470636324855E-9d }, // 684 + {+0.512191891670227d, -1.4154089255217218E-8d }, // 685 + {+0.5127768516540527d, -7.756800301729815E-9d }, // 686 + {+0.5133614540100098d, +1.4282730618002001E-8d }, // 687 + {+0.5139456987380981d, +5.2364136172269755E-8d }, // 688 + {+0.5145297050476074d, -1.2322940607922115E-8d }, // 689 + {+0.5151132345199585d, +5.903831350855322E-8d }, // 690 + {+0.5156965255737305d, +2.8426856726994483E-8d }, // 691 + {+0.5162794589996338d, +1.544882070711032E-8d }, // 692 + {+0.5168620347976685d, +2.0500353979930155E-8d }, // 693 + {+0.5174442529678345d, +4.397691311390564E-8d }, // 694 + {+0.5180262327194214d, -3.2936025225250634E-8d }, // 695 + {+0.5186077356338501d, +2.857419553449673E-8d }, // 696 + {+0.5191890001296997d, -9.51761338269325E-9d }, // 697 + {+0.5197699069976807d, -2.7609457648450225E-8d }, // 698 + {+0.520350456237793d, -2.5309316441333305E-8d }, // 699 + {+0.5209306478500366d, -2.2258513086839407E-9d }, // 700 + {+0.5215104818344116d, +4.203159541613745E-8d }, // 701 + {+0.5220900774002075d, -1.1356287358852729E-8d }, // 702 + {+0.5226693153381348d, -4.279090925831093E-8d }, // 703 + {+0.5232481956481934d, -5.188364552285819E-8d }, // 704 + {+0.5238267183303833d, -3.82465458937857E-8d }, // 705 + {+0.5244048833847046d, -1.4923330530645769E-9d }, // 706 + {+0.5249826908111572d, +5.8765598932137004E-8d }, // 707 + {+0.5255602598190308d, +2.3703896609663678E-8d }, // 708 + {+0.5261374711990356d, +1.2917117341231647E-8d }, // 709 + {+0.5267143249511719d, +2.6789862192139226E-8d }, // 710 + {+0.527290940284729d, -5.350322253112414E-8d }, // 711 + {+0.5278670787811279d, +1.0839714455426386E-8d }, // 712 + {+0.5284429788589478d, -1.821729591343314E-8d }, // 713 + {+0.5290185213088989d, -2.1083014672301448E-8d }, // 714 + {+0.5295937061309814d, +2.623848491704216E-9d }, // 715 + {+0.5301685333251953d, +5.328392630534142E-8d }, // 716 + {+0.5307431221008301d, +1.206790586971942E-8d }, // 717 + {+0.5313173532485962d, -1.4356011804377797E-9d }, // 718 + {+0.5318912267684937d, +1.3152074173459994E-8d }, // 719 + {+0.5324647426605225d, +5.6208949382936426E-8d }, // 720 + {+0.5330380201339722d, +8.90310227565917E-9d }, // 721 + {+0.5336109399795532d, -9.179458802504127E-9d }, // 722 + {+0.5341835021972656d, +2.337337845617735E-9d }, // 723 + {+0.5347557067871094d, +4.3828918300477925E-8d }, // 724 + {+0.535327672958374d, -3.5392250480081715E-9d }, // 725 + {+0.53589928150177d, -2.0183663375378704E-8d }, // 726 + {+0.5364705324172974d, -5.730898606435436E-9d }, // 727 + {+0.537041425704956d, +4.0191927599879235E-8d }, // 728 + {+0.5376120805740356d, -1.2522542401353875E-9d }, // 729 + {+0.5381823778152466d, -1.0482571326594316E-8d }, // 730 + {+0.5387523174285889d, +1.2871924223480165E-8d }, // 731 + {+0.539322018623352d, -5.002774317612589E-8d }, // 732 + {+0.539891242980957d, +3.960668706590162E-8d }, // 733 + {+0.5404602289199829d, +4.372568630242375E-8d }, // 734 + {+0.5410289764404297d, -3.730232461206926E-8d }, // 735 + {+0.5415972471237183d, +3.5309026109857795E-8d }, // 736 + {+0.5421652793884277d, +2.3508325311148225E-8d }, // 737 + {+0.5427329540252686d, +4.6871403168921666E-8d }, // 738 + {+0.5433003902435303d, -1.3445113140270216E-8d }, // 739 + {+0.5438674688339233d, -3.786663982218041E-8d }, // 740 + {+0.5444341897964478d, -2.602850370608209E-8d }, // 741 + {+0.5450005531311035d, +2.2433348713144506E-8d }, // 742 + {+0.5455666780471802d, -1.1326936872620137E-8d }, // 743 + {+0.5461324453353882d, -7.737252533211342E-9d }, // 744 + {+0.5466978549957275d, +3.3564604642699844E-8d }, // 745 + {+0.5472630262374878d, -6.269066061111782E-9d }, // 746 + {+0.5478278398513794d, -7.667998948729528E-9d }, // 747 + {+0.5483922958374023d, +2.9728170818998143E-8d }, // 748 + {+0.5489565134048462d, -1.2930091396008281E-8d }, // 749 + {+0.5495203733444214d, -1.607434968107079E-8d }, // 750 + {+0.5500838756561279d, +2.0653935146671156E-8d }, // 751 + {+0.5506471395492554d, -2.1596593091833788E-8d }, // 752 + {+0.5512100458145142d, -2.3259315921149476E-8d }, // 753 + {+0.5517725944519043d, +1.6022492496522704E-8d }, // 754 + {+0.5523349046707153d, -2.260433328226171E-8d }, // 755 + {+0.5528968572616577d, -1.957497997726303E-8d }, // 756 + {+0.5534584522247314d, +2.5465477111883854E-8d }, // 757 + {+0.5540198087692261d, -6.33792454933092E-9d }, // 758 + {+0.554580807685852d, +4.577835263278281E-9d }, // 759 + {+0.5551414489746094d, +5.856589221771548E-8d }, // 760 + {+0.5557018518447876d, +3.6769498759522324E-8d }, // 761 + {+0.5562618970870972d, +5.874989409410614E-8d }, // 762 + {+0.5568217039108276d, +5.649147309876989E-9d }, // 763 + {+0.5573811531066895d, -2.9726830960751796E-9d }, // 764 + {+0.5579402446746826d, +3.323458344853057E-8d }, // 765 + {+0.5584990978240967d, -4.588749093664028E-9d }, // 766 + {+0.5590575933456421d, +3.115616594184543E-9d }, // 767 + {+0.5596157312393188d, +5.6696103838614634E-8d }, // 768 + {+0.5601736307144165d, +3.7291263280048303E-8d }, // 769 + {+0.5607312917709351d, -5.4751646725093355E-8d }, // 770 + {+0.5612884759902954d, +1.9332630743320287E-8d }, // 771 + {+0.5618454217910767d, +2.147161515775941E-8d }, // 772 + {+0.5624021291732788d, -4.7989172862560625E-8d }, // 773 + {+0.5629583597183228d, +4.971378973445109E-8d }, // 774 + {+0.5635144710540771d, -4.2702997139152675E-8d }, // 775 + {+0.5640701055526733d, +3.273212962622764E-8d }, // 776 + {+0.5646255016326904d, +3.79438125545842E-8d }, // 777 + {+0.5651806592941284d, -2.6725298288329835E-8d }, // 778 + {+0.5657354593276978d, -4.1723833577410244E-8d }, // 779 + {+0.5662899017333984d, -6.71028256490915E-9d }, // 780 + {+0.56684410572052d, -4.055299181908475E-8d }, // 781 + {+0.567397952079773d, -2.3702295314000405E-8d }, // 782 + {+0.5679514408111572d, +4.4181618172507453E-8d }, // 783 + {+0.5685046911239624d, +4.4228706309734985E-8d }, // 784 + {+0.5690577030181885d, -2.3222346436879016E-8d }, // 785 + {+0.5696103572845459d, -3.862412756175274E-8d }, // 786 + {+0.5701626539230347d, -1.6390743801589046E-9d }, // 787 + {+0.5707147121429443d, -3.1139472791083883E-8d }, // 788 + {+0.5712664127349854d, -7.579587391156013E-9d }, // 789 + {+0.5718178749084473d, -4.983281844744412E-8d }, // 790 + {+0.5723689794540405d, -3.835454246739619E-8d }, // 791 + {+0.5729197263717651d, +2.7190020372374008E-8d }, // 792 + {+0.5734702348709106d, +2.7925807446276126E-8d }, // 793 + {+0.574020504951477d, -3.5813506001861646E-8d }, // 794 + {+0.5745704174041748d, -4.448550564530588E-8d }, // 795 + {+0.5751199722290039d, +2.2423840341717488E-9d }, // 796 + {+0.5756692886352539d, -1.450709904687712E-8d }, // 797 + {+0.5762182474136353d, +2.4806815282282017E-8d }, // 798 + {+0.5767669677734375d, +1.3057724436551892E-9d }, // 799 + {+0.5773153305053711d, +3.4529452510568104E-8d }, // 800 + {+0.5778634548187256d, +5.598413198183808E-9d }, // 801 + {+0.5784112215042114d, +3.405124925700107E-8d }, // 802 + {+0.5789587497711182d, +1.0074354568442952E-9d }, // 803 + {+0.5795059204101562d, +2.600448597385527E-8d }, // 804 + {+0.5800528526306152d, -9.83920263200211E-9d }, // 805 + {+0.5805994272232056d, +1.3012807963586057E-8d }, // 806 + {+0.5811457633972168d, -2.432215917965441E-8d }, // 807 + {+0.5816917419433594d, -2.308736892479391E-9d }, // 808 + {+0.5822374820709229d, -3.983067093146514E-8d }, // 809 + {+0.5827828645706177d, -1.735366061128156E-8d }, // 810 + {+0.5833280086517334d, -5.376251584638963E-8d }, // 811 + {+0.5838727951049805d, -2.952399778965259E-8d }, // 812 + {+0.5844172239303589d, +5.5685313670430624E-8d }, // 813 + {+0.5849615335464478d, -3.6230268489088716E-8d }, // 814 + {+0.5855053663253784d, +5.267948957869391E-8d }, // 815 + {+0.5860490798950195d, -3.489144132234588E-8d }, // 816 + {+0.5865923166275024d, +5.9006122320612716E-8d }, // 817 + {+0.5871354341506958d, -2.2934896740542648E-8d }, // 818 + {+0.5876781940460205d, -4.1975650319859075E-8d }, // 819 + {+0.5882205963134766d, +2.2036094805348692E-9d }, // 820 + {+0.5887627601623535d, -9.287179048539306E-9d }, // 821 + {+0.5893045663833618d, +4.3079982556221595E-8d }, // 822 + {+0.589846134185791d, +4.041399585161321E-8d }, // 823 + {+0.5903874635696411d, -1.696746473863933E-8d }, // 824 + {+0.5909284353256226d, -9.53795080582038E-9d }, // 825 + {+0.5914691686630249d, -5.619010749352923E-8d }, // 826 + {+0.5920095443725586d, -3.7398514182529506E-8d }, // 827 + {+0.5925495624542236d, +4.71524479659295E-8d }, // 828 + {+0.5930894613265991d, -4.0640692434639215E-8d }, // 829 + {+0.5936288833618164d, +5.716453096255401E-8d }, // 830 + {+0.5941681861877441d, -1.6745661720946737E-8d }, // 831 + {+0.5947071313858032d, -2.3639110433141897E-8d }, // 832 + {+0.5952457189559937d, +3.67972590471072E-8d }, // 833 + {+0.595784068107605d, +4.566672575206695E-8d }, // 834 + {+0.5963221788406372d, +3.2813537149653483E-9d }, // 835 + {+0.5968599319458008d, +2.916199305533732E-8d }, // 836 + {+0.5973974466323853d, +4.410412409109416E-9d }, // 837 + {+0.5979346036911011d, +4.85464582112459E-8d }, // 838 + {+0.5984715223312378d, +4.267089756924666E-8d }, // 839 + {+0.5990082025527954d, -1.2906712010774655E-8d }, // 840 + {+0.5995445251464844d, +1.3319784467641742E-9d }, // 841 + {+0.6000806093215942d, -3.35137581974451E-8d }, // 842 + {+0.6006163358688354d, +2.0734340706476473E-9d }, // 843 + {+0.6011518239974976d, -1.0808162722402073E-8d }, // 844 + {+0.601686954498291d, +4.735781872502109E-8d }, // 845 + {+0.6022218465805054d, +5.76686738430634E-8d }, // 846 + {+0.6027565002441406d, +2.043049589651736E-8d }, // 847 + {+0.6032907962799072d, +5.515817703577808E-8d }, // 848 + {+0.6038248538970947d, +4.2947540692649586E-8d }, // 849 + {+0.6043586730957031d, -1.589678872195875E-8d }, // 850 + {+0.6048921346664429d, -1.8613847754677912E-9d }, // 851 + {+0.6054253578186035d, -3.3851886626187444E-8d }, // 852 + {+0.6059582233428955d, +7.64416021682279E-9d }, // 853 + {+0.6064908504486084d, +3.7201467248814224E-9d }, // 854 + {+0.6070232391357422d, -4.532172996647129E-8d }, // 855 + {+0.6075552701950073d, -1.997046552871766E-8d }, // 856 + {+0.6080870628356934d, -3.913411606668587E-8d }, // 857 + {+0.6086184978485107d, +1.6697361107868944E-8d }, // 858 + {+0.609149694442749d, +2.8614950293715483E-8d }, // 859 + {+0.6096806526184082d, -3.081552929643174E-9d }, // 860 + {+0.6102112531661987d, +4.111645931319645E-8d }, // 861 + {+0.6107416152954102d, +4.2298539553668435E-8d }, // 862 + {+0.6112717390060425d, +7.630546413718035E-10d }, // 863 + {+0.6118015050888062d, +3.601718675118614E-8d }, // 864 + {+0.6123310327529907d, +2.914906573537692E-8d }, // 865 + {+0.6128603219985962d, -1.9544361222269494E-8d }, // 866 + {+0.613389253616333d, +9.442671392695732E-9d }, // 867 + {+0.6139179468154907d, -2.8031202304593286E-9d }, // 868 + {+0.6144464015960693d, -5.598619958143586E-8d }, // 869 + {+0.6149744987487793d, -3.060220883766096E-8d }, // 870 + {+0.6155023574829102d, -4.556583652800433E-8d }, // 871 + {+0.6160298585891724d, +1.8626341656366314E-8d }, // 872 + {+0.6165571212768555d, +4.305870564227991E-8d }, // 873 + {+0.6170841455459595d, +2.8024460607734262E-8d }, // 874 + {+0.6176109313964844d, -2.6183651590639875E-8d }, // 875 + {+0.6181373596191406d, -6.406189112730307E-11d }, // 876 + {+0.6186635494232178d, -1.2534241706168776E-8d }, // 877 + {+0.6191893815994263d, +5.5906456251308664E-8d }, // 878 + {+0.6197150945663452d, -3.286964881802063E-8d }, // 879 + {+0.6202404499053955d, -4.0153537978961E-8d }, // 880 + {+0.6207654476165771d, +3.434477109643361E-8d }, // 881 + {+0.6212903261184692d, -4.750377491075032E-8d }, // 882 + {+0.6218148469924927d, -4.699152670372743E-8d }, // 883 + {+0.6223390102386475d, +3.617013128065961E-8d }, // 884 + {+0.6228630542755127d, -3.6149218175202596E-8d }, // 885 + {+0.6233867406845093d, -2.5243286814648133E-8d }, // 886 + {+0.6239101886749268d, -5.003410681432538E-8d }, // 887 + {+0.6244332790374756d, +8.974417915105033E-9d }, // 888 + {+0.6249561309814453d, +3.285935446876949E-8d }, // 889 + {+0.6254787445068359d, +2.190661054038537E-8d }, // 890 + {+0.6260011196136475d, -2.3598354190515998E-8d }, // 891 + {+0.6265231370925903d, +1.5838762427747586E-8d }, // 892 + {+0.6270449161529541d, +2.129323729978037E-8d }, // 893 + {+0.6275664567947388d, -6.950808333865794E-9d }, // 894 + {+0.6280876398086548d, +5.059959203156465E-8d }, // 895 + {+0.6286087036132812d, -4.41909071122557E-8d }, // 896 + {+0.6291294097900391d, -5.262093550784066E-8d }, // 897 + {+0.6296497583389282d, +2.559185648444699E-8d }, // 898 + {+0.6301699876785278d, -4.768920119497491E-8d }, // 899 + {+0.6306898593902588d, -3.376406008397877E-8d }, // 900 + {+0.6312094926834106d, -5.156097914033476E-8d }, // 901 + {+0.6317287683486938d, +1.840992392368355E-8d }, // 902 + {+0.632247805595398d, +5.721951534729663E-8d }, // 903 + {+0.6327667236328125d, -5.406177467045421E-8d }, // 904 + {+0.6332851648330688d, +4.247320713683124E-8d }, // 905 + {+0.6338034868240356d, -1.0524557502830645E-8d }, // 906 + {+0.6343214511871338d, +2.5641927558519502E-8d }, // 907 + {+0.6348391771316528d, +3.204135737993823E-8d }, // 908 + {+0.6353566646575928d, +8.951285029786536E-9d }, // 909 + {+0.6358739137649536d, -4.335116707228395E-8d }, // 910 + {+0.6363908052444458d, -5.380016714089483E-9d }, // 911 + {+0.6369074583053589d, +3.931710344901743E-9d }, // 912 + {+0.6374238729476929d, -1.5140150088220166E-8d }, // 913 + {+0.6379399299621582d, +5.688910024377372E-8d }, // 914 + {+0.638455867767334d, -1.8124135273572568E-8d }, // 915 + {+0.6389714479446411d, -1.486720391901626E-9d }, // 916 + {+0.6394867897033691d, -1.2133811978747018E-8d }, // 917 + {+0.6400018930435181d, -4.9791700939901716E-8d }, // 918 + {+0.6405166387557983d, +5.022188652837274E-9d }, // 919 + {+0.6410311460494995d, +3.337143177933685E-8d }, // 920 + {+0.6415454149246216d, +3.55284719912458E-8d }, // 921 + {+0.6420594453811646d, +1.1765332726757802E-8d }, // 922 + {+0.6425732374191284d, -3.7646381826067834E-8d }, // 923 + {+0.6430866718292236d, +6.773803682579552E-9d }, // 924 + {+0.6435998678207397d, +2.608736797081283E-8d }, // 925 + {+0.6441128253936768d, +2.056466263408266E-8d }, // 926 + {+0.6446255445480347d, -9.524376551107945E-9d }, // 927 + {+0.6451379060745239d, +5.5299060775883977E-8d }, // 928 + {+0.6456501483917236d, -2.3114497793159813E-8d }, // 929 + {+0.6461620330810547d, -6.077779731902102E-9d }, // 930 + {+0.6466736793518066d, -1.2531793589140273E-8d }, // 931 + {+0.6471850872039795d, -4.220866994206517E-8d }, // 932 + {+0.6476961374282837d, +2.4368339445199057E-8d }, // 933 + {+0.6482070684432983d, -5.095229574221907E-8d }, // 934 + {+0.6487176418304443d, -2.9485356677301627E-8d }, // 935 + {+0.6492279767990112d, -3.0173901411577916E-8d }, // 936 + {+0.649738073348999d, -5.275210583909726E-8d }, // 937 + {+0.6502478122711182d, +2.2254737134350224E-8d }, // 938 + {+0.6507574319839478d, -4.330693978322885E-8d }, // 939 + {+0.6512666940689087d, -1.0753950588009912E-8d }, // 940 + {+0.6517757177352905d, +9.686179886293545E-10d }, // 941 + {+0.6522845029830933d, -7.875434494414498E-9d }, // 942 + {+0.6527930498123169d, -3.702271091849158E-8d }, // 943 + {+0.6533012390136719d, +3.2999073763758614E-8d }, // 944 + {+0.6538093090057373d, -3.5966064858620067E-8d }, // 945 + {+0.6543170213699341d, -5.23735298540578E-9d }, // 946 + {+0.6548244953155518d, +6.237715351293023E-9d }, // 947 + {+0.6553317308425903d, -1.279462699936282E-9d }, // 948 + {+0.6558387279510498d, -2.7527887552743672E-8d }, // 949 + {+0.6563453674316406d, +4.696233317356646E-8d }, // 950 + {+0.6568518877029419d, -1.5967172745329108E-8d }, // 951 + {+0.6573580503463745d, +2.2361985518423144E-8d }, // 952 + {+0.657863974571228d, +4.2999935789083046E-8d }, // 953 + {+0.6583696603775024d, +4.620570188811826E-8d }, // 954 + {+0.6588751077651978d, +3.223791487908353E-8d }, // 955 + {+0.659380316734314d, +1.3548138612715822E-9d }, // 956 + {+0.6598852872848511d, -4.618575323863973E-8d }, // 957 + {+0.6603899002075195d, +9.082960673843353E-9d }, // 958 + {+0.6608942747116089d, +4.820873399634487E-8d }, // 959 + {+0.6613985300064087d, -4.776104368314602E-8d }, // 960 + {+0.6619024276733398d, -4.0151502150238136E-8d }, // 961 + {+0.6624060869216919d, -4.791602708710648E-8d }, // 962 + {+0.6629093885421753d, +4.8410188461165925E-8d }, // 963 + {+0.6634125709533691d, +1.0663697110471944E-8d }, // 964 + {+0.6639155149459839d, -4.1691464781797555E-8d }, // 965 + {+0.66441810131073d, +1.080835500478704E-8d }, // 966 + {+0.664920449256897d, +4.920784622407246E-8d }, // 967 + {+0.6654226779937744d, -4.544868396511241E-8d }, // 968 + {+0.6659245491027832d, -3.448944157854234E-8d }, // 969 + {+0.6664261817932129d, -3.6870882345139385E-8d }, // 970 + {+0.6669275760650635d, -5.234055273962444E-8d }, // 971 + {+0.6674286127090454d, +3.856291077979099E-8d }, // 972 + {+0.6679295301437378d, -2.327375671320742E-9d }, // 973 + {+0.6684302091598511d, -5.555080534042001E-8d }, // 974 + {+0.6689305305480957d, -1.6471487337453832E-9d }, // 975 + {+0.6694306135177612d, +4.042486803683015E-8d }, // 976 + {+0.6699305772781372d, -4.8293856891818295E-8d }, // 977 + {+0.6704301834106445d, -2.9134931730784303E-8d }, // 978 + {+0.6709295511245728d, -2.1058207594753368E-8d }, // 979 + {+0.6714286804199219d, -2.3814619551682855E-8d }, // 980 + {+0.6719275712966919d, -3.7155475428252136E-8d }, // 981 + {+0.6724261045455933d, +5.8376834484391746E-8d }, // 982 + {+0.6729245185852051d, +2.4611679969129262E-8d }, // 983 + {+0.6734226942062378d, -1.899407107267079E-8d }, // 984 + {+0.6739205121994019d, +4.7016079464436395E-8d }, // 985 + {+0.6744182109832764d, -1.5529608026276525E-8d }, // 986 + {+0.6749155521392822d, +3.203391672602453E-8d }, // 987 + {+0.6754127740859985d, -4.8465821804075345E-8d }, // 988 + {+0.6759096384048462d, -1.8364507801369988E-8d }, // 989 + {+0.6764062643051147d, +3.3739397633046517E-9d }, // 990 + {+0.6769026517868042d, +1.6994526063192333E-8d }, // 991 + {+0.6773988008499146d, +2.2741891590028428E-8d }, // 992 + {+0.6778947114944458d, +2.0860312877435047E-8d }, // 993 + {+0.678390383720398d, +1.1593703222523284E-8d }, // 994 + {+0.678885817527771d, -4.814386594291911E-9d }, // 995 + {+0.6793810129165649d, -2.812076759125914E-8d }, // 996 + {+0.6798759698867798d, -5.808261186903479E-8d }, // 997 + {+0.680370569229126d, +2.4751837654582522E-8d }, // 998 + {+0.6808650493621826d, -1.7793890245755405E-8d }, // 999 + {+0.6813591718673706d, +5.294053246347931E-8d }, // 1000 + {+0.681853175163269d, -1.2220826223585654E-9d }, // 1001 + {+0.6823468208312988d, +5.8377876767612725E-8d }, // 1002 + {+0.6828403472900391d, -6.437492120743254E-9d }, // 1003 + {+0.6833335161209106d, +4.2990710043633113E-8d }, // 1004 + {+0.6838265657424927d, -3.1516131027023284E-8d }, // 1005 + {+0.684319257736206d, +8.70017386744679E-9d }, // 1006 + {+0.6848117113113403d, +4.466959125843237E-8d }, // 1007 + {+0.6853040456771851d, -4.25782656420497E-8d }, // 1008 + {+0.6857960224151611d, -1.4386267593671393E-8d }, // 1009 + {+0.6862877607345581d, +1.0274494061148778E-8d }, // 1010 + {+0.686779260635376d, +3.164186629229597E-8d }, // 1011 + {+0.6872705221176147d, +4.995334552140326E-8d }, // 1012 + {+0.687761664390564d, -5.3763211240398744E-8d }, // 1013 + {+0.6882524490356445d, -4.0852427502515625E-8d }, // 1014 + {+0.688742995262146d, -3.0287143914420064E-8d }, // 1015 + {+0.6892333030700684d, -2.183125937905008E-8d }, // 1016 + {+0.6897233724594116d, -1.524901992178814E-8d }, // 1017 + {+0.6902132034301758d, -1.0305018010328949E-8d }, // 1018 + {+0.6907027959823608d, -6.764191876212205E-9d }, // 1019 + {+0.6911921501159668d, -4.391824838015402E-9d }, // 1020 + {+0.6916812658309937d, -2.9535446262017846E-9d }, // 1021 + {+0.6921701431274414d, -2.2153227096187463E-9d }, // 1022 + {+0.6926587820053101d, -1.943473623641502E-9d }, // 1023 }; diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/package-info.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/package-info.java new file mode 100644 index 000000000..0dbd2f895 --- /dev/null +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/package-info.java @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Portable alternative to {@link java.lang.Math} and {@link java.lang.StrictMath}. + */ +package org.apache.commons.math4.legacy.core.jdkmath; diff --git a/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/package-info.java b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/package-info.java new file mode 100644 index 000000000..2c30aa285 --- /dev/null +++ b/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/package-info.java @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Core math utilities. + */ +package org.apache.commons.math4.legacy.core; diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/ExtendedFieldElementAbstractTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/ExtendedFieldElementAbstractTest.java index d09323a7e..258c887d3 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/ExtendedFieldElementAbstractTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/ExtendedFieldElementAbstractTest.java @@ -104,7 +104,7 @@ public abstract class ExtendedFieldElementAbstractTest MathArithmeticException double[] hasInf = new double[] {1, 2, 1, Double.NEGATIVE_INFINITY}; try { MathArrays.normalizeArray(hasInf, 1); Assert.fail("expecting MathIllegalArgumentException"); - } catch (MathIllegalArgumentException ex) {} + } catch (MathIllegalArgumentException ex) { /* ignore */ } // Infinite target -> MathIllegalArgumentException try { MathArrays.normalizeArray(testValues1, Double.POSITIVE_INFINITY); Assert.fail("expecting MathIllegalArgumentException"); - } catch (MathIllegalArgumentException ex) {} + } catch (MathIllegalArgumentException ex) { /* ignore */ } // NaN target -> MathIllegalArgumentException try { MathArrays.normalizeArray(testValues1, Double.NaN); Assert.fail("expecting MathIllegalArgumentException"); - } catch (MathIllegalArgumentException ex) {} + } catch (MathIllegalArgumentException ex) { /* ignore */ } } @Test @@ -528,17 +532,17 @@ public class MathArraysTest { * h=[1,0.8,0.5,0.3] * convolve(x,h) -> array([ 1.2 , -0.84, 0.56, 0.58, 0.16, 0.42]) */ - double[] x1 = { 1.2, -1.8, 1.4 }; - double[] h1 = { 1, 0.8, 0.5, 0.3 }; - double[] y1 = { 1.2, -0.84, 0.56, 0.58, 0.16, 0.42 }; + double[] x1 = {1.2, -1.8, 1.4}; + double[] h1 = {1, 0.8, 0.5, 0.3}; + double[] y1 = {1.2, -0.84, 0.56, 0.58, 0.16, 0.42}; double tolerance = 1e-13; double[] yActual = MathArrays.convolve(x1, h1); Assert.assertArrayEquals(y1, yActual, tolerance); - double[] x2 = { 1, 2, 3 }; - double[] h2 = { 0, 1, 0.5 }; - double[] y2 = { 0, 1, 2.5, 4, 1.5 }; + double[] x2 = {1, 2, 3}; + double[] h2 = {0, 1, 0.5}; + double[] y2 = {0, 1, 2.5, 4, 1.5}; yActual = MathArrays.convolve(x2, h2); Assert.assertArrayEquals(y2, yActual, tolerance); @@ -628,6 +632,7 @@ public class MathArraysTest { @Test public void testVerifyValuesNegative() { + final double[] nullArray = null; Assert.assertFalse(MathArrays.verifyValues(singletonArray, 0, 0)); Assert.assertFalse(MathArrays.verifyValues(testArray, 0, 0)); try { @@ -706,7 +711,7 @@ public class MathArraysTest { Assert.assertEquals(0, MathArrays.concatenate(z, z, z).length); } - @Test(expected=NullPointerException.class) + @Test(expected = NullPointerException.class) public void testConcatenateNullArguments() { final double[] x = new double[] {0, 1, 2}; MathArrays.concatenate(x, null); @@ -721,10 +726,10 @@ public class MathArraysTest { @Test public void testUniqueInfiniteValues() { - final double [] x = {0, Double.NEGATIVE_INFINITY, 3, Double.NEGATIVE_INFINITY, + final double[] x = {0, Double.NEGATIVE_INFINITY, 3, Double.NEGATIVE_INFINITY, 3, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY}; final double[] u = {Double.POSITIVE_INFINITY, 3, 0, Double.NEGATIVE_INFINITY}; - Assert.assertArrayEquals(u , MathArrays.unique(x), 0); + Assert.assertArrayEquals(u, MathArrays.unique(x), 0); } @Test @@ -740,7 +745,7 @@ public class MathArraysTest { Assert.assertEquals(Double.NEGATIVE_INFINITY, u[4], 0); } - @Test(expected=NullPointerException.class) + @Test(expected = NullPointerException.class) public void testUniqueNullArgument() { MathArrays.unique(null); } diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/PairTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/PairTest.java index 316227f6d..bc8e2be1f 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/PairTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/PairTest.java @@ -1,15 +1,18 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to You under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law - * or agreed to in writing, software distributed under the License is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the specific language - * governing permissions and limitations under the License. + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.commons.math4.legacy.core; @@ -93,12 +96,12 @@ public class PairTest { private static class MyInteger { private int i; - public MyInteger(int i) { + MyInteger(int i) { this.i = i; } - public void set(int i) { - this.i = i; + public void set(int value) { + this.i = value; } @Override diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpDecTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpDecTest.java index 55351da8d..d242b3ecc 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpDecTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpDecTest.java @@ -50,24 +50,26 @@ public class DfpDecTest { private void test(Dfp x, Dfp y, int flags, String desc) { boolean b = x.equals(y); - if (!x.equals(y) && !x.unequal(y)) // NaNs involved - b = (x.toString().equals(y.toString())); + if (!x.equals(y) && !x.unequal(y)) { // NaNs involved + b = x.toString().equals(y.toString()); + } - if (x.equals(new DfpDec(field, 0))) // distinguish +/- zero - b = (b && (x.toString().equals(y.toString()))); + if (x.equals(new DfpDec(field, 0))) { // distinguish +/- zero + b = b && (x.toString().equals(y.toString())); + } - b = (b && x.getField().getIEEEFlags() == flags); + b = b && x.getField().getIEEEFlags() == flags; if (!b) { - Assert.assertTrue("assertion failed "+desc+" x = "+x.toString()+" flags = "+x.getField().getIEEEFlags(), b); + Assert.assertTrue( + "assertion failed " + desc + " x = " + x.toString() + " flags = " + x.getField().getIEEEFlags(), b); } x.getField().clearIEEEFlags(); } @Test - public void testRound() - { + public void testRound() { field.setRoundingMode(DfpField.RoundingMode.ROUND_HALF_EVEN); test(new DfpDec(field, "12345678901234567890"), @@ -283,8 +285,7 @@ public class DfpDecTest { } @Test - public void testRoundDecimal10() - { + public void testRoundDecimal10() { field.setRoundingMode(DfpField.RoundingMode.ROUND_HALF_EVEN); test(new Decimal10(field, "1234567891234567890"), @@ -390,7 +391,7 @@ public class DfpDecTest { // RoundDecimal10 up test(new Decimal10(field, 1234567890).add(new Decimal10(field, "0.1")), - new Decimal10(field, 1234567891l), + new Decimal10(field, 1234567891L), DfpField.FLAG_INEXACT, "RoundDecimal10 #25"); test(new Decimal10(field, "1234567890").add(new Decimal10(field, "0.0001")), @@ -500,8 +501,7 @@ public class DfpDecTest { } @Test - public void testNextAfter() - { + public void testNextAfter() { test(new DfpDec(field, 1).nextAfter(pinf), new DfpDec(field, "1.0000000000000001"), 0, "NextAfter #1"); @@ -531,7 +531,7 @@ public class DfpDecTest { 0, "NextAfter #6"); test(new DfpDec(field, (byte) 2).nextAfter(new DfpDec(field, 2)), - new DfpDec(field, 2l), + new DfpDec(field, 2L), 0, "NextAfter #7"); test(new DfpDec(field, 0).nextAfter(new DfpDec(field, 0)), @@ -552,15 +552,15 @@ public class DfpDecTest { test(new DfpDec(field, "-1e-131092").nextAfter(pinf), new DfpDec(field, "-0"), - DfpField.FLAG_UNDERFLOW|DfpField.FLAG_INEXACT, "Next After #12"); + DfpField.FLAG_UNDERFLOW | DfpField.FLAG_INEXACT, "Next After #12"); test(new DfpDec(field, "1e-131092").nextAfter(ninf), new DfpDec(field, "0"), - DfpField.FLAG_UNDERFLOW|DfpField.FLAG_INEXACT, "Next After #13"); + DfpField.FLAG_UNDERFLOW | DfpField.FLAG_INEXACT, "Next After #13"); test(new DfpDec(field, "9.9999999999999999e131078").nextAfter(pinf), pinf, - DfpField.FLAG_OVERFLOW|DfpField.FLAG_INEXACT, "Next After #14"); + DfpField.FLAG_OVERFLOW | DfpField.FLAG_INEXACT, "Next After #14"); } } diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpMathTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpMathTest.java index 94a068687..16486be9b 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpMathTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpMathTest.java @@ -56,29 +56,30 @@ public class DfpMathTest { // Generic test function. Takes params x and y and tests them for // equality. Then checks the status flags against the flags argument. // If the test fail, it prints the desc string - private void test(Dfp x, Dfp y, int flags, String desc) - { + private void test(Dfp x, Dfp y, int flags, String desc) { boolean b = x.equals(y); - if (!x.equals(y) && !x.unequal(y)) // NaNs involved - b = (x.toString().equals(y.toString())); + if (!x.equals(y) && !x.unequal(y)) { // NaNs involved + b = x.toString().equals(y.toString()); + } - if (x.equals(factory.newDfp("0"))) // distinguish +/- zero - b = (b && (x.toString().equals(y.toString()))); + if (x.equals(factory.newDfp("0"))) { // distinguish +/- zero + b = b && (x.toString().equals(y.toString())); + } - b = (b && x.getField().getIEEEFlags() == flags); + b = b && x.getField().getIEEEFlags() == flags; if (!b) { - Assert.assertTrue("assertion failed "+desc+" x = "+x.toString()+" flags = "+x.getField().getIEEEFlags(), b); + Assert.assertTrue( + "assertion failed " + desc + " x = " + x.toString() + " flags = " + x.getField().getIEEEFlags(), b); } x.getField().clearIEEEFlags(); } @Test - public void testPow() - { - // Test special cases exponent of zero + public void testPow() { + // Test special cases exponent of zero test(DfpMath.pow(factory.newDfp("0"), factory.newDfp("0")), factory.newDfp("1"), 0, "pow #1"); @@ -464,24 +465,23 @@ public class DfpMathTest { test(DfpMath.pow(factory.newDfp("-2"), factory.newDfp("-4.1")), qnan, - DfpField.FLAG_INVALID|DfpField.FLAG_INEXACT, "pow #87"); + DfpField.FLAG_INVALID | DfpField.FLAG_INEXACT, "pow #87"); // Some fractional cases. - test(DfpMath.pow(factory.newDfp("2"),factory.newDfp("1.5")), + test(DfpMath.pow(factory.newDfp("2"), factory.newDfp("1.5")), factory.newDfp("2.8284271247461901"), DfpField.FLAG_INEXACT, "pow #88"); } @Test - public void testSin() - { + public void testSin() { test(DfpMath.sin(pinf), nan, - DfpField.FLAG_INVALID|DfpField.FLAG_INEXACT, "sin #1"); + DfpField.FLAG_INVALID | DfpField.FLAG_INEXACT, "sin #1"); test(DfpMath.sin(nan), nan, - DfpField.FLAG_INVALID|DfpField.FLAG_INEXACT, "sin #2"); + DfpField.FLAG_INVALID | DfpField.FLAG_INEXACT, "sin #2"); test(DfpMath.sin(factory.getZero()), factory.getZero(), diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpTest.java index c8bbe86b1..ff28f9ee4 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpTest.java @@ -27,11 +27,6 @@ import org.junit.Test; public class DfpTest extends ExtendedFieldElementAbstractTest { - @Override - protected Dfp build(final double x) { - return field.newDfp(x); - } - private DfpField field; private Dfp pinf; private Dfp ninf; @@ -39,6 +34,11 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { private Dfp snan; private Dfp qnan; + @Override + protected Dfp build(final double x) { + return field.newDfp(x); + } + @Before public void setUp() { // Some basic setup. Define some constants and clear the status flags @@ -67,16 +67,20 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { private void test(Dfp x, Dfp y, int flags, String desc) { boolean b = x.equals(y); - if (!x.equals(y) && !x.unequal(y)) // NaNs involved - b = (x.toString().equals(y.toString())); + if (!x.equals(y) && !x.unequal(y)) { // NaNs involved + b = x.toString().equals(y.toString()); + } - if (x.equals(field.newDfp("0"))) // distinguish +/- zero - b = (b && (x.toString().equals(y.toString()))); + if (x.equals(field.newDfp("0"))) { // distinguish +/- zero + b = b && (x.toString().equals(y.toString())); + } - b = (b && x.getField().getIEEEFlags() == flags); + b = b && x.getField().getIEEEFlags() == flags; - if (!b) - Assert.assertTrue("assertion failed "+desc+" x = "+x.toString()+" flags = "+x.getField().getIEEEFlags(), b); + if (!b) { + Assert.assertTrue( + "assertion failed " + desc + " x = " + x.toString() + " flags = " + x.getField().getIEEEFlags(), b); + } x.getField().clearIEEEFlags(); } @@ -103,11 +107,11 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { @Test public void testLongConstructor() { - Assert.assertEquals("0.", new Dfp(field, 0l).toString()); - Assert.assertEquals("1.", new Dfp(field, 1l).toString()); - Assert.assertEquals("-1.", new Dfp(field, -1l).toString()); - Assert.assertEquals("1234567890.", new Dfp(field, 1234567890l).toString()); - Assert.assertEquals("-1234567890.", new Dfp(field, -1234567890l).toString()); + Assert.assertEquals("0.", new Dfp(field, 0L).toString()); + Assert.assertEquals("1.", new Dfp(field, 1L).toString()); + Assert.assertEquals("-1.", new Dfp(field, -1L).toString()); + Assert.assertEquals("1234567890.", new Dfp(field, 1234567890L).toString()); + Assert.assertEquals("-1234567890.", new Dfp(field, -1234567890L).toString()); Assert.assertEquals("-9223372036854775808.", new Dfp(field, Long.MIN_VALUE).toString()); Assert.assertEquals("9223372036854775807.", new Dfp(field, Long.MAX_VALUE).toString()); } @@ -370,25 +374,25 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { // utility function to help test comparisons private void cmptst(Dfp a, Dfp b, String op, boolean result, double num) { - if (op == "equal") { + if (op.equals("equal")) { if (a.equals(b) != result) { assertionFailOpNum(op, num); } } - if (op == "unequal") { + if (op.equals("unequal")) { if (a.unequal(b) != result) { assertionFailOpNum(op, num); } } - if (op == "lessThan") { + if (op.equals("lessThan")) { if (a.lessThan(b) != result) { assertionFailOpNum(op, num); } } - if (op == "greaterThan") { + if (op.equals("greaterThan")) { if (a.greaterThan(b) != result) { assertionFailOpNum(op, num); } @@ -580,7 +584,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { cmptst(qnan.negate(), qnan, "unequal", false, 52); if (field.getIEEEFlags() != 0) { - assertionFail("compare unequal flags = "+field.getIEEEFlags()); + assertionFail("compare unequal flags = " + field.getIEEEFlags()); } // @@ -674,7 +678,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { //lessThan compares with nans should raise FLAG_INVALID if (field.getIEEEFlags() != DfpField.FLAG_INVALID) { - assertionFail("compare lessThan flags = "+field.getIEEEFlags()); + assertionFail("compare lessThan flags = " + field.getIEEEFlags()); } field.clearIEEEFlags(); @@ -767,9 +771,9 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { cmptst(snan.negate(), snan, "greaterThan", false, 51); cmptst(qnan.negate(), qnan, "greaterThan", false, 52); - //greaterThan compares with nans should raise FLAG_INVALID + // greaterThan compares with nans should raise FLAG_INVALID if (field.getIEEEFlags() != DfpField.FLAG_INVALID) { - assertionFail("compare greaterThan flags = "+field.getIEEEFlags()); + assertionFail("compare greaterThan flags = " + field.getIEEEFlags()); } field.clearIEEEFlags(); } @@ -1220,15 +1224,15 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { test(field.newDfp("-1e-131092").nextAfter(pinf), field.newDfp("-0"), - DfpField.FLAG_UNDERFLOW|DfpField.FLAG_INEXACT, "Next After #12"); + DfpField.FLAG_UNDERFLOW | DfpField.FLAG_INEXACT, "Next After #12"); test(field.newDfp("1e-131092").nextAfter(ninf), field.newDfp("0"), - DfpField.FLAG_UNDERFLOW|DfpField.FLAG_INEXACT, "Next After #13"); + DfpField.FLAG_UNDERFLOW | DfpField.FLAG_INEXACT, "Next After #13"); test(field.newDfp("9.9999999999999999999e131078").nextAfter(pinf), pinf, - DfpField.FLAG_OVERFLOW|DfpField.FLAG_INEXACT, "Next After #14"); + DfpField.FLAG_OVERFLOW | DfpField.FLAG_INEXACT, "Next After #14"); } @Test @@ -1563,11 +1567,11 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { @Test public void testIssue567() { - DfpField field = new DfpField(100); - Assert.assertEquals(0.0, field.getZero().toDouble(), Precision.SAFE_MIN); - Assert.assertEquals(0.0, field.newDfp(0.0).toDouble(), Precision.SAFE_MIN); - Assert.assertEquals(-1, AccurateMath.copySign(1, field.newDfp(-0.0).toDouble()), Precision.EPSILON); - Assert.assertEquals(+1, AccurateMath.copySign(1, field.newDfp(+0.0).toDouble()), Precision.EPSILON); + DfpField localField = new DfpField(100); + Assert.assertEquals(0.0, localField.getZero().toDouble(), Precision.SAFE_MIN); + Assert.assertEquals(0.0, localField.newDfp(0.0).toDouble(), Precision.SAFE_MIN); + Assert.assertEquals(-1, AccurateMath.copySign(1, localField.newDfp(-0.0).toDouble()), Precision.EPSILON); + Assert.assertEquals(+1, AccurateMath.copySign(1, localField.newDfp(+0.0).toDouble()), Precision.EPSILON); } @Test @@ -1660,15 +1664,15 @@ public class DfpTest extends ExtendedFieldElementAbstractTest { Assert.assertTrue(var5.equals(var6) ? var5.hashCode() == var6.hashCode() : true); } - private static void assertionFail(String content){ + private static void assertionFail(String content) { Assert.fail("assertion failed: " + content); } - private static void assertionFailOpNum(String op, double num){ + private static void assertionFailOpNum(String op, double num) { assertionFail(op + " compare #" + num); } - private static final void assertionFailDfpField(DfpField field){ + private static void assertionFailDfpField(DfpField field) { assertionFail("compare flags = " + field.getIEEEFlags()); } } diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathStrictComparisonTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathStrictComparisonTest.java index 7f12c1989..352bd0d85 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathStrictComparisonTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathStrictComparisonTest.java @@ -56,7 +56,7 @@ public class AccurateMathStrictComparisonTest { -Double.MIN_VALUE, Double.MIN_VALUE, // 12,13 }; - private static final Float [] FLOAT_SPECIAL_VALUES = { + private static final Float[] FLOAT_SPECIAL_VALUES = { -0.0f, +0.0f, // 1,2 Float.NaN, // 3 Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, // 4,5 @@ -64,13 +64,13 @@ public class AccurateMathStrictComparisonTest { -Float.MIN_VALUE, -Float.MAX_VALUE, // 8,9 }; - private static final Object [] LONG_SPECIAL_VALUES = { - -1,0,1, // 1,2,3 + private static final Object[] LONG_SPECIAL_VALUES = { + -1, 0, 1, // 1,2,3 Long.MIN_VALUE, Long.MAX_VALUE, // 4,5 }; private static final Object[] INT_SPECIAL_VALUES = { - -1,0,1, // 1,2,3 + -1, 0, 1, // 1,2,3 Integer.MIN_VALUE, Integer.MAX_VALUE, // 4,5 }; @@ -79,17 +79,18 @@ public class AccurateMathStrictComparisonTest { private final Type[] types; private final Object[][] valueArrays; - public AccurateMathStrictComparisonTest(Method m, Method f, Type[] types, Object[][] data) throws Exception{ - this.mathMethod=m; - this.fastMethod=f; - this.types=types; - this.valueArrays=data; + public AccurateMathStrictComparisonTest(Method m, Method f, Type[] types, Object[][] data) throws Exception { + this.mathMethod = m; + this.fastMethod = f; + this.types = types; + this.valueArrays = data; } @Test - public void test1() throws Exception{ + public void test1() throws Exception { setupMethodCall(mathMethod, fastMethod, types, valueArrays); } + private static boolean isNumber(Double d) { return !(d.isInfinite() || d.isNaN()); } @@ -98,18 +99,18 @@ public class AccurateMathStrictComparisonTest { return !(f.isInfinite() || f.isNaN()); } - private static void reportFailedResults(Method mathMethod, Object[] params, Object expected, Object actual, int[] entries){ + private static void reportFailedResults(Method mathMethod, Object[] params, Object expected, Object actual, int[] entries) { final String methodName = mathMethod.getName(); String format = null; - long actL=0; - long expL=0; + long actL = 0; + long expL = 0; if (expected instanceof Double) { Double exp = (Double) expected; Double act = (Double) actual; if (isNumber(exp) && isNumber(act) && exp != 0) { // show difference as hex actL = Double.doubleToLongBits(act); expL = Double.doubleToLongBits(exp); - if (Math.abs(actL-expL)==1) { + if (Math.abs(actL - expL) == 1) { // Not 100% sure off-by-one errors are allowed everywhere, so only allow for these methods if (methodName.equals("toRadians") || methodName.equals("atan2")) { return; @@ -117,7 +118,7 @@ public class AccurateMathStrictComparisonTest { } format = "%016x"; } - } else if (expected instanceof Float ){ + } else if (expected instanceof Float) { Float exp = (Float) expected; Float act = (Float) actual; if (isNumber(exp) && isNumber(act) && exp != 0) { // show difference as hex @@ -132,19 +133,19 @@ public class AccurateMathStrictComparisonTest { sb.append(methodName); sb.append("("); String sep = ""; - for(Object o : params){ + for (Object o : params) { sb.append(sep); sb.append(o); - sep=", "; + sep = ", "; } sb.append(") expected "); - if (format != null){ + if (format != null) { sb.append(String.format(format, expL)); } else { sb.append(expected); } sb.append(" actual "); - if (format != null){ + if (format != null) { sb.append(String.format(format, actL)); } else { sb.append(actual); @@ -156,7 +157,9 @@ public class AccurateMathStrictComparisonTest { if (fatal) { Assert.fail(message); } else { + // CHECKSTYLE: stop Regexp System.out.println(message); + // CHECKSTYLE: resume Regexp } } @@ -181,7 +184,7 @@ public class AccurateMathStrictComparisonTest { reportFailedResults(mathMethod, params, expected, actual, entries); } } catch (IllegalArgumentException e) { - Assert.fail(mathMethod+" "+e); + Assert.fail(mathMethod + " " + e); } } @@ -190,13 +193,13 @@ public class AccurateMathStrictComparisonTest { Object[] params = new Object[types.length]; int entry1 = 0; int[] entries = new int[types.length]; - for(Object d : valueArrays[0]) { + for (Object d : valueArrays[0]) { entry1++; params[0] = d; entries[0] = entry1; - if (params.length > 1){ + if (params.length > 1) { int entry2 = 0; - for(Object d1 : valueArrays[1]) { + for (Object d1 : valueArrays[1]) { entry2++; params[1] = d1; entries[1] = entry2; @@ -210,13 +213,14 @@ public class AccurateMathStrictComparisonTest { @Parameters public static List data() throws Exception { + // CHECKSTYLE: stop Regexp String singleMethod = System.getProperty("testMethod"); List list = new ArrayList<>(); - for(Method mathMethod : StrictMath.class.getDeclaredMethods()) { + for (Method mathMethod : StrictMath.class.getDeclaredMethods()) { method: - if (Modifier.isPublic(mathMethod.getModifiers())){// Only test public methods - Type []types = mathMethod.getGenericParameterTypes(); - if (types.length >=1) { // Only check methods with at least one parameter + if (Modifier.isPublic(mathMethod.getModifiers())) { // Only test public methods + Type[] types = mathMethod.getGenericParameterTypes(); + if (types.length >= 1) { // Only check methods with at least one parameter try { // Get the corresponding AccurateMath method Method fastMethod = AccurateMath.class.getDeclaredMethod(mathMethod.getName(), (Class[]) types); @@ -224,24 +228,24 @@ public class AccurateMathStrictComparisonTest { if (singleMethod != null && !fastMethod.getName().equals(singleMethod)) { break method; } - Object [][] values = new Object[types.length][]; + Object[][] values = new Object[types.length][]; int index = 0; - for(Type t : types) { - if (t.equals(double.class)){ - values[index]=DOUBLE_SPECIAL_VALUES; + for (Type t : types) { + if (t.equals(double.class)) { + values[index] = DOUBLE_SPECIAL_VALUES; } else if (t.equals(float.class)) { - values[index]=FLOAT_SPECIAL_VALUES; + values[index] = FLOAT_SPECIAL_VALUES; } else if (t.equals(long.class)) { - values[index]=LONG_SPECIAL_VALUES; + values[index] = LONG_SPECIAL_VALUES; } else if (t.equals(int.class)) { - values[index]=INT_SPECIAL_VALUES; + values[index] = INT_SPECIAL_VALUES; } else { - System.out.println("Cannot handle class "+t+" for "+mathMethod); + System.out.println("Cannot handle class " + t + " for " + mathMethod); break method; } index++; } -// System.out.println(fastMethod); +// System.out.println(fastMethod); /* * The current implementation runs each method as a separate test. * Could be amended to run each value as a separate test @@ -249,14 +253,16 @@ public class AccurateMathStrictComparisonTest { list.add(new Object[]{mathMethod, fastMethod, types, values}); // setupMethodCall(mathMethod, fastMethod, params, data); } else { - System.out.println("Cannot find public AccurateMath method corresponding to: "+mathMethod); + System.out + .println("Cannot find public AccurateMath method corresponding to: " + mathMethod); } } catch (NoSuchMethodException e) { - System.out.println("Cannot find AccurateMath method corresponding to: "+mathMethod); + System.out.println("Cannot find AccurateMath method corresponding to: " + mathMethod); } } } } return list; + // CHECKSTYLE: resume Regexp } } diff --git a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathTest.java b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathTest.java index 6a8ff2728..957116656 100644 --- a/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathTest.java +++ b/commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMathTest.java @@ -42,6 +42,8 @@ import org.apache.commons.rng.UniformRandomProvider; import org.apache.commons.rng.simple.RandomSource; public class AccurateMathTest { + // CHECKSTYLE: stop Regexp + // The above comment allowa System.out.print private static final double MAX_ERROR_ULP = 0.51; private static final int NUMBER_OF_TRIALS = 1000; @@ -52,22 +54,22 @@ public class AccurateMathTest { @Before public void setUp() { field = new DfpField(40); - generator = RandomSource.create(RandomSource.MT, 6176597458463500194l); + generator = RandomSource.create(RandomSource.MT, 6176597458463500194L); } @Test public void testMinMaxDouble() { double[][] pairs = { - { -50.0, 50.0 }, - { Double.POSITIVE_INFINITY, 1.0 }, - { Double.NEGATIVE_INFINITY, 1.0 }, - { Double.NaN, 1.0 }, - { Double.POSITIVE_INFINITY, 0.0 }, - { Double.NEGATIVE_INFINITY, 0.0 }, - { Double.NaN, 0.0 }, - { Double.NaN, Double.NEGATIVE_INFINITY }, - { Double.NaN, Double.POSITIVE_INFINITY }, - { Precision.SAFE_MIN, Precision.EPSILON } + {-50.0, 50.0}, + {Double.POSITIVE_INFINITY, 1.0}, + {Double.NEGATIVE_INFINITY, 1.0}, + {Double.NaN, 1.0}, + {Double.POSITIVE_INFINITY, 0.0}, + {Double.NEGATIVE_INFINITY, 0.0}, + {Double.NaN, 0.0}, + {Double.NaN, Double.NEGATIVE_INFINITY}, + {Double.NaN, Double.POSITIVE_INFINITY}, + {Precision.SAFE_MIN, Precision.EPSILON} }; for (double[] pair : pairs) { assertEquals("min(" + pair[0] + ", " + pair[1] + ")", @@ -92,15 +94,15 @@ public class AccurateMathTest { @Test public void testMinMaxFloat() { float[][] pairs = { - { -50.0f, 50.0f }, - { Float.POSITIVE_INFINITY, 1.0f }, - { Float.NEGATIVE_INFINITY, 1.0f }, - { Float.NaN, 1.0f }, - { Float.POSITIVE_INFINITY, 0.0f }, - { Float.NEGATIVE_INFINITY, 0.0f }, - { Float.NaN, 0.0f }, - { Float.NaN, Float.NEGATIVE_INFINITY }, - { Float.NaN, Float.POSITIVE_INFINITY } + {-50.0f, 50.0f}, + {Float.POSITIVE_INFINITY, 1.0f}, + {Float.NEGATIVE_INFINITY, 1.0f}, + {Float.NaN, 1.0f}, + {Float.POSITIVE_INFINITY, 0.0f}, + {Float.NEGATIVE_INFINITY, 0.0f}, + {Float.NaN, 0.0f}, + {Float.NaN, Float.NEGATIVE_INFINITY}, + {Float.NaN, Float.POSITIVE_INFINITY} }; for (float[] pair : pairs) { assertEquals("min(" + pair[0] + ", " + pair[1] + ")", @@ -413,21 +415,20 @@ public class AccurateMathTest { assertEquals("pow(0.0, 0.0) should be 1.0", 1.0, AccurateMath.pow(0.0, 0.0), EXACT); } - @Test(timeout=20000L) + @Test(timeout = 20000L) public void testPowAllSpecialCases() { final double EXACT = -1.0; - final double DOUBLES[] = new double[] - { - Double.NEGATIVE_INFINITY, -0.0, Double.NaN, 0.0, Double.POSITIVE_INFINITY, - Long.MIN_VALUE, Integer.MIN_VALUE, Short.MIN_VALUE, Byte.MIN_VALUE, - -(double)Long.MIN_VALUE, -(double)Integer.MIN_VALUE, -(double)Short.MIN_VALUE, -(double)Byte.MIN_VALUE, - Byte.MAX_VALUE, Short.MAX_VALUE, Integer.MAX_VALUE, Long.MAX_VALUE, - -Byte.MAX_VALUE, -Short.MAX_VALUE, -Integer.MAX_VALUE, -Long.MAX_VALUE, - Float.MAX_VALUE, Double.MAX_VALUE, Double.MIN_VALUE, Float.MIN_VALUE, - -Float.MAX_VALUE, -Double.MAX_VALUE, -Double.MIN_VALUE, -Float.MIN_VALUE, - 0.5, 0.1, 0.2, 0.8, 1.1, 1.2, 1.5, 1.8, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 1.3, 2.2, 2.5, 2.8, 33.0, 33.1, 33.5, 33.8, 10.0, 300.0, 400.0, 500.0, - -0.5, -0.1, -0.2, -0.8, -1.1, -1.2, -1.5, -1.8, -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -1.3, -2.2, -2.5, -2.8, -33.0, -33.1, -33.5, -33.8, -10.0, -300.0, -400.0, -500.0 - }; + final double[] DOUBLES = new double[] { + Double.NEGATIVE_INFINITY, -0.0, Double.NaN, 0.0, Double.POSITIVE_INFINITY, + Long.MIN_VALUE, Integer.MIN_VALUE, Short.MIN_VALUE, Byte.MIN_VALUE, + -(double)Long.MIN_VALUE, -(double)Integer.MIN_VALUE, -(double)Short.MIN_VALUE, -(double)Byte.MIN_VALUE, + Byte.MAX_VALUE, Short.MAX_VALUE, Integer.MAX_VALUE, Long.MAX_VALUE, + -Byte.MAX_VALUE, -Short.MAX_VALUE, -Integer.MAX_VALUE, -Long.MAX_VALUE, + Float.MAX_VALUE, Double.MAX_VALUE, Double.MIN_VALUE, Float.MIN_VALUE, + -Float.MAX_VALUE, -Double.MAX_VALUE, -Double.MIN_VALUE, -Float.MIN_VALUE, + 0.5, 0.1, 0.2, 0.8, 1.1, 1.2, 1.5, 1.8, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 1.3, 2.2, 2.5, 2.8, 33.0, 33.1, 33.5, 33.8, 10.0, 300.0, 400.0, 500.0, + -0.5, -0.1, -0.2, -0.8, -1.1, -1.2, -1.5, -1.8, -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -1.3, -2.2, -2.5, -2.8, -33.0, -33.1, -33.5, -33.8, -10.0, -300.0, -400.0, -500.0 + }; // Special cases from Math.pow javadoc: // If the second argument is positive or negative zero, then the result is 1.0. @@ -558,11 +559,15 @@ public class AccurateMathTest { for (double i : DOUBLES) { if (Math.abs(i) <= Double.MAX_VALUE) { // if the second argument is a finite even integer, the result is equal to the result of raising the absolute value of the first argument to the power of the second argument - if (i % 2.0 == 0.0) assertEquals(AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); - // if the second argument is a finite odd integer, the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument - else if (Math.abs(i) % 2.0 == 1.0) assertEquals(-AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); - // if the second argument is finite and not an integer, then the result is NaN. - else assertEquals(Double.NaN, AccurateMath.pow(d, i), EXACT); + if (i % 2.0 == 0.0) { + assertEquals(AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); + } else if (Math.abs(i) % 2.0 == 1.0) { + // if the second argument is a finite odd integer, the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument + assertEquals(-AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); + } else { + // if the second argument is finite and not an integer, then the result is NaN. + assertEquals(Double.NaN, AccurateMath.pow(d, i), EXACT); + } } } } @@ -572,7 +577,7 @@ public class AccurateMathTest { final int TOO_BIG_TO_CALCULATE = 18; // This value is empirical: 2^18 > 200.000 resulting bits after raising d to power i. for (double d : DOUBLES) { if (d % 1.0 == 0.0) { - boolean dNegative = Double.doubleToRawLongBits( d ) < 0L; + boolean dNegative = Double.doubleToRawLongBits(d) < 0L; for (double i : DOUBLES) { if (i % 1.0 == 0.0) { BigInteger bd = BigDecimal.valueOf(d).toBigInteger().abs(); @@ -588,10 +593,10 @@ public class AccurateMathTest { } else if (res.signum() == 0) { expected = Double.POSITIVE_INFINITY; } else { - expected = BigDecimal.ONE.divide( new BigDecimal( res ), 1024, RoundingMode.HALF_UP ).doubleValue(); + expected = BigDecimal.ONE.divide(new BigDecimal(res), 1024, RoundingMode.HALF_UP).doubleValue(); } } - if (dNegative && bi.testBit( 0 )) { + if (dNegative && bi.testBit(0)) { expected = -expected; } assertEquals(d + "^" + i + "=" + expected + ", Math.pow=" + Math.pow(d, i), expected, AccurateMath.pow(d, i), expected == 0.0 || Double.isInfinite(expected) || Double.isNaN(expected) ? EXACT : 2.0 * Math.ulp(expected)); @@ -641,7 +646,7 @@ public class AccurateMathTest { AccurateMath.atan2(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY), Precision.EPSILON); assertEquals("atan2(-Inf, Inf) should be -PI/4", -AccurateMath.PI / 4.0, AccurateMath.atan2(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY), Precision.EPSILON); - assertEquals("atan2(-Inf, -Inf) should be -PI * 3/4", - AccurateMath.PI * 3.0 / 4.0, + assertEquals("atan2(-Inf, -Inf) should be -PI * 3/4", -AccurateMath.PI * 3.0 / 4.0, AccurateMath.atan2(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY), Precision.EPSILON); } @@ -891,7 +896,7 @@ public class AccurateMathTest { public void testAsinAccuracy() { double maxerrulp = 0.0; - for (int i=0; i<10000; i++) { + for (int i = 0; i < 10000; i++) { double x = ((generator.nextDouble() * 2.0) - 1.0) * generator.nextDouble(); double tst = AccurateMath.asin(x); @@ -914,7 +919,7 @@ public class AccurateMathTest { public void testAcosAccuracy() { double maxerrulp = 0.0; - for (int i=0; i<10000; i++) { + for (int i = 0; i < 10000; i++) { double x = ((generator.nextDouble() * 2.0) - 1.0) * generator.nextDouble(); double tst = AccurateMath.acos(x); @@ -962,22 +967,22 @@ public class AccurateMathTest { } private Dfp cosh(Dfp x) { - return DfpMath.exp(x).add(DfpMath.exp(x.negate())).divide(2); + return DfpMath.exp(x).add(DfpMath.exp(x.negate())).divide(2); } private Dfp sinh(Dfp x) { - return DfpMath.exp(x).subtract(DfpMath.exp(x.negate())).divide(2); + return DfpMath.exp(x).subtract(DfpMath.exp(x.negate())).divide(2); } private Dfp tanh(Dfp x) { - return sinh(x).divide(cosh(x)); + return sinh(x).divide(cosh(x)); } @Test public void testSinhAccuracy() { double maxerrulp = 0.0; - for (int i=0; i<10000; i++) { + for (int i = 0; i < 10000; i++) { double x = ((generator.nextDouble() * 16.0) - 8.0) * generator.nextDouble(); double tst = AccurateMath.sinh(x); @@ -999,7 +1004,7 @@ public class AccurateMathTest { public void testCoshAccuracy() { double maxerrulp = 0.0; - for (int i=0; i<10000; i++) { + for (int i = 0; i < 10000; i++) { double x = ((generator.nextDouble() * 16.0) - 8.0) * generator.nextDouble(); double tst = AccurateMath.cosh(x); @@ -1021,7 +1026,7 @@ public class AccurateMathTest { public void testTanhAccuracy() { double maxerrulp = 0.0; - for (int i=0; i<10000; i++) { + for (int i = 0; i < 10000; i++) { double x = ((generator.nextDouble() * 16.0) - 8.0) * generator.nextDouble(); double tst = AccurateMath.tanh(x); @@ -1043,7 +1048,7 @@ public class AccurateMathTest { public void testCbrtAccuracy() { double maxerrulp = 0.0; - for (int i=0; i<10000; i++) { + for (int i = 0; i < 10000; i++) { double x = ((generator.nextDouble() * 200.0) - 100.0) * generator.nextDouble(); double tst = AccurateMath.cbrt(x); @@ -1062,7 +1067,7 @@ public class AccurateMathTest { } private Dfp cbrt(Dfp x) { - boolean negative=false; + boolean negative = false; if (x.lessThan(field.getZero())) { negative = true; @@ -1187,11 +1192,11 @@ public class AccurateMathTest { @Test public void testDoubleNextAfterSpecialCases() { - assertEquals(-Double.MAX_VALUE,AccurateMath.nextAfter(Double.NEGATIVE_INFINITY, 0D), 0D); - assertEquals(Double.MAX_VALUE,AccurateMath.nextAfter(Double.POSITIVE_INFINITY, 0D), 0D); - assertEquals(Double.NaN,AccurateMath.nextAfter(Double.NaN, 0D), 0D); - assertEquals(Double.POSITIVE_INFINITY,AccurateMath.nextAfter(Double.MAX_VALUE, Double.POSITIVE_INFINITY), 0D); - assertEquals(Double.NEGATIVE_INFINITY,AccurateMath.nextAfter(-Double.MAX_VALUE, Double.NEGATIVE_INFINITY), 0D); + assertEquals(-Double.MAX_VALUE, AccurateMath.nextAfter(Double.NEGATIVE_INFINITY, 0D), 0D); + assertEquals(Double.MAX_VALUE, AccurateMath.nextAfter(Double.POSITIVE_INFINITY, 0D), 0D); + assertEquals(Double.NaN, AccurateMath.nextAfter(Double.NaN, 0D), 0D); + assertEquals(Double.POSITIVE_INFINITY, AccurateMath.nextAfter(Double.MAX_VALUE, Double.POSITIVE_INFINITY), 0D); + assertEquals(Double.NEGATIVE_INFINITY, AccurateMath.nextAfter(-Double.MAX_VALUE, Double.NEGATIVE_INFINITY), 0D); assertEquals(Double.MIN_VALUE, AccurateMath.nextAfter(0D, 1D), 0D); assertEquals(-Double.MIN_VALUE, AccurateMath.nextAfter(0D, -1D), 0D); assertEquals(0D, AccurateMath.nextAfter(Double.MIN_VALUE, -1), 0D); @@ -1228,11 +1233,11 @@ public class AccurateMathTest { assertEquals(Double.NEGATIVE_INFINITY, AccurateMath.scalb(-2.2250738585072014E-308, 2047), 0D); assertEquals(Double.NEGATIVE_INFINITY, AccurateMath.scalb(-2.2250738585072014E-308, 2048), 0D); assertEquals(Double.NEGATIVE_INFINITY, AccurateMath.scalb(-1.7976931348623157E308, 2147483647), 0D); - assertEquals(Double.POSITIVE_INFINITY, AccurateMath.scalb( 1.7976931348623157E308, 2147483647), 0D); + assertEquals(Double.POSITIVE_INFINITY, AccurateMath.scalb(+1.7976931348623157E308, 2147483647), 0D); assertEquals(Double.NEGATIVE_INFINITY, AccurateMath.scalb(-1.1102230246251565E-16, 2147483647), 0D); - assertEquals(Double.POSITIVE_INFINITY, AccurateMath.scalb( 1.1102230246251565E-16, 2147483647), 0D); + assertEquals(Double.POSITIVE_INFINITY, AccurateMath.scalb(+1.1102230246251565E-16, 2147483647), 0D); assertEquals(Double.NEGATIVE_INFINITY, AccurateMath.scalb(-2.2250738585072014E-308, 2147483647), 0D); - assertEquals(Double.POSITIVE_INFINITY, AccurateMath.scalb( 2.2250738585072014E-308, 2147483647), 0D); + assertEquals(Double.POSITIVE_INFINITY, AccurateMath.scalb(+2.2250738585072014E-308, 2147483647), 0D); } @Test @@ -1253,16 +1258,16 @@ public class AccurateMathTest { assertEquals(Float.NEGATIVE_INFINITY, AccurateMath.scalb(-3.4028235E38f, 2147483647), 0F); } - private boolean compareClassMethods(Class class1, Class class2){ + private boolean compareClassMethods(Class class1, Class class2) { boolean allfound = true; - for(Method method1 : class1.getDeclaredMethods()){ - if (Modifier.isPublic(method1.getModifiers())){ - Type []params = method1.getGenericParameterTypes(); + for (Method method1 : class1.getDeclaredMethods()) { + if (Modifier.isPublic(method1.getModifiers())) { + Type[] params = method1.getGenericParameterTypes(); try { class2.getDeclaredMethod(method1.getName(), (Class[]) params); } catch (NoSuchMethodException e) { allfound = false; - System.out.println(class2.getSimpleName()+" does not implement: "+method1); + System.out.println(class2.getSimpleName() + " does not implement: " + method1); } } } @@ -1337,10 +1342,10 @@ public class AccurateMathTest { @Test public void testIntPow() { final int maxExp = 300; - DfpField field = new DfpField(40); + DfpField localField = new DfpField(40); final double base = 1.23456789; - Dfp baseDfp = field.newDfp(base); - Dfp dfpPower = field.getOne(); + Dfp baseDfp = localField.newDfp(base); + Dfp dfpPower = localField.getOne(); for (int i = 0; i < maxExp; i++) { assertEquals("exp=" + i, dfpPower.toDouble(), AccurateMath.pow(base, i), 0.6 * AccurateMath.ulp(dfpPower.toDouble())); @@ -1353,28 +1358,27 @@ public class AccurateMathTest { assertTrue(Double.isInfinite(AccurateMath.pow(AccurateMath.scalb(1.0, 500), 4))); } - @Test(timeout=5000L) // This test must finish in finite time. + @Test(timeout = 5000L) // This test must finish in finite time. public void testIntPowLongMinValue() { assertEquals(1.0, AccurateMath.pow(1.0, Long.MIN_VALUE), -1.0); } - @Test(timeout=5000L) + @Test(timeout = 5000L) public void testIntPowSpecialCases() { final double EXACT = -1.0; - final double DOUBLES[] = new double[] - { - Double.NEGATIVE_INFINITY, -0.0, Double.NaN, 0.0, Double.POSITIVE_INFINITY, - Long.MIN_VALUE, Integer.MIN_VALUE, Short.MIN_VALUE, Byte.MIN_VALUE, - -(double)Long.MIN_VALUE, -(double)Integer.MIN_VALUE, -(double)Short.MIN_VALUE, -(double)Byte.MIN_VALUE, - Byte.MAX_VALUE, Short.MAX_VALUE, Integer.MAX_VALUE, Long.MAX_VALUE, - -Byte.MAX_VALUE, -Short.MAX_VALUE, -Integer.MAX_VALUE, -Long.MAX_VALUE, - Float.MAX_VALUE, Double.MAX_VALUE, Double.MIN_VALUE, Float.MIN_VALUE, - -Float.MAX_VALUE, -Double.MAX_VALUE, -Double.MIN_VALUE, -Float.MIN_VALUE, - 0.5, 0.1, 0.2, 0.8, 1.1, 1.2, 1.5, 1.8, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 1.3, 2.2, 2.5, 2.8, 33.0, 33.1, 33.5, 33.8, 10.0, 300.0, 400.0, 500.0, - -0.5, -0.1, -0.2, -0.8, -1.1, -1.2, -1.5, -1.8, -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -1.3, -2.2, -2.5, -2.8, -33.0, -33.1, -33.5, -33.8, -10.0, -300.0, -400.0, -500.0 - }; + final double[] DOUBLES = new double[] { + Double.NEGATIVE_INFINITY, -0.0, Double.NaN, 0.0, Double.POSITIVE_INFINITY, + Long.MIN_VALUE, Integer.MIN_VALUE, Short.MIN_VALUE, Byte.MIN_VALUE, + -(double)Long.MIN_VALUE, -(double)Integer.MIN_VALUE, -(double)Short.MIN_VALUE, -(double)Byte.MIN_VALUE, + Byte.MAX_VALUE, Short.MAX_VALUE, Integer.MAX_VALUE, Long.MAX_VALUE, + -Byte.MAX_VALUE, -Short.MAX_VALUE, -Integer.MAX_VALUE, -Long.MAX_VALUE, + Float.MAX_VALUE, Double.MAX_VALUE, Double.MIN_VALUE, Float.MIN_VALUE, + -Float.MAX_VALUE, -Double.MAX_VALUE, -Double.MIN_VALUE, -Float.MIN_VALUE, + 0.5, 0.1, 0.2, 0.8, 1.1, 1.2, 1.5, 1.8, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 1.3, 2.2, 2.5, 2.8, 33.0, 33.1, 33.5, 33.8, 10.0, 300.0, 400.0, 500.0, + -0.5, -0.1, -0.2, -0.8, -1.1, -1.2, -1.5, -1.8, -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -1.3, -2.2, -2.5, -2.8, -33.0, -33.1, -33.5, -33.8, -10.0, -300.0, -400.0, -500.0 + }; - final long INTS[] = new long[]{Long.MAX_VALUE, Long.MAX_VALUE - 1, Long.MIN_VALUE, Long.MIN_VALUE + 1, Long.MIN_VALUE + 2, Integer.MAX_VALUE, Integer.MAX_VALUE - 1, Integer.MIN_VALUE, Integer.MIN_VALUE + 1, Integer.MIN_VALUE + 2, 0, 1, 2, 3, 5, 8, 10, 20, 100, 300, 500, -1, -2, -3, -5, -8, -10, -20, -100, -300, -500}; + final long[] INTS = new long[]{Long.MAX_VALUE, Long.MAX_VALUE - 1, Long.MIN_VALUE, Long.MIN_VALUE + 1, Long.MIN_VALUE + 2, Integer.MAX_VALUE, Integer.MAX_VALUE - 1, Integer.MIN_VALUE, Integer.MIN_VALUE + 1, Integer.MIN_VALUE + 2, 0, 1, 2, 3, 5, 8, 10, 20, 100, 300, 500, -1, -2, -3, -5, -8, -10, -20, -100, -300, -500}; // Special cases from Math.pow javadoc: // If the second argument is positive or negative zero, then the result is 1.0. for (double d : DOUBLES) { @@ -1515,9 +1519,12 @@ public class AccurateMathTest { if (d < 0.0 && Math.abs(d) <= Double.MAX_VALUE) { for (long i : INTS) { // if the second argument is a finite even integer, the result is equal to the result of raising the absolute value of the first argument to the power of the second argument - if ((i & 1L) == 0L) assertEquals(AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); - // if the second argument is a finite odd integer, the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument - else assertEquals(-AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); + if ((i & 1L) == 0L) { + assertEquals(AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); + } else { + // if the second argument is a finite odd integer, the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument + assertEquals(-AccurateMath.pow(-d, i), AccurateMath.pow(d, i), EXACT); + } // if the second argument is finite and not an integer, then the result is NaN. <- Impossible with int. } } @@ -1752,23 +1759,23 @@ public class AccurateMathTest { } } - @Test(expected=MathArithmeticException.class) + @Test(expected = MathArithmeticException.class) public void testToIntExactTooLow() { - AccurateMath.toIntExact(-1l + Integer.MIN_VALUE); + AccurateMath.toIntExact(-1L + Integer.MIN_VALUE); } - @Test(expected=MathArithmeticException.class) + @Test(expected = MathArithmeticException.class) public void testToIntExactTooHigh() { - AccurateMath.toIntExact(+1l + Integer.MAX_VALUE); + AccurateMath.toIntExact(+1L + Integer.MAX_VALUE); } @Test public void testToIntExact() { for (int n = -1000; n < 1000; ++n) { - assertEquals(n, AccurateMath.toIntExact(0l + n)); + assertEquals(n, AccurateMath.toIntExact(0L + n)); } - assertEquals(Integer.MIN_VALUE, AccurateMath.toIntExact(0l + Integer.MIN_VALUE)); - assertEquals(Integer.MAX_VALUE, AccurateMath.toIntExact(0l + Integer.MAX_VALUE)); + assertEquals(Integer.MIN_VALUE, AccurateMath.toIntExact(0L + Integer.MIN_VALUE)); + assertEquals(Integer.MAX_VALUE, AccurateMath.toIntExact(0L + Integer.MAX_VALUE)); } @Test @@ -1815,11 +1822,11 @@ public class AccurateMathTest { @Test public void testFloorDivModInt() { - UniformRandomProvider generator = RandomSource.create(RandomSource.WELL_1024_A, - 0x7ccab45edeaab90al); + UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_1024_A, + 0x7ccab45edeaab90aL); for (int i = 0; i < 10000; ++i) { - int a = generator.nextInt(); - int b = generator.nextInt(); + int a = rng.nextInt(); + int b = rng.nextInt(); if (b == 0) { try { AccurateMath.floorDiv(a, b); @@ -1846,18 +1853,18 @@ public class AccurateMathTest { @Test public void testFloorDivLong() { - assertEquals(+1l, AccurateMath.floorDiv(+4l, +3l)); - assertEquals(-2l, AccurateMath.floorDiv(-4l, +3l)); - assertEquals(-2l, AccurateMath.floorDiv(+4l, -3l)); - assertEquals(+1l, AccurateMath.floorDiv(-4l, -3l)); + assertEquals(+1L, AccurateMath.floorDiv(+4L, +3L)); + assertEquals(-2L, AccurateMath.floorDiv(-4L, +3L)); + assertEquals(-2L, AccurateMath.floorDiv(+4L, -3L)); + assertEquals(+1L, AccurateMath.floorDiv(-4L, -3L)); try { - AccurateMath.floorDiv(1l, 0l); + AccurateMath.floorDiv(1L, 0L); fail("an exception should have been thrown"); } catch (MathArithmeticException mae) { // expected } - for (long a = -100l; a <= 100l; ++a) { - for (long b = -100l; b <= 100l; ++b) { + for (long a = -100L; a <= 100L; ++a) { + for (long b = -100L; b <= 100L; ++b) { if (b != 0) { assertEquals(poorManFloorDiv(a, b), AccurateMath.floorDiv(a, b)); } @@ -1867,18 +1874,18 @@ public class AccurateMathTest { @Test public void testFloorModLong() { - assertEquals(+1l, AccurateMath.floorMod(+4l, +3l)); - assertEquals(+2l, AccurateMath.floorMod(-4l, +3l)); - assertEquals(-2l, AccurateMath.floorMod(+4l, -3l)); - assertEquals(-1l, AccurateMath.floorMod(-4l, -3l)); + assertEquals(+1L, AccurateMath.floorMod(+4L, +3L)); + assertEquals(+2L, AccurateMath.floorMod(-4L, +3L)); + assertEquals(-2L, AccurateMath.floorMod(+4L, -3L)); + assertEquals(-1L, AccurateMath.floorMod(-4L, -3L)); try { - AccurateMath.floorMod(1l, 0l); + AccurateMath.floorMod(1L, 0L); fail("an exception should have been thrown"); } catch (MathArithmeticException mae) { // expected } - for (long a = -100l; a <= 100l; ++a) { - for (long b = -100l; b <= 100l; ++b) { + for (long a = -100L; a <= 100L; ++a) { + for (long b = -100L; b <= 100L; ++b) { if (b != 0) { assertEquals(poorManFloorMod(a, b), AccurateMath.floorMod(a, b)); } @@ -1888,11 +1895,11 @@ public class AccurateMathTest { @Test public void testFloorDivModLong() { - UniformRandomProvider generator = RandomSource.create(RandomSource.WELL_1024_A, - 0xb87b9bc14c96ccd5l); + UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_1024_A, + 0xb87b9bc14c96ccd5L); for (int i = 0; i < 10000; ++i) { - long a = generator.nextLong(); - long b = generator.nextLong(); + long a = rng.nextLong(); + long b = rng.nextLong(); if (b == 0) { try { AccurateMath.floorDiv(a, b); @@ -1931,7 +1938,7 @@ public class AccurateMathTest { BigInteger q = q0.subtract(bigK); BigInteger r = r0.add(bigK.multiply(bigB)); if (r.abs().compareTo(bigB.abs()) < 0 && - (r.longValue() == 0l || ((r.longValue() ^ b) & 0x8000000000000000l) == 0)) { + (r.longValue() == 0L || ((r.longValue() ^ b) & 0x8000000000000000L) == 0)) { if (fd.compareTo(q) < 0) { fd = q; } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ConvergenceException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ConvergenceException.java index 3815f3171..8e3966d22 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ConvergenceException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ConvergenceException.java @@ -43,7 +43,7 @@ public class ConvergenceException extends MathIllegalStateException { * the error. * @param args Arguments. */ - public ConvergenceException(Localizable pattern, Object ... args) { + public ConvergenceException(Localizable pattern, Object... args) { getContext().addMessage(pattern, args); } } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathArithmeticException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathArithmeticException.java index 545f32e97..64f9d7036 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathArithmeticException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathArithmeticException.java @@ -45,7 +45,7 @@ public class MathArithmeticException extends MathRuntimeException { * the error. * @param args Arguments. */ - public MathArithmeticException(Localizable pattern, Object ... args) { + public MathArithmeticException(Localizable pattern, Object... args) { super(pattern, args); } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalArgumentException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalArgumentException.java index f64a03333..8834ef503 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalArgumentException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalArgumentException.java @@ -34,7 +34,7 @@ public class MathIllegalArgumentException extends MathRuntimeException { * @param pattern Message pattern explaining the cause of the error. * @param args Arguments. */ - public MathIllegalArgumentException(Localizable pattern, Object ... args) { + public MathIllegalArgumentException(Localizable pattern, Object... args) { super(pattern, args); } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalNumberException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalNumberException.java index 4441b2d9c..387ca4323 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalNumberException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalNumberException.java @@ -46,7 +46,7 @@ public class MathIllegalNumberException extends MathIllegalArgumentException { */ protected MathIllegalNumberException(Localizable pattern, Number wrong, - Object ... arguments) { + Object... arguments) { super(pattern, wrong, arguments); argument = wrong; } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalStateException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalStateException.java index 3a416b022..1fd8dd86d 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalStateException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathIllegalStateException.java @@ -36,7 +36,7 @@ public class MathIllegalStateException extends MathRuntimeException { * @param pattern Message pattern explaining the cause of the error. * @param args Arguments. */ - public MathIllegalStateException(Localizable pattern, Object ... args) { + public MathIllegalStateException(Localizable pattern, Object... args) { super(pattern, args); } @@ -49,7 +49,7 @@ public class MathIllegalStateException extends MathRuntimeException { */ public MathIllegalStateException(Throwable cause, Localizable pattern, - Object ... args) { + Object... args) { super(cause, pattern, args); } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathInternalError.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathInternalError.java index 0d277ab92..c71961795 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathInternalError.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathInternalError.java @@ -51,7 +51,7 @@ public class MathInternalError extends MathIllegalStateException { * @param pattern Message pattern explaining the cause of the error. * @param args Arguments. */ - public MathInternalError(Localizable pattern, Object ... args) { + public MathInternalError(Localizable pattern, Object... args) { super(pattern, args); } } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathRuntimeException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathRuntimeException.java index 434708026..7c076b659 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathRuntimeException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathRuntimeException.java @@ -41,7 +41,7 @@ public class MathRuntimeException extends RuntimeException * @param args Arguments. */ public MathRuntimeException(Localizable pattern, - Object ... args) { + Object... args) { context = new ExceptionContext(this); context.addMessage(pattern, args); } @@ -54,7 +54,7 @@ public class MathRuntimeException extends RuntimeException */ public MathRuntimeException(Throwable cause, Localizable pattern, - Object ... args) { + Object... args) { super(cause); context = new ExceptionContext(this); context.addMessage(pattern, args); diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathUnsupportedOperationException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathUnsupportedOperationException.java index 0a821fdc3..465243360 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathUnsupportedOperationException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathUnsupportedOperationException.java @@ -42,7 +42,7 @@ public class MathUnsupportedOperationException extends MathRuntimeException { * the error. * @param args Arguments. */ - public MathUnsupportedOperationException(Localizable pattern, Object ... args) { + public MathUnsupportedOperationException(Localizable pattern, Object... args) { super(pattern, args); } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MaxCountExceededException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MaxCountExceededException.java index f99f500e1..ee463726b 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MaxCountExceededException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MaxCountExceededException.java @@ -49,7 +49,7 @@ public class MaxCountExceededException extends MathIllegalStateException { */ public MaxCountExceededException(Localizable specific, Number max, - Object ... args) { + Object... args) { getContext().addMessage(specific, max, args); this.max = max; } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NoBracketingException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NoBracketingException.java index 4fce689a4..5b28e42fb 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NoBracketingException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NoBracketingException.java @@ -63,7 +63,7 @@ public class NoBracketingException extends MathIllegalArgumentException { public NoBracketingException(Localizable specific, double lo, double hi, double fLo, double fHi, - Object ... args) { + Object... args) { super(specific, Double.valueOf(lo), Double.valueOf(hi), Double.valueOf(fLo), Double.valueOf(fHi), args); this.lo = lo; this.hi = hi; diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberException.java index ea87fec1a..1930919c6 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberException.java @@ -35,7 +35,7 @@ public class NotFiniteNumberException extends MathIllegalNumberException { * @param args Optional arguments. */ public NotFiniteNumberException(Number wrong, - Object ... args) { + Object... args) { this(LocalizedFormats.NOT_FINITE_NUMBER, wrong, args); } @@ -48,7 +48,7 @@ public class NotFiniteNumberException extends MathIllegalNumberException { */ public NotFiniteNumberException(Localizable specific, Number wrong, - Object ... args) { + Object... args) { super(specific, wrong, args); } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NullArgumentException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NullArgumentException.java index 2fec3fef9..ec371bb20 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NullArgumentException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/NullArgumentException.java @@ -55,7 +55,7 @@ public class NullArgumentException extends NullPointerException * @param arguments Values for replacing the placeholders in {@code pattern}. */ public NullArgumentException(Localizable pattern, - Object ... arguments) { + Object... arguments) { context = new ExceptionContext(this); context.addMessage(pattern, arguments); } @@ -91,7 +91,7 @@ public class NullArgumentException extends NullPointerException */ public static void check(Object o, Localizable pattern, - Object ... args) { + Object... args) { if (o == null) { throw new NullArgumentException(pattern, args); } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ZeroException.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ZeroException.java index be9fc0301..88ebee476 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ZeroException.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/ZeroException.java @@ -26,7 +26,7 @@ import org.apache.commons.math4.legacy.exception.util.LocalizedFormats; */ public class ZeroException extends MathIllegalNumberException { - /** Serializable version identifier */ + /** Serializable version identifier. */ private static final long serialVersionUID = -1960874856936000015L; /** @@ -42,7 +42,7 @@ public class ZeroException extends MathIllegalNumberException { * @param specific Specific context pattern. * @param arguments Arguments. */ - public ZeroException(Localizable specific, Object ... arguments) { + public ZeroException(Localizable specific, Object... arguments) { super(specific, INTEGER_ZERO, arguments); } } diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ArgUtils.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ArgUtils.java index 02ce751cf..98fa9014d 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ArgUtils.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ArgUtils.java @@ -23,9 +23,8 @@ import java.util.ArrayList; /** * Utility class for transforming the list of arguments passed to * constructors of exceptions. - * */ -public class ArgUtils { +public final class ArgUtils { /** * Class contains only static methods. */ diff --git a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ExceptionContext.java b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ExceptionContext.java index 6e1ebc35d..89725c752 100644 --- a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ExceptionContext.java +++ b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/ExceptionContext.java @@ -82,7 +82,7 @@ public class ExceptionContext implements Serializable { * pattern. */ public void addMessage(Localizable pattern, - Object ... arguments) { + Object... arguments) { msgPatterns.add(pattern); msgArguments.add(ArgUtils.flatten(arguments)); } @@ -110,7 +110,7 @@ public class ExceptionContext implements Serializable { } /** - * Gets all the keys stored in the exception + * Gets all the keys stored in the exception. * * @return the set of keys. */ @@ -285,7 +285,7 @@ public class ExceptionContext implements Serializable { // Step 1. final int len = context.size(); out.writeInt(len); - for (Map.Entry entry : context.entrySet()) { + for (Map.Entry entry : context.entrySet()) { // Step 2. out.writeObject(entry.getKey()); final Object value = entry.getValue(); @@ -328,7 +328,7 @@ public class ExceptionContext implements Serializable { * interface. * @return a string that mentions which class could not be serialized. */ - private String nonSerializableReplacement(Object obj) { + private static String nonSerializableReplacement(Object obj) { return "[Object could not be serialized: " + obj.getClass().getName() + "]"; } } diff --git a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberExceptionTest.java b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberExceptionTest.java index e5a3f5410..3ca09802c 100644 --- a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberExceptionTest.java +++ b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NotFiniteNumberExceptionTest.java @@ -1,23 +1,24 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to You under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law - * or agreed to in writing, software distributed under the License is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the specific language - * governing permissions and limitations under the License. + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.commons.math4.legacy.exception; import org.junit.Assert; import org.junit.Test; -import org.apache.commons.math4.legacy.exception.util.LocalizedFormats; - /** * Tests for {@link NotFiniteNumberException}. */ diff --git a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NullArgumentExceptionTest.java b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NullArgumentExceptionTest.java index 6dd73be97..56548cfa1 100644 --- a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NullArgumentExceptionTest.java +++ b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/NullArgumentExceptionTest.java @@ -1,19 +1,21 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to You under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law - * or agreed to in writing, software distributed under the License is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the specific language - * governing permissions and limitations under the License. + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.commons.math4.legacy.exception; -import org.junit.Assert; import org.junit.Test; import org.apache.commons.math4.legacy.exception.util.LocalizedFormats; diff --git a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/ExceptionContextTest.java b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/ExceptionContextTest.java index b202282fd..374c7cfab 100644 --- a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/ExceptionContextTest.java +++ b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/ExceptionContextTest.java @@ -107,18 +107,16 @@ public class ExceptionContextTest { String key = "Key 1"; cOut.setValue(key, new Unserializable()); - { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(cOut); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(cOut); - ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); - ObjectInputStream ois = new ObjectInputStream(bis); - ExceptionContext cIn = (ExceptionContext) ois.readObject(); + ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); + ObjectInputStream ois = new ObjectInputStream(bis); + ExceptionContext cIn = (ExceptionContext) ois.readObject(); - String nsObjStr = (String) cIn.getValue(key); - Assert.assertTrue(nsObjStr.matches(".*could not be serialized.*")); - } + String nsObjStr = (String) cIn.getValue(key); + Assert.assertTrue(nsObjStr.matches(".*could not be serialized.*")); } /** diff --git a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormatsTest.java b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormatsTest.java index c1257fab4..e50dd7d8a 100644 --- a/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormatsTest.java +++ b/commons-math-legacy-exception/src/test/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormatsTest.java @@ -35,7 +35,7 @@ public class LocalizedFormatsTest { @Test public void testAllKeysPresentInPropertiesFiles() { final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/"); - for (final String language : new String[] { "fr" } ) { + for (final String language : new String[] {"fr"}) { ResourceBundle bundle = ResourceBundle.getBundle("assets/" + path, new Locale(language)); for (LocalizedFormats message : LocalizedFormats.values()) { @@ -55,7 +55,7 @@ public class LocalizedFormatsTest { @Test public void testAllPropertiesCorrespondToKeys() { final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/"); - for (final String language : new String[] { "fr" } ) { + for (final String language : new String[] {"fr"}) { ResourceBundle bundle = ResourceBundle.getBundle("assets/" + path, new Locale(language)); for (final Enumeration keys = bundle.getKeys(); keys.hasMoreElements();) { @@ -89,7 +89,7 @@ public class LocalizedFormatsTest { @Test public void testVariablePartsConsistency() { - for (final String language : new String[] { "fr" } ) { + for (final String language : new String[] {"fr"}) { Locale locale = new Locale(language); for (LocalizedFormats message : LocalizedFormats.values()) { MessageFormat source = new MessageFormat(message.getSourceString()); diff --git a/commons-math-legacy/pom.xml b/commons-math-legacy/pom.xml index a806843a1..9f2438ced 100644 --- a/commons-math-legacy/pom.xml +++ b/commons-math-legacy/pom.xml @@ -145,6 +145,14 @@ true + + org.apache.maven.plugins + maven-checkstyle-plugin + + ${math.parent.dir}/src/main/resources/checkstyle/checkstyle-legacy.xml + ${math.parent.dir}/src/main/resources/checkstyle/checkstyle-suppressions-legacy.xml + + diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/DistanceMeasure.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/DistanceMeasure.java index 68d846dcb..31004e0cc 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/DistanceMeasure.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/DistanceMeasure.java @@ -24,4 +24,6 @@ import java.util.function.ToDoubleBiFunction; * * @since 4.0 */ -public interface DistanceMeasure extends ToDoubleBiFunction {} +public interface DistanceMeasure extends ToDoubleBiFunction { + // Convenience interface +} diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/FeatureInitializerFactory.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/FeatureInitializerFactory.java index 60f511c19..8a1d5e921 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/FeatureInitializerFactory.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/FeatureInitializerFactory.java @@ -20,7 +20,6 @@ package org.apache.commons.math4.neuralnet; import java.util.function.DoubleUnaryOperator; import org.apache.commons.rng.UniformRandomProvider; -import org.apache.commons.rng.simple.RandomSource; import org.apache.commons.rng.sampling.distribution.ContinuousUniformSampler; /** @@ -29,7 +28,7 @@ import org.apache.commons.rng.sampling.distribution.ContinuousUniformSampler; * * @since 3.3 */ -public class FeatureInitializerFactory { +public final class FeatureInitializerFactory { /** Class contains only static methods. */ private FeatureInitializerFactory() {} @@ -48,7 +47,7 @@ public class FeatureInitializerFactory { final double min, final double max) { return randomize(new ContinuousUniformSampler(rng, min, max), - function((x) -> 0, 0, 0)); + function(x -> 0, 0, 0)); } /** diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapRanking.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapRanking.java index 09b875b68..903301c34 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapRanking.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapRanking.java @@ -123,13 +123,13 @@ public class MapRanking { /** Comparator. */ static final Comparator COMPARATOR = new Comparator() { - /** {@inheritDoc} */ - @Override - public int compare(PairNeuronDouble o1, - PairNeuronDouble o2) { - return Double.compare(o1.value, o2.value); - } - }; + /** {@inheritDoc} */ + @Override + public int compare(PairNeuronDouble o1, + PairNeuronDouble o2) { + return Double.compare(o1.value, o2.value); + } + }; /** Key. */ private final Neuron neuron; /** Value. */ diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapUtils.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapUtils.java index 985d5102a..ea4f070b1 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapUtils.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/MapUtils.java @@ -26,7 +26,7 @@ import org.apache.commons.math4.neuralnet.internal.NeuralNetException; * * @since 3.3 */ -public class MapUtils { +public final class MapUtils { /** * Class contains only static methods. */ diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/internal/package-info.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/internal/package-info.java new file mode 100644 index 000000000..bd9599b8f --- /dev/null +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/internal/package-info.java @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Internal utility classes. + */ + +package org.apache.commons.math4.neuralnet.internal; diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/oned/NeuronString.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/oned/NeuronString.java index 5c998b2d1..8ab80c27e 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/oned/NeuronString.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/oned/NeuronString.java @@ -31,7 +31,7 @@ import org.apache.commons.math4.neuralnet.Network; * @since 3.3 */ public class NeuronString implements Serializable { - /** Serial version ID */ + /** Serial version ID. */ private static final long serialVersionUID = 1L; /** Underlying network. */ private final Network network; diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateAction.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateAction.java index 917551ac5..1220905cf 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateAction.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateAction.java @@ -240,8 +240,8 @@ public class KohonenUpdateAction implements UpdateAction { * @param norm Normalization factor. * @param sigma Standard deviation. */ - public Gaussian(double norm, - double sigma) { + Gaussian(double norm, + double sigma) { this.norm = norm; i2s2 = 1d / (2 * sigma * sigma); } diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactory.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactory.java index 0eaeeff1a..22f0b8aa9 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactory.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactory.java @@ -26,7 +26,7 @@ import org.apache.commons.math4.neuralnet.sofm.util.QuasiSigmoidDecayFunction; * * @since 3.3 */ -public class LearningFactorFunctionFactory { +public final class LearningFactorFunctionFactory { /** Class contains only static methods. */ private LearningFactorFunctionFactory() {} diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactory.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactory.java index d2b81be15..55c1acfd6 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactory.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactory.java @@ -25,7 +25,7 @@ import org.apache.commons.math4.neuralnet.sofm.util.QuasiSigmoidDecayFunction; * * @since 3.3 */ -public class NeighbourhoodSizeFunctionFactory { +public final class NeighbourhoodSizeFunctionFactory { /** Class contains only static methods. */ private NeighbourhoodSizeFunctionFactory() {} diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunction.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunction.java index 3873b8f65..bf25f2240 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunction.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunction.java @@ -66,7 +66,7 @@ public class QuasiSigmoidDecayFunction implements LongToDoubleFunction { final double k = initValue; final double m = numCall; final double b = 4 * slope / initValue; - sigmoid = (x) -> k / (1 + Math.exp(b * (m - x))); + sigmoid = x -> k / (1 + Math.exp(b * (m - x))); final double y0 = sigmoid.applyAsDouble(0d); scale = k / y0; diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2D.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2D.java index de0718bb3..f3e504353 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2D.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2D.java @@ -48,7 +48,7 @@ import org.apache.commons.math4.neuralnet.twod.util.LocationFinder; public class NeuronSquareMesh2D implements Iterable, Serializable { - /** Serial version ID */ + /** Serial version ID. */ private static final long serialVersionUID = 1L; /** Underlying network. */ private final Network network; @@ -430,9 +430,9 @@ public class NeuronSquareMesh2D colIndex >= numberOfColumns) { return null; } else { - return new int[] { rowIndex, colIndex }; + return new int[] {rowIndex, colIndex}; } - } + } /** * Creates the neighbour relationships between neurons. @@ -492,12 +492,12 @@ public class NeuronSquareMesh2D linkEnd.add(identifiers[i + 1][jLast]); } } else if (j == jLast) { - if (i > 0) { - linkEnd.add(identifiers[i - 1][0]); - } - if (i < iLast) { - linkEnd.add(identifiers[i + 1][0]); - } + if (i > 0) { + linkEnd.add(identifiers[i - 1][0]); + } + if (i < iLast) { + linkEnd.add(identifiers[i + 1][0]); + } } } if (wrapRows && @@ -643,7 +643,7 @@ public class NeuronSquareMesh2D } /** - * Miscellaneous indicators of the map quality: + * Miscellaneous indicators of the map quality. *
    *
  • Hit histogram
  • *
  • Quantization error
  • @@ -651,7 +651,7 @@ public class NeuronSquareMesh2D *
  • Unified distance matrix
  • *
*/ - public static class DataVisualization { + public static final class DataVisualization { /** Distance function. */ private static final DistanceMeasure DISTANCE = new EuclideanDistance(); /** Total number of samples. */ @@ -772,7 +772,7 @@ public class NeuronSquareMesh2D /** * @return the total number of samples. */ - public final int getNumberOfSamples() { + public int getNumberOfSamples() { return numberOfSamples; } @@ -851,8 +851,8 @@ public class NeuronSquareMesh2D * @param normalizedHits Hits histogram (normalized). * @return the hit-weighted mean of the given {@code metrics}. */ - private double hitWeightedMean(double[][] metrics, - double[][] normalizedHits) { + private static double hitWeightedMean(double[][] metrics, + double[][] normalizedHits) { double mean = 0; final int rows = metrics.length; final int cols = metrics[0].length; diff --git a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/util/UnifiedDistanceMatrix.java b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/util/UnifiedDistanceMatrix.java index 3a6c909f0..d84abfc4e 100644 --- a/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/util/UnifiedDistanceMatrix.java +++ b/commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/twod/util/UnifiedDistanceMatrix.java @@ -34,7 +34,7 @@ import org.apache.commons.math4.neuralnet.twod.NeuronSquareMesh2D; * unit of the 2D-map. * * @since 3.6 - * @see NeuronSquareMesh2D.DataVisualization#getUMatrix() + * @see org.apache.commons.math4.neuralnet.twod.NeuronSquareMesh2D.DataVisualization#getUMatrix() */ public class UnifiedDistanceMatrix implements MapVisualization { /** Distance. */ diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/MapRankingTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/MapRankingTest.java index f307d936a..a4113fbb2 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/MapRankingTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/MapRankingTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -43,7 +43,7 @@ public class MapRankingTest { final UniformRandomProvider rng = RandomSource.create(RandomSource.SPLIT_MIX_64); final FeatureInitializer init = new OffsetFeatureInitializer(FeatureInitializerFactory.uniform(rng, -0.1, 0.1)); - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final MapRanking ranking = new MapRanking(new NeuronString(3, false, initArray).getNetwork(), new EuclideanDistance()); @@ -60,8 +60,8 @@ public class MapRankingTest { best.clear(); features = new double[][] { - { -1 }, - { 0.4 }, + {-1 }, + {0.4 }, }; for (double[] f : features) { best.addAll(ranking.rank(f, 1)); @@ -71,8 +71,8 @@ public class MapRankingTest { best.clear(); features = new double[][] { - { 0.6 }, - { 1.4 }, + {0.6 }, + {1.4 }, }; for (double[] f : features) { best.addAll(ranking.rank(f, 1)); @@ -82,8 +82,8 @@ public class MapRankingTest { best.clear(); features = new double[][] { - { 1.6 }, - { 3 }, + {1.6 }, + {3 }, }; for (double[] f : features) { best.addAll(ranking.rank(f, 1)); @@ -94,15 +94,15 @@ public class MapRankingTest { Assert.assertEquals(3, allBest.size()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testRankPrecondition() { final UniformRandomProvider rng = RandomSource.create(RandomSource.SPLIT_MIX_64); final FeatureInitializer init = new OffsetFeatureInitializer(FeatureInitializerFactory.uniform(rng, -0.1, 0.1)); - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; new MapRanking(new NeuronString(3, false, initArray).getNetwork(), - new EuclideanDistance()).rank(new double[] { -1 }, 0); + new EuclideanDistance()).rank(new double[] {-1}, 0); } @Test @@ -110,13 +110,13 @@ public class MapRankingTest { final Set list = new HashSet<>(); for (int i = 0; i < 4; i++) { - list.add(new Neuron(i, new double[] { i - 0.5 })); + list.add(new Neuron(i, new double[] {i - 0.5})); } final MapRanking rank = new MapRanking(list, new EuclideanDistance()); - final List sorted = rank.rank(new double[] { 3.4 }); + final List sorted = rank.rank(new double[] {3.4}); - final long[] expected = new long[] { 3, 2, 1, 0 }; + final long[] expected = new long[] {3, 2, 1, 0}; for (int i = 0; i < list.size(); i++) { Assert.assertEquals(expected[i], sorted.get(i).getIdentifier()); } diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NetworkTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NetworkTest.java index 21f435d99..e8b5d99c8 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NetworkTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NetworkTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -42,7 +42,7 @@ public class NetworkTest { @Test public void testGetFeaturesSize() { - final FeatureInitializer[] initArray = { init, init, init }; + final FeatureInitializer[] initArray = {init, init, init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, @@ -61,7 +61,7 @@ public class NetworkTest { */ @Test public void testDeleteLink() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.VON_NEUMANN, @@ -90,7 +90,7 @@ public class NetworkTest { */ @Test public void testDeleteNeuron() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.VON_NEUMANN, @@ -104,7 +104,9 @@ public class NetworkTest { try { net.getNeuron(1); - } catch (NoSuchElementException expected) {} + } catch (NoSuchElementException expected) { + // Ignore + } Assert.assertEquals(1, net.getNeighbours(net.getNeuron(0)).size()); Assert.assertEquals(1, net.getNeighbours(net.getNeuron(3)).size()); @@ -112,7 +114,7 @@ public class NetworkTest { @Test public void testIterationOrder() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(4, false, 3, true, SquareNeighbourhood.VON_NEUMANN, @@ -142,7 +144,7 @@ public class NetworkTest { */ @Test public void testCopy() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.VON_NEUMANN, @@ -177,7 +179,7 @@ public class NetworkTest { public void testSerialize() throws IOException, ClassNotFoundException { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network out = new NeuronSquareMesh2D(4, false, 3, true, SquareNeighbourhood.VON_NEUMANN, diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NeuronTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NeuronTest.java index 3b4f7cf22..682a8269d 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NeuronTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/NeuronTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -33,21 +33,21 @@ public class NeuronTest { @Test public void testGetIdentifier() { final long id = 1234567; - final Neuron n = new Neuron(id, new double[] { 0 }); + final Neuron n = new Neuron(id, new double[] {0 }); Assert.assertEquals(id, n.getIdentifier()); } @Test public void testGetSize() { - final double[] features = { -1, -1e-97, 0, 23.456, 9.01e203 } ; + final double[] features = {-1, -1e-97, 0, 23.456, 9.01e203}; final Neuron n = new Neuron(1, features); Assert.assertEquals(features.length, n.getSize()); } @Test public void testGetFeatures() { - final double[] features = { -1, -1e-97, 0, 23.456, 9.01e203 } ; + final double[] features = {-1, -1e-97, 0, 23.456, 9.01e203}; final Neuron n = new Neuron(1, features); final double[] f = n.getFeatures(); @@ -63,9 +63,9 @@ public class NeuronTest { @Test public void testCompareAndSetFeatures() { - final Neuron n = new Neuron(1, new double[] { 0 }); + final Neuron n = new Neuron(1, new double[] {0 }); double[] expect = n.getFeatures(); - double[] update = new double[] { expect[0] + 1.23 }; + double[] update = new double[] {expect[0] + 1.23}; // Test "success". boolean ok = n.compareAndSetFeatures(expect, update); @@ -75,7 +75,7 @@ public class NeuronTest { Assert.assertEquals(update[0], n.getFeatures()[0], 0d); // Test "failure". - double[] update1 = new double[] { update[0] + 4.56 }; + double[] update1 = new double[] {update[0] + 4.56}; // Must return "false" because the neuron has been // updated: a new update can only succeed if "expect" // is set to the new features. @@ -88,10 +88,10 @@ public class NeuronTest { @Test public void testCopy() { - final Neuron n = new Neuron(1, new double[] { 9.87 }); + final Neuron n = new Neuron(1, new double[] {9.87 }); // Update original. - double[] update = new double[] { n.getFeatures()[0] + 2.34 }; + double[] update = new double[] {n.getFeatures()[0] + 2.34}; n.compareAndSetFeatures(n.getFeatures(), update); // Create a copy. @@ -103,7 +103,7 @@ public class NeuronTest { copy.getNumberOfAttemptedUpdates()); // Update original. - update = new double[] { 1.23 * n.getFeatures()[0] }; + update = new double[] {1.23 * n.getFeatures()[0]}; n.compareAndSetFeatures(n.getFeatures(), update); // Check that original and copy differ. @@ -116,7 +116,7 @@ public class NeuronTest { public void testSerialize() throws IOException, ClassNotFoundException { - final Neuron out = new Neuron(123, new double[] { -98.76, -1, 0, 1e-23, 543.21, 1e234 }); + final Neuron out = new Neuron(123, new double[] {-98.76, -1, 0, 1e-23, 543.21, 1e234}); final ByteArrayOutputStream bos = new ByteArrayOutputStream(); final ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(out); diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/OffsetFeatureInitializer.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/OffsetFeatureInitializer.java index dc40be2f1..4aad5b3fa 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/OffsetFeatureInitializer.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/OffsetFeatureInitializer.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.apache.commons.math4.neuralnet; - /** * Wraps a given initializer. */ diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/oned/NeuronStringTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/oned/NeuronStringTest.java index 04c130581..b6b990f24 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/oned/NeuronStringTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/oned/NeuronStringTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -51,14 +51,14 @@ public class NeuronStringTest { */ @Test public void testSegmentNetwork() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronString(4, false, initArray).getNetwork(); Collection neighbours; // Neuron 0. neighbours = net.getNeighbours(net.getNeuron(0)); - for (long nId : new long[] { 1 }) { + for (long nId : new long[] {1}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -66,7 +66,7 @@ public class NeuronStringTest { // Neuron 1. neighbours = net.getNeighbours(net.getNeuron(1)); - for (long nId : new long[] { 0, 2 }) { + for (long nId : new long[] {0, 2}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -74,7 +74,7 @@ public class NeuronStringTest { // Neuron 2. neighbours = net.getNeighbours(net.getNeuron(2)); - for (long nId : new long[] { 1, 3 }) { + for (long nId : new long[] {1, 3}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -82,7 +82,7 @@ public class NeuronStringTest { // Neuron 3. neighbours = net.getNeighbours(net.getNeuron(3)); - for (long nId : new long[] { 2 }) { + for (long nId : new long[] {2}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -96,14 +96,14 @@ public class NeuronStringTest { */ @Test public void testCircleNetwork() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronString(4, true, initArray).getNetwork(); Collection neighbours; // Neuron 0. neighbours = net.getNeighbours(net.getNeuron(0)); - for (long nId : new long[] { 1, 3 }) { + for (long nId : new long[] {1, 3}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -111,7 +111,7 @@ public class NeuronStringTest { // Neuron 1. neighbours = net.getNeighbours(net.getNeuron(1)); - for (long nId : new long[] { 0, 2 }) { + for (long nId : new long[] {0, 2}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -119,7 +119,7 @@ public class NeuronStringTest { // Neuron 2. neighbours = net.getNeighbours(net.getNeuron(2)); - for (long nId : new long[] { 1, 3 }) { + for (long nId : new long[] {1, 3}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -127,7 +127,7 @@ public class NeuronStringTest { // Neuron 3. neighbours = net.getNeighbours(net.getNeuron(3)); - for (long nId : new long[] { 0, 2 }) { + for (long nId : new long[] {0, 2}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -141,7 +141,7 @@ public class NeuronStringTest { */ @Test public void testGetNeighboursWithExclude() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronString(5, true, initArray).getNetwork(); final Collection exclude = new ArrayList<>(); exclude.add(net.getNeuron(1)); @@ -155,7 +155,7 @@ public class NeuronStringTest { public void testSerialize() throws IOException, ClassNotFoundException { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronString out = new NeuronString(4, false, initArray); final ByteArrayOutputStream bos = new ByteArrayOutputStream(); diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateActionTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateActionTest.java index d729a8ee0..96e7da6db 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateActionTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/KohonenUpdateActionTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -49,7 +49,7 @@ public class KohonenUpdateActionTest { public void testUpdate() { final FeatureInitializer init = new OffsetFeatureInitializer(FeatureInitializerFactory.uniform(rng, 0, 0.1)); - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final int netSize = 3; final Network net = new NeuronString(netSize, false, initArray).getNetwork(); @@ -67,7 +67,7 @@ public class KohonenUpdateActionTest { // 2. when the initial neighbourhood is larger than the network's size, // all neuron's features get closer to the input's features. - final double[] features = new double[] { 0.3 }; + final double[] features = new double[] {0.3}; final double[] distancesBefore = new double[netSize]; int count = 0; for (Neuron n : net) { diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactoryTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactoryTest.java index b976f1fc2..53402d426 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactoryTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/LearningFactorFunctionFactoryTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,23 +24,23 @@ import org.junit.Assert; * Tests for {@link LearningFactorFunctionFactory} class. */ public class LearningFactorFunctionFactoryTest { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition0() { LearningFactorFunctionFactory.exponentialDecay(0d, 0d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition1() { LearningFactorFunctionFactory.exponentialDecay(1 + 1e-10, 0d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition2() { LearningFactorFunctionFactory.exponentialDecay(1d, 0d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition3() { LearningFactorFunctionFactory.exponentialDecay(1d, 1d, 100); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition4() { LearningFactorFunctionFactory.exponentialDecay(1d, 0.2, 0); } @@ -58,19 +58,19 @@ public class LearningFactorFunctionFactoryTest { Assert.assertEquals(0, f.value(Long.MAX_VALUE), 0d); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition0() { LearningFactorFunctionFactory.quasiSigmoidDecay(0d, -1d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition1() { LearningFactorFunctionFactory.quasiSigmoidDecay(1 + 1e-10, -1d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition3() { LearningFactorFunctionFactory.quasiSigmoidDecay(1d, 0d, 100); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition4() { LearningFactorFunctionFactory.quasiSigmoidDecay(1d, -1d, 0); } diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactoryTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactoryTest.java index 35c7957b0..d91a5a8f5 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactoryTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/NeighbourhoodSizeFunctionFactoryTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,19 +24,19 @@ import org.junit.Assert; * Tests for {@link NeighbourhoodSizeFunctionFactory} class. */ public class NeighbourhoodSizeFunctionFactoryTest { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition1() { NeighbourhoodSizeFunctionFactory.exponentialDecay(0, 0, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition2() { NeighbourhoodSizeFunctionFactory.exponentialDecay(1, 0, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition3() { NeighbourhoodSizeFunctionFactory.exponentialDecay(1, 1, 100); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testExponentialDecayPrecondition4() { NeighbourhoodSizeFunctionFactory.exponentialDecay(2, 1, 0); } @@ -54,15 +54,15 @@ public class NeighbourhoodSizeFunctionFactoryTest { Assert.assertEquals(0, f.value(Long.MAX_VALUE)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition1() { NeighbourhoodSizeFunctionFactory.quasiSigmoidDecay(0d, -1d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition3() { NeighbourhoodSizeFunctionFactory.quasiSigmoidDecay(1d, 0d, 100); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testQuasiSigmoidDecayPrecondition4() { NeighbourhoodSizeFunctionFactory.quasiSigmoidDecay(1d, -1d, 0); } diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/ExponentialDecayFunctionTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/ExponentialDecayFunctionTest.java index fdc786064..e4ac612ff 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/ExponentialDecayFunctionTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/ExponentialDecayFunctionTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,19 +24,19 @@ import org.junit.Assert; * Tests for {@link ExponentialDecayFunction} class */ public class ExponentialDecayFunctionTest { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition1() { new ExponentialDecayFunction(0d, 0d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition2() { new ExponentialDecayFunction(1d, 0d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition3() { new ExponentialDecayFunction(1d, 1d, 100); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition4() { new ExponentialDecayFunction(1d, 0.2, 0); } diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunctionTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunctionTest.java index c9365612a..394405198 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunctionTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/sofm/util/QuasiSigmoidDecayFunctionTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,15 +24,15 @@ import org.junit.Assert; * Tests for {@link QuasiSigmoidDecayFunction} class */ public class QuasiSigmoidDecayFunctionTest { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition1() { new QuasiSigmoidDecayFunction(0d, -1d, 2); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition3() { new QuasiSigmoidDecayFunction(1d, 0d, 100); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testPrecondition4() { new QuasiSigmoidDecayFunction(1d, -1d, 0); } diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2DTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2DTest.java index da4cc19b3..641c01b5f 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2DTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2DTest.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -49,9 +49,9 @@ public class NeuronSquareMesh2DTest { private final UniformRandomProvider rng = RandomSource.create(RandomSource.SPLIT_MIX_64); private final FeatureInitializer init = FeatureInitializerFactory.uniform(rng, 0, 2); - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testMinimalNetworkSize1() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; new NeuronSquareMesh2D(1, false, 2, false, @@ -59,9 +59,9 @@ public class NeuronSquareMesh2DTest { initArray); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testMinimalNetworkSize2() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; new NeuronSquareMesh2D(2, false, 0, false, @@ -71,7 +71,7 @@ public class NeuronSquareMesh2DTest { @Test public void testGetFeaturesSize() { - final FeatureInitializer[] initArray = { init, init, init }; + final FeatureInitializer[] initArray = {init, init, init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, @@ -91,7 +91,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test2x2Network() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.VON_NEUMANN, @@ -99,9 +99,9 @@ public class NeuronSquareMesh2DTest { Collection neighbours; // Neurons 0 and 3. - for (long id : new long[] { 0, 3 }) { + for (long id : new long[] {0, 3 }) { neighbours = net.getNeighbours(net.getNeuron(id)); - for (long nId : new long[] { 1, 2 }) { + for (long nId : new long[] {1, 2 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -109,9 +109,9 @@ public class NeuronSquareMesh2DTest { } // Neurons 1 and 2. - for (long id : new long[] { 1, 2 }) { + for (long id : new long[] {1, 2 }) { neighbours = net.getNeighbours(net.getNeuron(id)); - for (long nId : new long[] { 0, 3 }) { + for (long nId : new long[] {0, 3 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -129,7 +129,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test2x2Network2() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.MOORE, @@ -137,9 +137,9 @@ public class NeuronSquareMesh2DTest { Collection neighbours; // All neurons - for (long id : new long[] { 0, 1, 2, 3 }) { + for (long id : new long[] {0, 1, 2, 3 }) { neighbours = net.getNeighbours(net.getNeuron(id)); - for (long nId : new long[] { 0, 1, 2, 3 }) { + for (long nId : new long[] {0, 1, 2, 3 }) { if (id != nId) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } @@ -157,7 +157,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test3x2CylinderNetwork() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 3, true, SquareNeighbourhood.VON_NEUMANN, @@ -166,7 +166,7 @@ public class NeuronSquareMesh2DTest { // Neuron 0. neighbours = net.getNeighbours(net.getNeuron(0)); - for (long nId : new long[] { 1, 2, 3 }) { + for (long nId : new long[] {1, 2, 3 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -174,7 +174,7 @@ public class NeuronSquareMesh2DTest { // Neuron 1. neighbours = net.getNeighbours(net.getNeuron(1)); - for (long nId : new long[] { 0, 2, 4 }) { + for (long nId : new long[] {0, 2, 4 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -182,7 +182,7 @@ public class NeuronSquareMesh2DTest { // Neuron 2. neighbours = net.getNeighbours(net.getNeuron(2)); - for (long nId : new long[] { 0, 1, 5 }) { + for (long nId : new long[] {0, 1, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -190,7 +190,7 @@ public class NeuronSquareMesh2DTest { // Neuron 3. neighbours = net.getNeighbours(net.getNeuron(3)); - for (long nId : new long[] { 0, 4, 5 }) { + for (long nId : new long[] {0, 4, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -198,7 +198,7 @@ public class NeuronSquareMesh2DTest { // Neuron 4. neighbours = net.getNeighbours(net.getNeuron(4)); - for (long nId : new long[] { 1, 3, 5 }) { + for (long nId : new long[] {1, 3, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -206,7 +206,7 @@ public class NeuronSquareMesh2DTest { // Neuron 5. neighbours = net.getNeighbours(net.getNeuron(5)); - for (long nId : new long[] { 2, 3, 4 }) { + for (long nId : new long[] {2, 3, 4 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -223,7 +223,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test3x2CylinderNetwork2() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(2, false, 3, true, SquareNeighbourhood.MOORE, @@ -231,9 +231,9 @@ public class NeuronSquareMesh2DTest { Collection neighbours; // All neurons. - for (long id : new long[] { 0, 1, 2, 3, 4, 5 }) { + for (long id : new long[] {0, 1, 2, 3, 4, 5 }) { neighbours = net.getNeighbours(net.getNeuron(id)); - for (long nId : new long[] { 0, 1, 2, 3, 4, 5 }) { + for (long nId : new long[] {0, 1, 2, 3, 4, 5 }) { if (id != nId) { Assert.assertTrue("id=" + id + " nId=" + nId, neighbours.contains(net.getNeuron(nId))); @@ -255,7 +255,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test3x3TorusNetwork() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(3, true, 3, true, SquareNeighbourhood.VON_NEUMANN, @@ -264,7 +264,7 @@ public class NeuronSquareMesh2DTest { // Neuron 0. neighbours = net.getNeighbours(net.getNeuron(0)); - for (long nId : new long[] { 1, 2, 3, 6 }) { + for (long nId : new long[] {1, 2, 3, 6 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -272,7 +272,7 @@ public class NeuronSquareMesh2DTest { // Neuron 1. neighbours = net.getNeighbours(net.getNeuron(1)); - for (long nId : new long[] { 0, 2, 4, 7 }) { + for (long nId : new long[] {0, 2, 4, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -280,7 +280,7 @@ public class NeuronSquareMesh2DTest { // Neuron 2. neighbours = net.getNeighbours(net.getNeuron(2)); - for (long nId : new long[] { 0, 1, 5, 8 }) { + for (long nId : new long[] {0, 1, 5, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -288,7 +288,7 @@ public class NeuronSquareMesh2DTest { // Neuron 3. neighbours = net.getNeighbours(net.getNeuron(3)); - for (long nId : new long[] { 0, 4, 5, 6 }) { + for (long nId : new long[] {0, 4, 5, 6 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -296,7 +296,7 @@ public class NeuronSquareMesh2DTest { // Neuron 4. neighbours = net.getNeighbours(net.getNeuron(4)); - for (long nId : new long[] { 1, 3, 5, 7 }) { + for (long nId : new long[] {1, 3, 5, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -304,7 +304,7 @@ public class NeuronSquareMesh2DTest { // Neuron 5. neighbours = net.getNeighbours(net.getNeuron(5)); - for (long nId : new long[] { 2, 3, 4, 8 }) { + for (long nId : new long[] {2, 3, 4, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -312,7 +312,7 @@ public class NeuronSquareMesh2DTest { // Neuron 6. neighbours = net.getNeighbours(net.getNeuron(6)); - for (long nId : new long[] { 0, 3, 7, 8 }) { + for (long nId : new long[] {0, 3, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -320,7 +320,7 @@ public class NeuronSquareMesh2DTest { // Neuron 7. neighbours = net.getNeighbours(net.getNeuron(7)); - for (long nId : new long[] { 1, 4, 6, 8 }) { + for (long nId : new long[] {1, 4, 6, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -328,7 +328,7 @@ public class NeuronSquareMesh2DTest { // Neuron 8. neighbours = net.getNeighbours(net.getNeuron(8)); - for (long nId : new long[] { 2, 5, 6, 7 }) { + for (long nId : new long[] {2, 5, 6, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -348,7 +348,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test3x3TorusNetwork2() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(3, true, 3, true, SquareNeighbourhood.MOORE, @@ -356,9 +356,9 @@ public class NeuronSquareMesh2DTest { Collection neighbours; // All neurons. - for (long id : new long[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 }) { + for (long id : new long[] {0, 1, 2, 3, 4, 5, 6, 7, 8 }) { neighbours = net.getNeighbours(net.getNeuron(id)); - for (long nId : new long[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 }) { + for (long nId : new long[] {0, 1, 2, 3, 4, 5, 6, 7, 8 }) { if (id != nId) { Assert.assertTrue("id=" + id + " nId=" + nId, neighbours.contains(net.getNeuron(nId))); @@ -380,7 +380,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test3x3CylinderNetwork() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(3, false, 3, true, SquareNeighbourhood.MOORE, @@ -389,7 +389,7 @@ public class NeuronSquareMesh2DTest { // Neuron 0. neighbours = net.getNeighbours(net.getNeuron(0)); - for (long nId : new long[] { 1, 2, 3, 4, 5}) { + for (long nId : new long[] {1, 2, 3, 4, 5}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -397,7 +397,7 @@ public class NeuronSquareMesh2DTest { // Neuron 1. neighbours = net.getNeighbours(net.getNeuron(1)); - for (long nId : new long[] { 0, 2, 3, 4, 5 }) { + for (long nId : new long[] {0, 2, 3, 4, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -405,7 +405,7 @@ public class NeuronSquareMesh2DTest { // Neuron 2. neighbours = net.getNeighbours(net.getNeuron(2)); - for (long nId : new long[] { 0, 1, 3, 4, 5 }) { + for (long nId : new long[] {0, 1, 3, 4, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -413,7 +413,7 @@ public class NeuronSquareMesh2DTest { // Neuron 3. neighbours = net.getNeighbours(net.getNeuron(3)); - for (long nId : new long[] { 0, 1, 2, 4, 5, 6, 7, 8 }) { + for (long nId : new long[] {0, 1, 2, 4, 5, 6, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -421,7 +421,7 @@ public class NeuronSquareMesh2DTest { // Neuron 4. neighbours = net.getNeighbours(net.getNeuron(4)); - for (long nId : new long[] { 0, 1, 2, 3, 5, 6, 7, 8 }) { + for (long nId : new long[] {0, 1, 2, 3, 5, 6, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -429,7 +429,7 @@ public class NeuronSquareMesh2DTest { // Neuron 5. neighbours = net.getNeighbours(net.getNeuron(5)); - for (long nId : new long[] { 0, 1, 2, 3, 4, 6, 7, 8 }) { + for (long nId : new long[] {0, 1, 2, 3, 4, 6, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -437,7 +437,7 @@ public class NeuronSquareMesh2DTest { // Neuron 6. neighbours = net.getNeighbours(net.getNeuron(6)); - for (long nId : new long[] { 3, 4, 5, 7, 8 }) { + for (long nId : new long[] {3, 4, 5, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -445,7 +445,7 @@ public class NeuronSquareMesh2DTest { // Neuron 7. neighbours = net.getNeighbours(net.getNeuron(7)); - for (long nId : new long[] { 3, 4, 5, 6, 8 }) { + for (long nId : new long[] {3, 4, 5, 6, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -453,7 +453,7 @@ public class NeuronSquareMesh2DTest { // Neuron 8. neighbours = net.getNeighbours(net.getNeuron(8)); - for (long nId : new long[] { 3, 4, 5, 6, 7 }) { + for (long nId : new long[] {3, 4, 5, 6, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -473,7 +473,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void test3x3CylinderNetwork2() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(3, false, 3, false, SquareNeighbourhood.MOORE, @@ -482,7 +482,7 @@ public class NeuronSquareMesh2DTest { // Neuron 0. neighbours = net.getNeighbours(net.getNeuron(0)); - for (long nId : new long[] { 1, 3, 4}) { + for (long nId : new long[] {1, 3, 4}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -490,7 +490,7 @@ public class NeuronSquareMesh2DTest { // Neuron 1. neighbours = net.getNeighbours(net.getNeuron(1)); - for (long nId : new long[] { 0, 2, 3, 4, 5 }) { + for (long nId : new long[] {0, 2, 3, 4, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -498,7 +498,7 @@ public class NeuronSquareMesh2DTest { // Neuron 2. neighbours = net.getNeighbours(net.getNeuron(2)); - for (long nId : new long[] { 1, 4, 5 }) { + for (long nId : new long[] {1, 4, 5 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -506,7 +506,7 @@ public class NeuronSquareMesh2DTest { // Neuron 3. neighbours = net.getNeighbours(net.getNeuron(3)); - for (long nId : new long[] { 0, 1, 4, 6, 7 }) { + for (long nId : new long[] {0, 1, 4, 6, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -514,7 +514,7 @@ public class NeuronSquareMesh2DTest { // Neuron 4. neighbours = net.getNeighbours(net.getNeuron(4)); - for (long nId : new long[] { 0, 1, 2, 3, 5, 6, 7, 8 }) { + for (long nId : new long[] {0, 1, 2, 3, 5, 6, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -522,7 +522,7 @@ public class NeuronSquareMesh2DTest { // Neuron 5. neighbours = net.getNeighbours(net.getNeuron(5)); - for (long nId : new long[] { 1, 2, 4, 7, 8 }) { + for (long nId : new long[] {1, 2, 4, 7, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -530,7 +530,7 @@ public class NeuronSquareMesh2DTest { // Neuron 6. neighbours = net.getNeighbours(net.getNeuron(6)); - for (long nId : new long[] { 3, 4, 7 }) { + for (long nId : new long[] {3, 4, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -538,7 +538,7 @@ public class NeuronSquareMesh2DTest { // Neuron 7. neighbours = net.getNeighbours(net.getNeuron(7)); - for (long nId : new long[] { 3, 4, 5, 6, 8 }) { + for (long nId : new long[] {3, 4, 5, 6, 8 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -546,7 +546,7 @@ public class NeuronSquareMesh2DTest { // Neuron 8. neighbours = net.getNeighbours(net.getNeuron(8)); - for (long nId : new long[] { 4, 5, 7 }) { + for (long nId : new long[] {4, 5, 7 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -572,7 +572,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void testConcentricNeighbourhood() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(5, true, 5, true, SquareNeighbourhood.VON_NEUMANN, @@ -583,7 +583,7 @@ public class NeuronSquareMesh2DTest { // Level-1 neighbourhood. neighbours = net.getNeighbours(net.getNeuron(12)); - for (long nId : new long[] { 7, 11, 13, 17 }) { + for (long nId : new long[] {7, 11, 13, 17 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -595,7 +595,7 @@ public class NeuronSquareMesh2DTest { exclude.addAll(neighbours); // 3. Retrieve level-2 neighbourhood. neighbours = net.getNeighbours(neighbours, exclude); - for (long nId : new long[] { 6, 8, 16, 18, 2, 10, 14, 22 }) { + for (long nId : new long[] {6, 8, 16, 18, 2, 10, 14, 22 }) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -621,7 +621,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void testConcentricNeighbourhood2() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final Network net = new NeuronSquareMesh2D(5, true, 5, true, SquareNeighbourhood.MOORE, @@ -632,7 +632,7 @@ public class NeuronSquareMesh2DTest { // Level-1 neighbourhood. neighbours = net.getNeighbours(net.getNeuron(8)); - for (long nId : new long[] { 2, 3, 4, 7, 9, 12, 13, 14 }) { + for (long nId : new long[] {2, 3, 4, 7, 9, 12, 13, 14}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -644,7 +644,7 @@ public class NeuronSquareMesh2DTest { exclude.addAll(neighbours); // 3. Retrieve level-2 neighbourhood. neighbours = net.getNeighbours(neighbours, exclude); - for (long nId : new long[] { 1, 6, 11, 16, 17, 18, 19, 15, 10, 5, 0, 20, 24, 23, 22, 21 }) { + for (long nId : new long[] {1, 6, 11, 16, 17, 18, 19, 15, 10, 5, 0, 20, 24, 23, 22, 21}) { Assert.assertTrue(neighbours.contains(net.getNeuron(nId))); } // Ensures that no other neurons is in the neighbourhood set. @@ -655,7 +655,7 @@ public class NeuronSquareMesh2DTest { public void testSerialize() throws IOException, ClassNotFoundException { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D out = new NeuronSquareMesh2D(4, false, 3, true, SquareNeighbourhood.VON_NEUMANN, @@ -700,7 +700,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void testGetNeuron() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D net = new NeuronSquareMesh2D(2, false, 2, true, SquareNeighbourhood.VON_NEUMANN, @@ -749,7 +749,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void testGetNeuronAlongDirection() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D net = new NeuronSquareMesh2D(3, false, 3, false, SquareNeighbourhood.VON_NEUMANN, @@ -810,7 +810,7 @@ public class NeuronSquareMesh2DTest { */ @Test public void testGetNeuronAlongDirectionWrappedMap() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D net = new NeuronSquareMesh2D(3, true, 3, true, SquareNeighbourhood.VON_NEUMANN, @@ -854,7 +854,7 @@ public class NeuronSquareMesh2DTest { @Test public void testIterator() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D map = new NeuronSquareMesh2D(3, true, 3, true, SquareNeighbourhood.VON_NEUMANN, @@ -880,7 +880,7 @@ public class NeuronSquareMesh2DTest { @Test public void testDataVisualization() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D map = new NeuronSquareMesh2D(3, true, 3, true, SquareNeighbourhood.VON_NEUMANN, diff --git a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/util/LocationFinderTest.java b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/util/LocationFinderTest.java index c77b5447d..e951190bf 100644 --- a/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/util/LocationFinderTest.java +++ b/commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/util/LocationFinderTest.java @@ -45,7 +45,7 @@ public class LocationFinderTest { */ @Test public void test2x2Network() { - final FeatureInitializer[] initArray = { init }; + final FeatureInitializer[] initArray = {init}; final NeuronSquareMesh2D map = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.VON_NEUMANN, diff --git a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastCosineTransform.java b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastCosineTransform.java index 7b47acc38..6de9ffc05 100644 --- a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastCosineTransform.java +++ b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastCosineTransform.java @@ -175,12 +175,12 @@ public class FastCosineTransform implements RealTransform { final boolean inverse) { if (inverse) { return normalization == Norm.ORTHO ? - (f) -> TransformUtils.scaleInPlace(fct(f), Math.sqrt(2d / (f.length - 1))) : - (f) -> TransformUtils.scaleInPlace(fct(f), 2d / (f.length - 1)); + f -> TransformUtils.scaleInPlace(fct(f), Math.sqrt(2d / (f.length - 1))) : + f -> TransformUtils.scaleInPlace(fct(f), 2d / (f.length - 1)); } else { return normalization == Norm.ORTHO ? - (f) -> TransformUtils.scaleInPlace(fct(f), Math.sqrt(2d / (f.length - 1))) : - (f) -> fct(f); + f -> TransformUtils.scaleInPlace(fct(f), Math.sqrt(2d / (f.length - 1))) : + f -> fct(f); } } diff --git a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastFourierTransform.java b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastFourierTransform.java index 7877da55d..1dbad5852 100644 --- a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastFourierTransform.java +++ b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastFourierTransform.java @@ -135,7 +135,6 @@ public class FastFourierTransform implements ComplexTransform { throw new TransformException(TransformException.SIZE_MISMATCH, dataI.length, dataR.length); } - final int n = dataR.length; if (!ArithmeticUtils.isPowerOfTwo(n)) { throw new TransformException(TransformException.NOT_POWER_OF_TWO, @@ -236,9 +235,7 @@ public class FastFourierTransform implements ComplexTransform { } // Combine even/odd transforms of size lastN0 into a transform of size N0 (lastN0 * 2). - for (int destEvenStartIndex = 0; - destEvenStartIndex < n; - destEvenStartIndex += n0) { + for (int destEvenStartIndex = 0; destEvenStartIndex < n; destEvenStartIndex += n0) { final int destOddStartIndex = destEvenStartIndex + lastN0; double wSubN0ToRR = 1; @@ -282,6 +279,7 @@ public class FastFourierTransform implements ComplexTransform { * * @throws IllegalArgumentException if the length of the data array is not a power of two. */ + @Override public Complex[] apply(final double[] f) { final double[][] dataRI = new double[][] { Arrays.copyOf(f, f.length), diff --git a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastHadamardTransform.java b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastHadamardTransform.java index ab3728549..b18781582 100644 --- a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastHadamardTransform.java +++ b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastHadamardTransform.java @@ -308,9 +308,9 @@ public class FastHadamardTransform implements RealTransform { */ private UnaryOperator create(final boolean inverse) { if (inverse) { - return (f) -> TransformUtils.scaleInPlace(fht(f), 1d / f.length); + return f -> TransformUtils.scaleInPlace(fht(f), 1d / f.length); } else { - return (f) -> fht(f); + return f -> fht(f); } } } diff --git a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastSineTransform.java b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastSineTransform.java index c35c67dd1..e18832e65 100644 --- a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastSineTransform.java +++ b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/FastSineTransform.java @@ -183,12 +183,12 @@ public class FastSineTransform implements RealTransform { final boolean inverse) { if (inverse) { return normalization == Norm.ORTHO ? - (f) -> TransformUtils.scaleInPlace(fst(f), Math.sqrt(2d / f.length)) : - (f) -> TransformUtils.scaleInPlace(fst(f), 2d / f.length); + f -> TransformUtils.scaleInPlace(fst(f), Math.sqrt(2d / f.length)) : + f -> TransformUtils.scaleInPlace(fst(f), 2d / f.length); } else { return normalization == Norm.ORTHO ? - (f) -> TransformUtils.scaleInPlace(fst(f), Math.sqrt(2d / f.length)) : - (f) -> fst(f); + f -> TransformUtils.scaleInPlace(fst(f), Math.sqrt(2d / f.length)) : + f -> fst(f); } } diff --git a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformException.java b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformException.java index 0c298ee56..0591b330d 100644 --- a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformException.java +++ b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformException.java @@ -46,7 +46,7 @@ class TransformException extends IllegalArgumentException { * @param message Message format (with replaceable parameters). * @param formatArguments Actual arguments to be displayed in the message. */ - public TransformException(String message, Object... formatArguments) { + TransformException(String message, Object... formatArguments) { super(MessageFormat.format(message, formatArguments)); } } diff --git a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformUtils.java b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformUtils.java index bf1fa5eeb..c2168c8f1 100644 --- a/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformUtils.java +++ b/commons-math-transform/src/main/java/org/apache/commons/math4/transform/TransformUtils.java @@ -16,7 +16,6 @@ */ package org.apache.commons.math4.transform; -import java.util.Arrays; import java.util.function.DoubleUnaryOperator; import org.apache.commons.numbers.complex.Complex; @@ -25,7 +24,7 @@ import org.apache.commons.numbers.complex.Complex; * Useful functions for the implementation of various transforms. * Class is package-private (for internal use only). */ -class TransformUtils { +final class TransformUtils { /** Utility class. */ private TransformUtils() {} diff --git a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastCosineTransformerTest.java b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastCosineTransformerTest.java index c4d5a8f22..123a4df93 100644 --- a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastCosineTransformerTest.java +++ b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastCosineTransformerTest.java @@ -71,7 +71,7 @@ public final class FastCosineTransformerTest public static Collection data() { final FastCosineTransform.Norm[] normalization = FastCosineTransform.Norm.values(); final Object[][] data = new FastCosineTransform.Norm[normalization.length][1]; - for (int i = 0; i < normalization.length; i++){ + for (int i = 0; i < normalization.length; i++) { data[i][0] = normalization[i]; } return Arrays.asList(data); @@ -110,7 +110,7 @@ public final class FastCosineTransformerTest @Override DoubleUnaryOperator getValidFunction() { final UnivariateFunction sinc = new Sinc(); - return (x) -> sinc.value(x); + return x -> sinc.value(x); } @Override @@ -169,12 +169,13 @@ public final class FastCosineTransformerTest @Test public void testAdHocData() { FastCosineTransform transformer; - double result[], tolerance = 1e-12; + double[] result; + double tolerance = 1e-12; - final double x[] = { + final double[] x = { 0.0, 1.0, 4.0, 9.0, 16.0, 25.0, 36.0, 49.0, 64.0 }; - final double y[] = { + final double[] y = { 172.0, -105.096569476353, 27.3137084989848, -12.9593152353742, 8.0, -5.78585076868676, 4.68629150101524, -4.15826451958632, 4.0 @@ -211,7 +212,7 @@ public final class FastCosineTransformerTest @Test public void testParameters() throws Exception { final UnivariateFunction sinFunction = new Sin(); - final DoubleUnaryOperator f = (x) -> sinFunction.value(x); + final DoubleUnaryOperator f = x -> sinFunction.value(x); final FastCosineTransform transformer = new FastCosineTransform(FastCosineTransform.Norm.STD); try { @@ -241,26 +242,26 @@ public final class FastCosineTransformerTest @Test public void testSinFunction() { final UnivariateFunction sinFunction = new Sin(); - final DoubleUnaryOperator f = (x) -> sinFunction.value(x); + final DoubleUnaryOperator f = x -> sinFunction.value(x); final FastCosineTransform transformer = new FastCosineTransform(FastCosineTransform.Norm.STD); - double min, max, result[], tolerance = 1e-12; - int N = 9; + double tolerance = 1e-12; + int size = 9; - final double expected[] = { + final double[] expected = { 0.0, 3.26197262739567, 0.0, -2.17958042710327, 0.0, -0.648846697642915, 0.0, -0.433545502649478, 0.0 }; - min = 0.0; - max = 2.0 * Math.PI * N / (N - 1); - result = transformer.apply(f, min, max, N); - for (int i = 0; i < N; i++) { + double min = 0.0; + double max = 2.0 * Math.PI * size / (size - 1); + double[] result = transformer.apply(f, min, max, size); + for (int i = 0; i < size; i++) { Assert.assertEquals(expected[i], result[i], tolerance); } min = -Math.PI; - max = Math.PI * (N + 1) / (N - 1); - result = transformer.apply(f, min, max, N); - for (int i = 0; i < N; i++) { + max = Math.PI * (size + 1) / (size - 1); + result = transformer.apply(f, min, max, size); + for (int i = 0; i < size; i++) { Assert.assertEquals(-expected[i], result[i], tolerance); } } diff --git a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastFourierTransformerTest.java b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastFourierTransformerTest.java index 2e3e3d6b2..2095618cc 100644 --- a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastFourierTransformerTest.java +++ b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastFourierTransformerTest.java @@ -37,7 +37,7 @@ import org.apache.commons.math3.analysis.function.Sinc; */ public final class FastFourierTransformerTest { private static final Sin SIN_FUNCTION = new Sin(); - private static final DoubleUnaryOperator SIN = (x) -> SIN_FUNCTION.value(x); + private static final DoubleUnaryOperator SIN = x -> SIN_FUNCTION.value(x); /** RNG. */ private static final UniformRandomProvider RNG = RandomSource.create(RandomSource.MWC_256); @@ -50,7 +50,7 @@ public final class FastFourierTransformerTest { final Complex[] x = createComplexData(n); final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { final FastFourierTransform fft = new FastFourierTransform(norm[i], type); try { fft.apply(x); @@ -69,7 +69,7 @@ public final class FastFourierTransformerTest { final double[] x = createRealData(n); final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { final FastFourierTransform fft = new FastFourierTransform(norm[i], type); try { fft.apply(x); @@ -87,7 +87,7 @@ public final class FastFourierTransformerTest { final int n = 127; final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { final FastFourierTransform fft = new FastFourierTransform(norm[i], type); try { fft.apply(SIN, 0.0, Math.PI, n); @@ -105,7 +105,7 @@ public final class FastFourierTransformerTest { final int n = -128; final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { final FastFourierTransform fft = new FastFourierTransform(norm[i], type); try { fft.apply(SIN, 0.0, Math.PI, n); @@ -124,7 +124,7 @@ public final class FastFourierTransformerTest { final int n = 128; final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { final FastFourierTransform fft = new FastFourierTransform(norm[i], type); try { fft.apply(SIN, Math.PI, 0.0, n); @@ -195,7 +195,7 @@ public final class FastFourierTransformerTest { final double s; if (!inverse) { expected = dft(x, -1); - if (normalization == FastFourierTransform.Norm.STD){ + if (normalization == FastFourierTransform.Norm.STD) { s = 1.0; } else { s = 1.0 / Math.sqrt(n); @@ -309,7 +309,7 @@ public final class FastFourierTransformerTest { public void testTransformComplex() { final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { doTestTransformComplex(2, 1e-15, norm[i], type); doTestTransformComplex(4, 1e-14, norm[i], type); doTestTransformComplex(8, 1e-13, norm[i], type); @@ -325,7 +325,7 @@ public final class FastFourierTransformerTest { public void testStandardTransformReal() { final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { doTestTransformReal(2, 1e-15, norm[i], type); doTestTransformReal(4, 1e-14, norm[i], type); doTestTransformReal(8, 1e-13, norm[i], type); @@ -340,14 +340,14 @@ public final class FastFourierTransformerTest { @Test public void testStandardTransformFunction() { final UnivariateFunction sinc = new Sinc(); - final DoubleUnaryOperator f = (x) -> sinc.value(x); + final DoubleUnaryOperator f = x -> sinc.value(x); final double min = -Math.PI; final double max = Math.PI; final FastFourierTransform.Norm[] norm = FastFourierTransform.Norm.values(); for (int i = 0; i < norm.length; i++) { - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { doTestTransformFunction(f, min, max, 2, 1e-15, norm[i], type); doTestTransformFunction(f, min, max, 4, 1e-14, norm[i], type); doTestTransformFunction(f, min, max, 8, 1e-14, norm[i], type); @@ -367,10 +367,11 @@ public final class FastFourierTransformerTest { @Test public void testAdHocData() { FastFourierTransform transformer; - Complex result[]; double tolerance = 1e-12; + Complex[] result; + double tolerance = 1e-12; - final double x[] = {1.3, 2.4, 1.7, 4.1, 2.9, 1.7, 5.1, 2.7}; - final Complex y[] = { + final double[] x = {1.3, 2.4, 1.7, 4.1, 2.9, 1.7, 5.1, 2.7}; + final Complex[] y = { Complex.ofCartesian(21.9, 0.0), Complex.ofCartesian(-2.09497474683058, 1.91507575950825), Complex.ofCartesian(-2.6, 2.7), @@ -394,9 +395,9 @@ public final class FastFourierTransformerTest { Assert.assertEquals(0.0, result[i].getImaginary(), tolerance); } - double x2[] = {10.4, 21.6, 40.8, 13.6, 23.2, 32.8, 13.6, 19.2}; + double[] x2 = {10.4, 21.6, 40.8, 13.6, 23.2, 32.8, 13.6, 19.2}; TransformUtils.scaleInPlace(x2, 1.0 / Math.sqrt(x2.length)); - Complex y2[] = y; + Complex[] y2 = y; transformer = new FastFourierTransform(FastFourierTransform.Norm.UNIT); result = transformer.apply(y2); @@ -419,18 +420,19 @@ public final class FastFourierTransformerTest { @Test public void testSinFunction() { FastFourierTransform transformer; - Complex result[]; int N = 1 << 8; - double min, max, tolerance = 1e-12; + Complex[] result; + int size = 1 << 8; + double tolerance = 1e-12; - min = 0.0; - max = 2 * Math.PI; + double min = 0.0; + double max = 2 * Math.PI; transformer = new FastFourierTransform(FastFourierTransform.Norm.STD); - result = transformer.apply(SIN, min, max, N); + result = transformer.apply(SIN, min, max, size); Assert.assertEquals(0.0, result[1].getReal(), tolerance); - Assert.assertEquals(-(N >> 1), result[1].getImaginary(), tolerance); - Assert.assertEquals(0.0, result[N-1].getReal(), tolerance); - Assert.assertEquals(N >> 1, result[N-1].getImaginary(), tolerance); - for (int i = 0; i < N-1; i += (i == 0 ? 2 : 1)) { + Assert.assertEquals(-(size >> 1), result[1].getImaginary(), tolerance); + Assert.assertEquals(0.0, result[size - 1].getReal(), tolerance); + Assert.assertEquals(size >> 1, result[size - 1].getImaginary(), tolerance); + for (int i = 0; i < size - 1; i += i == 0 ? 2 : 1) { Assert.assertEquals(0.0, result[i].getReal(), tolerance); Assert.assertEquals(0.0, result[i].getImaginary(), tolerance); } @@ -438,12 +440,12 @@ public final class FastFourierTransformerTest { min = -Math.PI; max = Math.PI; transformer = new FastFourierTransform(FastFourierTransform.Norm.STD, true); - result = transformer.apply(SIN, min, max, N); + result = transformer.apply(SIN, min, max, size); Assert.assertEquals(0.0, result[1].getReal(), tolerance); Assert.assertEquals(-0.5, result[1].getImaginary(), tolerance); - Assert.assertEquals(0.0, result[N-1].getReal(), tolerance); - Assert.assertEquals(0.5, result[N-1].getImaginary(), tolerance); - for (int i = 0; i < N-1; i += (i == 0 ? 2 : 1)) { + Assert.assertEquals(0.0, result[size - 1].getReal(), tolerance); + Assert.assertEquals(0.5, result[size - 1].getImaginary(), tolerance); + for (int i = 0; i < size - 1; i += i == 0 ? 2 : 1) { Assert.assertEquals(0.0, result[i].getReal(), tolerance); Assert.assertEquals(0.0, result[i].getImaginary(), tolerance); } diff --git a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastHadamardTransformerTest.java b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastHadamardTransformerTest.java index 34993175e..dd152895a 100644 --- a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastHadamardTransformerTest.java +++ b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastHadamardTransformerTest.java @@ -23,7 +23,7 @@ import org.apache.commons.numbers.core.Precision; /** - * Test for {@link FestHadamardTransform}. + * Test for {@link FastHadamardTransform}. */ public final class FastHadamardTransformerTest { /** @@ -31,8 +31,8 @@ public final class FastHadamardTransformerTest { */ @Test public void test8Points() { - checkAllTransforms(new int[] { 1, 4, -2, 3, 0, 1, 4, -1 }, - new int[] { 10, -4, 2, -4, 2, -12, 6, 8 }); + checkAllTransforms(new int[] {1, 4, -2, 3, 0, 1, 4, -1}, + new int[] {10, -4, 2, -4, 2, -12, 6, 8}); } /** @@ -40,8 +40,8 @@ public final class FastHadamardTransformerTest { */ @Test public void test4Points() { - checkAllTransforms(new int[] { 1, 2, 3, 4 }, - new int[] { 10, -2, -4, 0 }); + checkAllTransforms(new int[] {1, 2, 3, 4}, + new int[] {10, -2, -4, 0}); } /** @@ -50,11 +50,11 @@ public final class FastHadamardTransformerTest { @Test public void testNoIntInverse() { final FastHadamardTransform transformer = new FastHadamardTransform(true); - final double[] x = transformer.apply(new double[] { 0, 1, 0, 1}); - Assert.assertEquals( 0.5, x[0], 0); + final double[] x = transformer.apply(new double[] {0, 1, 0, 1}); + Assert.assertEquals(0.5, x[0], 0); Assert.assertEquals(-0.5, x[1], 0); - Assert.assertEquals( 0.0, x[2], 0); - Assert.assertEquals( 0.0, x[3], 0); + Assert.assertEquals(0.0, x[2], 0); + Assert.assertEquals(0.0, x[3], 0); } /** @@ -85,7 +85,7 @@ public final class FastHadamardTransformerTest { for (int i = 0; i < dX.length; ++i) { dX[i] = x[i]; } - final double dResult[] = transformer.apply(dX); + final double[] dResult = transformer.apply(dX); for (int i = 0; i < dResult.length; i++) { // compare computed results to precomputed results Assert.assertTrue(Precision.equals(y[i], dResult[i], 1)); @@ -97,12 +97,11 @@ public final class FastHadamardTransformerTest { final FastHadamardTransform transformer = new FastHadamardTransform(); // check integer transform - final int iResult[] = transformer.apply(x); + final int[] iResult = transformer.apply(x); for (int i = 0; i < iResult.length; i++) { // compare computed results to precomputed results Assert.assertEquals(y[i], iResult[i]); } - } private void checkInverseDoubleTransform(int[]x, int[] y) { @@ -114,12 +113,10 @@ public final class FastHadamardTransformerTest { for (int i = 0; i < dY.length; ++i) { dY[i] = y[i]; } - final double dResult[] = transformer.apply(dY); + final double[] dResult = transformer.apply(dY); for (int i = 0; i < dResult.length; i++) { // compare computed results to precomputed results Assert.assertTrue(Precision.equals(x[i], dResult[i], 1)); } - } - } diff --git a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastSineTransformerTest.java b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastSineTransformerTest.java index e8178f010..f44154409 100644 --- a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastSineTransformerTest.java +++ b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/FastSineTransformerTest.java @@ -122,7 +122,7 @@ public final class FastSineTransformerTest extends RealTransformerAbstractTest { @Override DoubleUnaryOperator getValidFunction() { final UnivariateFunction sinc = new Sinc(); - return (x) -> sinc.value(x); + return x -> sinc.value(x); } @Override @@ -180,7 +180,7 @@ public final class FastSineTransformerTest extends RealTransformerAbstractTest { final double[] data = new double[] { 1, 1, 1, 1 }; - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { try { final RealTransform transformer = createRealTransformer(type); transformer.apply(data); @@ -199,19 +199,19 @@ public final class FastSineTransformerTest extends RealTransformerAbstractTest { @Test public void testAdHocData() { FastSineTransform transformer; - double result[], tolerance = 1e-12; + double tolerance = 1e-12; - final double x[] = { + final double[] x = { 0, 1, 2, 3, 4, 5, 6, 7 }; - final double y[] = { + final double[] y = { 0.0, 20.1093579685034, -9.65685424949238, 5.98642305066196, -4.0, 2.67271455167720, -1.65685424949238, 0.795649469518633 }; transformer = new FastSineTransform(FastSineTransform.Norm.STD); - result = transformer.apply(x); + double[] result = transformer.apply(x); for (int i = 0; i < result.length; i++) { Assert.assertEquals(y[i], result[i], tolerance); } @@ -243,23 +243,24 @@ public final class FastSineTransformerTest extends RealTransformerAbstractTest { @Test public void testSinFunction() { final UnivariateFunction sinFunction = new Sin(); - final DoubleUnaryOperator f = (x) -> sinFunction.value(x); + final DoubleUnaryOperator f = x -> sinFunction.value(x); final FastSineTransform transformer = new FastSineTransform(FastSineTransform.Norm.STD); - double min, max, result[], tolerance = 1e-12; int N = 1 << 8; + double tolerance = 1e-12; + int size = 1 << 8; - min = 0.0; - max = 2 * Math.PI; - result = transformer.apply(f, min, max, N); - Assert.assertEquals(N >> 1, result[2], tolerance); - for (int i = 0; i < N; i += (i == 1 ? 2 : 1)) { + double min = 0.0; + double max = 2 * Math.PI; + double[] result = transformer.apply(f, min, max, size); + Assert.assertEquals(size >> 1, result[2], tolerance); + for (int i = 0; i < size; i += i == 1 ? 2 : 1) { Assert.assertEquals(0.0, result[i], tolerance); } min = -Math.PI; max = Math.PI; - result = transformer.apply(f, min, max, N); - Assert.assertEquals(-(N >> 1), result[2], tolerance); - for (int i = 0; i < N; i += (i == 1 ? 2 : 1)) { + result = transformer.apply(f, min, max, size); + Assert.assertEquals(-(size >> 1), result[2], tolerance); + for (int i = 0; i < size; i += i == 1 ? 2 : 1) { Assert.assertEquals(0.0, result[i], tolerance); } } @@ -270,7 +271,7 @@ public final class FastSineTransformerTest extends RealTransformerAbstractTest { @Test public void testParameters() throws Exception { final UnivariateFunction sinFunction = new Sin(); - final DoubleUnaryOperator f = (x) -> sinFunction.value(x); + final DoubleUnaryOperator f = x -> sinFunction.value(x); final FastSineTransform transformer = new FastSineTransform(FastSineTransform.Norm.STD); try { diff --git a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/RealTransformerAbstractTest.java b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/RealTransformerAbstractTest.java index a4191101d..50f5710ef 100644 --- a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/RealTransformerAbstractTest.java +++ b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/RealTransformerAbstractTest.java @@ -20,7 +20,6 @@ import org.junit.Assert; import org.junit.Test; import java.util.function.DoubleUnaryOperator; - import org.apache.commons.rng.UniformRandomProvider; import org.apache.commons.rng.simple.RandomSource; @@ -29,7 +28,7 @@ import org.apache.commons.rng.simple.RandomSource; * This abstract test handles the automatic generation of random data of various * sizes. For each generated data array, actual values (returned by the * transformer to be tested) are compared to expected values, returned by the - * {@link #apply(double[])} (to be implemented by the user: a naive method may + * {@link #transform(double[], boolean)} (to be implemented by the user: a naive method may * be used). Methods are also provided to test that invalid parameters throw the * expected exceptions. * @@ -49,7 +48,7 @@ public abstract class RealTransformerAbstractTest { /** * Returns an invalid data size. Transforms with this data size should - * trigger a {@link MathIllegalArgumentException}. + * trigger a {@link IllegalArgumentException}. * * @param i the index of the invalid data size ({@code 0 <= i <} * {@link #getNumberOfInvalidDataSizes()} @@ -116,7 +115,7 @@ public abstract class RealTransformerAbstractTest { /** * Returns a sampling upper bound for the accuracy check of - * {@link RealTransform#apply(DoubleUnaryOperator, double, double, int, TransformType)}. + * {@link RealTransform#apply(DoubleUnaryOperator, double, double, int)}. * This upper bound should be valid. In other words, none of the above * methods should throw an exception when passed this bound. * @@ -143,7 +142,7 @@ public abstract class RealTransformerAbstractTest { public void testTransformRealInvalidDataSize() { for (int i = 0; i < getNumberOfInvalidDataSizes(); i++) { final int n = getInvalidDataSize(i); - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { try { final RealTransform transformer = createRealTransformer(type); transformer.apply(createRealData(n)); @@ -156,7 +155,7 @@ public abstract class RealTransformerAbstractTest { } /** - * {@link RealTransformer#(DoubleUnaryOperator, double, double, int)} + * {@link RealTransform#apply(DoubleUnaryOperator, double, double, int)} * should throw {@link IllegalArgumentException} if number of samples is * invalid. */ @@ -167,7 +166,7 @@ public abstract class RealTransformerAbstractTest { final double b = getValidUpperBound(); for (int i = 0; i < getNumberOfInvalidDataSizes(); i++) { final int n = getInvalidDataSize(i); - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { try { final RealTransform transformer = createRealTransformer(type); transformer.apply(f, a, b, n); @@ -191,7 +190,7 @@ public abstract class RealTransformerAbstractTest { final double b = getValidUpperBound(); for (int i = 0; i < getNumberOfValidDataSizes(); i++) { final int n = getValidDataSize(i); - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { try { final RealTransform transformer = createRealTransformer(type); transformer.apply(f, a, b, -n); @@ -215,7 +214,7 @@ public abstract class RealTransformerAbstractTest { final double b = getValidUpperBound(); for (int i = 0; i < getNumberOfValidDataSizes(); i++) { final int n = getValidDataSize(i); - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { try { final RealTransform transformer = createRealTransformer(type); transformer.apply(f, b, a, n); @@ -245,7 +244,7 @@ public abstract class RealTransformerAbstractTest { for (int i = 0; i < getNumberOfValidDataSizes(); i++) { final int n = getValidDataSize(i); final double tol = getRelativeTolerance(i); - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { doTestTransformReal(n, tol, type); } } @@ -253,10 +252,11 @@ public abstract class RealTransformerAbstractTest { /** * Accuracy check of - * {@link RealTransform#apply(DoubleUnaryOperator, double, double, int, TransformType)}. + * {@link RealTransform#apply(DoubleUnaryOperator, double, double, int)}. * For each valid data size returned by * {@link #getValidDataSize(int) getValidDataSize(i)}, - * the {@link UnivariateFunction} returned by {@link #getValidFunction()} is + * the {@link org.apache.commons.math3.analysis.UnivariateFunction UnivariateFunction} + * returned by {@link #getValidFunction()} is * sampled. The actual transform is computed and compared to the expected * transform, return by {@link #transform(double[], boolean)}. Actual * and expected values should be equal to within the relative error returned @@ -267,7 +267,7 @@ public abstract class RealTransformerAbstractTest { for (int i = 0; i < getNumberOfValidDataSizes(); i++) { final int n = getValidDataSize(i); final double tol = getRelativeTolerance(i); - for (boolean type : new boolean[] { true, false }) { + for (boolean type : new boolean[] {true, false}) { doTestTransformFunction(n, tol, type); } } diff --git a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/TransformUtilsTest.java b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/TransformUtilsTest.java index 817ae69dc..e273e71e0 100644 --- a/commons-math-transform/src/test/java/org/apache/commons/math4/transform/TransformUtilsTest.java +++ b/commons-math-transform/src/test/java/org/apache/commons/math4/transform/TransformUtilsTest.java @@ -28,20 +28,20 @@ import org.apache.commons.math3.analysis.function.Sin; */ public class TransformUtilsTest { private static final Sin SIN_FUNCTION = new Sin(); - private static final DoubleUnaryOperator SIN = (x) -> SIN_FUNCTION.value(x); + private static final DoubleUnaryOperator SIN = x -> SIN_FUNCTION.value(x); @Test(expected = TransformException.class) - public void testSampleWrongBounds(){ + public void testSampleWrongBounds() { TransformUtils.sample(SIN, Math.PI, 0.0, 10); } @Test(expected = TransformException.class) - public void testSampleNegativeNumberOfPoints(){ + public void testSampleNegativeNumberOfPoints() { TransformUtils.sample(SIN, 0.0, Math.PI, -1); } @Test(expected = TransformException.class) - public void testSampleNullNumberOfPoints(){ + public void testSampleNullNumberOfPoints() { TransformUtils.sample(SIN, 0.0, Math.PI, 0); } diff --git a/src/main/resources/checkstyle/checkstyle-legacy.xml b/src/main/resources/checkstyle/checkstyle-legacy.xml new file mode 100644 index 000000000..23d566af6 --- /dev/null +++ b/src/main/resources/checkstyle/checkstyle-legacy.xml @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/checkstyle/checkstyle-suppressions-legacy.xml b/src/main/resources/checkstyle/checkstyle-suppressions-legacy.xml new file mode 100644 index 000000000..476544448 --- /dev/null +++ b/src/main/resources/checkstyle/checkstyle-suppressions-legacy.xml @@ -0,0 +1,26 @@ + + + + + + + + + diff --git a/src/main/resources/checkstyle/checkstyle-suppressions.xml b/src/main/resources/checkstyle/checkstyle-suppressions.xml index 476544448..f35fe257d 100644 --- a/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -19,8 +19,32 @@ "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd"> - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/checkstyle/checkstyle.xml b/src/main/resources/checkstyle/checkstyle.xml index 23d566af6..f6f5aa784 100644 --- a/src/main/resources/checkstyle/checkstyle.xml +++ b/src/main/resources/checkstyle/checkstyle.xml @@ -81,6 +81,7 @@ +