This is an automated email from the ASF dual-hosted git repository. aherbert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-numbers.git
commit a0e56e1fd241d9fd77973c137c0608dc12ff44f0 Author: Alex Herbert <aherb...@apache.org> AuthorDate: Thu Oct 14 08:21:15 2021 +0100 NUMBERS-172: Use Boost Error function implementation Replace the use of the regularized gamma functions P and Q to evaluate the error function. --- .../org/apache/commons/numbers/gamma/BoostErf.java | 301 ++++++++++++ .../java/org/apache/commons/numbers/gamma/Erf.java | 39 +- .../org/apache/commons/numbers/gamma/Erfc.java | 44 +- .../apache/commons/numbers/gamma/BoostErfTest.java | 159 ++++++- .../commons/numbers/gamma/erf_close_to_1_data.csv | 159 +++++++ .../org/apache/commons/numbers/gamma/erf_data.csv | 522 +++++++++++++++++++++ .../commons/numbers/gamma/erf_large_data.csv | 92 ++++ .../commons/numbers/gamma/erf_small_data.csv | 172 +++++++ src/main/resources/pmd/pmd-ruleset.xml | 13 + 9 files changed, 1449 insertions(+), 52 deletions(-) diff --git a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostErf.java b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostErf.java index 08845fc..3569099 100644 --- a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostErf.java +++ b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostErf.java @@ -34,6 +34,14 @@ package org.apache.commons.numbers.gamma; * Boost C++ Error functions</a> */ final class BoostErf { + /** + * The multiplier used to split the double value into high and low parts. From + * Dekker (1971): "The constant should be chosen equal to 2^(p - p/2) + 1, + * where p is the number of binary digits in the mantissa". Here p is 53 + * and the multiplier is {@code 2^27 + 1}. + */ + private static final double MULTIPLIER = 1.0 + 0x1.0p27; + /** Private constructor. */ private BoostErf() { // intentionally empty. @@ -51,6 +59,12 @@ final class BoostErf { // - Explicitly inline the polynomial function evaluation // using Horner's method (https://en.wikipedia.org/wiki/Horner%27s_method) // - Support odd function for f(0.0) = -f(-0.0) + // Erf: + // - Change extended precision z*z to compute the square round-off + // using Dekker's method + // - Change the erf threshold for z when p=1 from + // z > 5.8f to z > 5.930664 + // - Change edge case detection for integer z // Inverse erf: // - Change inverse erf edge case detection to include NaN // @@ -61,6 +75,211 @@ final class BoostErf { // The values are unchanged from the Boost reference. /** + * Returns the complementary error function. + * + * @param x the value. + * @return the complementary error function. + */ + static double erfc(double x) { + return erfImp(x, true); + } + + /** + * Returns the error function. + * + * @param x the value. + * @return the error function. + */ + static double erf(double x) { + return erfImp(x, false); + } + + /** + * 53-bit implementation for the error function. + * + * @param z Point to evaluate + * @param invert true to invert the result (for the complementary error function) + * @return the error function result + */ + private static double erfImp(double z, boolean invert) { + if (Double.isNaN(z)) { + return Double.NaN; + } + + if (z < 0) { + if (!invert) { + return -erfImp(-z, invert); + } else if (z < -0.5) { + return 2 - erfImp(-z, invert); + } else { + return 1 + erfImp(-z, false); + } + } + + double result; + + // + // Big bunch of selection statements now to pick + // which implementation to use, + // try to put most likely options first: + // + if (z < 0.5) { + // + // We're going to calculate erf: + // + if (z < 1e-10) { + if (z == 0) { + result = z; + } else { + final double c = 0.003379167095512573896158903121545171688; + result = z * 1.125f + z * c; + } + } else { + // Maximum Deviation Found: 1.561e-17 + // Expected Error Term: 1.561e-17 + // Maximum Relative Change in Control Points: 1.155e-04 + // Max Error found at double precision = 2.961182e-17 + + final double Y = 1.044948577880859375f; + final double zz = z * z; + double P; + P = -0.000322780120964605683831; + P = -0.00772758345802133288487 + P * zz; + P = -0.0509990735146777432841 + P * zz; + P = -0.338165134459360935041 + P * zz; + P = 0.0834305892146531832907 + P * zz; + double Q; + Q = 0.000370900071787748000569; + Q = 0.00858571925074406212772 + Q * zz; + Q = 0.0875222600142252549554 + Q * zz; + Q = 0.455004033050794024546 + Q * zz; + Q = 1.0 + Q * zz; + result = z * (Y + P / Q); + } + // Note: Boost threshold of 5.8f has been raised to approximately 5.93 (6073 / 1024) + } else if (invert ? (z < 28) : (z < 5.9306640625f)) { + // + // We'll be calculating erfc: + // + invert = !invert; + if (z < 1.5f) { + // Maximum Deviation Found: 3.702e-17 + // Expected Error Term: 3.702e-17 + // Maximum Relative Change in Control Points: 2.845e-04 + // Max Error found at double precision = 4.841816e-17 + final double Y = 0.405935764312744140625f; + final double zm = z - 0.5; + double P; + P = 0.00180424538297014223957; + P = 0.0195049001251218801359 + P * zm; + P = 0.0888900368967884466578 + P * zm; + P = 0.191003695796775433986 + P * zm; + P = 0.178114665841120341155 + P * zm; + P = -0.098090592216281240205 + P * zm; + double Q; + Q = 0.337511472483094676155e-5; + Q = 0.0113385233577001411017 + Q * zm; + Q = 0.12385097467900864233 + Q * zm; + Q = 0.578052804889902404909 + Q * zm; + Q = 1.42628004845511324508 + Q * zm; + Q = 1.84759070983002217845 + Q * zm; + Q = 1.0 + Q * zm; + result = Y + P / Q; + result *= Math.exp(-z * z) / z; + } else if (z < 2.5f) { + // Max Error found at double precision = 6.599585e-18 + // Maximum Deviation Found: 3.909e-18 + // Expected Error Term: 3.909e-18 + // Maximum Relative Change in Control Points: 9.886e-05 + final double Y = 0.50672817230224609375f; + final double zm = z - 1.5; + double P; + P = 0.000235839115596880717416; + P = 0.00323962406290842133584 + P * zm; + P = 0.0175679436311802092299 + P * zm; + P = 0.04394818964209516296 + P * zm; + P = 0.0386540375035707201728 + P * zm; + P = -0.0243500476207698441272 + P * zm; + double Q; + Q = 0.00410369723978904575884; + Q = 0.0563921837420478160373 + Q * zm; + Q = 0.325732924782444448493 + Q * zm; + Q = 0.982403709157920235114 + Q * zm; + Q = 1.53991494948552447182 + Q * zm; + Q = 1.0 + Q * zm; + result = Y + P / Q; + final double sq = z * z; + final double errSqr = squareLowUnscaled(z, sq); + result *= Math.exp(-sq) * Math.exp(-errSqr) / z; + } else if (z < 4.5f) { + // Maximum Deviation Found: 1.512e-17 + // Expected Error Term: 1.512e-17 + // Maximum Relative Change in Control Points: 2.222e-04 + // Max Error found at double precision = 2.062515e-17 + final double Y = 0.5405750274658203125f; + final double zm = z - 3.5; + double P; + P = 0.113212406648847561139e-4; + P = 0.000250269961544794627958 + P * zm; + P = 0.00212825620914618649141 + P * zm; + P = 0.00840807615555585383007 + P * zm; + P = 0.0137384425896355332126 + P * zm; + P = 0.00295276716530971662634 + P * zm; + double Q; + Q = 0.000479411269521714493907; + Q = 0.0105982906484876531489 + Q * zm; + Q = 0.0958492726301061423444 + Q * zm; + Q = 0.442597659481563127003 + Q * zm; + Q = 1.04217814166938418171 + Q * zm; + Q = 1.0 + Q * zm; + result = Y + P / Q; + final double sq = z * z; + final double errSqr = squareLowUnscaled(z, sq); + result *= Math.exp(-sq) * Math.exp(-errSqr) / z; + } else { + // Max Error found at double precision = 2.997958e-17 + // Maximum Deviation Found: 2.860e-17 + // Expected Error Term: 2.859e-17 + // Maximum Relative Change in Control Points: 1.357e-05 + final double Y = 0.5579090118408203125f; + final double iz = 1 / z; + double P; + P = -2.8175401114513378771; + P = -3.22729451764143718517 + P * iz; + P = -2.5518551727311523996 + P * iz; + P = -0.687717681153649930619 + P * iz; + P = -0.212652252872804219852 + P * iz; + P = 0.0175389834052493308818 + P * iz; + P = 0.00628057170626964891937 + P * iz; + double Q; + Q = 5.48409182238641741584; + Q = 13.5064170191802889145 + Q * iz; + Q = 22.9367376522880577224 + Q * iz; + Q = 15.930646027911794143 + Q * iz; + Q = 11.0567237927800161565 + Q * iz; + Q = 2.79257750980575282228 + Q * iz; + Q = 1.0 + Q * iz; + result = Y + P / Q; + final double sq = z * z; + final double errSqr = squareLowUnscaled(z, sq); + result *= Math.exp(-sq) * Math.exp(-errSqr) / z; + } + } else { + // + // Any value of z larger than 28 will underflow to zero: + // + result = 0; + invert = !invert; + } + + if (invert) { + result = 1 - result; + } + + return result; + } + + /** * Returns the inverse complementary error function. * * @param z Value (in {@code [0, 2]}). @@ -368,5 +587,87 @@ final class BoostErf { } return result; } + + // Extended precision multiplication specialised for the square adapted from: + // org.apache.commons.numbers.core.ExtendedPrecision + + /** + * Compute the low part of the double length number {@code (z,zz)} for the exact + * square of {@code x} using Dekker's mult12 algorithm. The standard precision product + * {@code x*x} must be provided. The number {@code x} is split into high and low parts + * using Dekker's algorithm. + * + * <p>Warning: This method does not perform scaling in Dekker's split and large + * finite numbers can create NaN results. + * + * @param x Number to square + * @param xx Standard precision product {@code x*x} + * @return the low part of the square double length number + */ + private static double squareLowUnscaled(double x, double xx) { + // Split the numbers using Dekker's algorithm without scaling + final double hx = highPartUnscaled(x); + final double lx = x - hx; + + return squareLow(hx, lx, xx); + } + + /** + * Implement Dekker's method to split a value into two parts. Multiplying by (2^s + 1) creates + * a big value from which to derive the two split parts. + * <pre> + * c = (2^s + 1) * a + * a_big = c - a + * a_hi = c - a_big + * a_lo = a - a_hi + * a = a_hi + a_lo + * </pre> + * + * <p>The multiplicand allows a p-bit value to be split into + * (p-s)-bit value {@code a_hi} and a non-overlapping (s-1)-bit value {@code a_lo}. + * Combined they have (p-1) bits of significand but the sign bit of {@code a_lo} + * contains a bit of information. The constant is chosen so that s is ceil(p/2) where + * the precision p for a double is 53-bits (1-bit of the mantissa is assumed to be + * 1 for a non sub-normal number) and s is 27. + * + * <p>This conversion does not use scaling and the result of overflow is NaN. Overflow + * may occur when the exponent of the input value is above 996. + * + * <p>Splitting a NaN or infinite value will return NaN. + * + * @param value Value. + * @return the high part of the value. + * @see Math#getExponent(double) + */ + private static double highPartUnscaled(double value) { + final double c = MULTIPLIER * value; + return c - (c - value); + } + + /** + * Compute the low part of the double length number {@code (z,zz)} for the exact + * square of {@code x} using Dekker's mult12 algorithm. The standard + * precision product {@code x*x} must be provided. The number {@code x} + * should already be split into low and high parts. + * + * <p>Note: This uses the high part of the result {@code (z,zz)} as {@code x * x} and not + * {@code hx * hx + hx * lx + lx * hx} as specified in Dekker's original paper. + * See Shewchuk (1997) for working examples. + * + * @param hx High part of factor. + * @param lx Low part of factor. + * @param xx Square of the factor. + * @return <code>lx * ly - (((xy - hx * hy) - lx * hy) - hx * ly)</code> + * @see <a href="http://www-2.cs.cmu.edu/afs/cs/project/quake/public/papers/robust-arithmetic.ps"> + * Shewchuk (1997) Theorum 18</a> + */ + private static double squareLow(double hx, double lx, double xx) { + // Compute the multiply low part: + // err1 = xy - hx * hy + // err2 = err1 - lx * hy + // err3 = err2 - hx * ly + // low = lx * ly - err3 + return lx * lx - ((xx - hx * hx) - 2 * lx * hx); + } } diff --git a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erf.java b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erf.java index 0d32074..6d86f6e 100644 --- a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erf.java +++ b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erf.java @@ -17,42 +17,35 @@ package org.apache.commons.numbers.gamma; /** - * <a href="http://mathworld.wolfram.com/Erf.html">Error function</a>. + * <a href="https://mathworld.wolfram.com/Erf.html">Error function</a>. + * + * <p>\[ \operatorname{erf}(z) = \frac{2}{\sqrt\pi}\int_0^z e^{-t^2}\,dt \] */ public final class Erf { - /** The threshold value for returning the extreme value. */ - private static final double EXTREME_VALUE_BOUND = 40; - /** Private constructor. */ private Erf() { // intentionally empty. } /** - * <p> - * This implementation computes erf(x) using the - * {@link RegularizedGamma.P#value(double, double, double, int) regularized gamma function}, - * following <a href="http://mathworld.wolfram.com/Erf.html"> Erf</a>, equation (3) - * </p> + * Returns the error function. * - * <p> - * The returned value is always between -1 and 1 (inclusive). - * If {@code abs(x) > 40}, then {@code Erf.value(x)} is indistinguishable from - * either 1 or -1 at {@code double} precision, so the appropriate extreme value - * is returned. - * </p> + * <p>The returned value is always between -1 and 1 (inclusive). + * The appropriate extreme is returned when {@code erf(x)} is + * indistinguishable from either -1 or 1 at {@code double} precision. + * + * <p>Special cases: + * <ul> + * <li>If the argument is 0, then the result is 0. + * <li>If the argument is {@code > 6}, then the result is 1. + * <li>If the argument is {@code < 6}, then the result is -1. + * <li>If the argument is nan, then the result is nan. + * </ul> * * @param x the value. * @return the error function. - * @throws ArithmeticException if the algorithm fails to converge. - * - * @see RegularizedGamma.P#value(double, double, double, int) */ public static double value(double x) { - if (Math.abs(x) > EXTREME_VALUE_BOUND) { - return x > 0 ? 1 : -1; - } - final double ret = RegularizedGamma.P.value(0.5, x * x, 1e-15, 10000); - return x < 0 ? -ret : ret; + return BoostErf.erf(x); } } diff --git a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erfc.java b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erfc.java index 44a6879..19f62f9 100644 --- a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erfc.java +++ b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/Erfc.java @@ -17,45 +17,39 @@ package org.apache.commons.numbers.gamma; /** - * <a href="http://mathworld.wolfram.com/Erfc.html">Complementary error function</a>. + * <a href="https://mathworld.wolfram.com/Erfc.html">Complementary error function</a>. + * + * <p>\[ \begin{aligned} \operatorname{erfc}(z) + * &= 1 - \operatorname{erf}(z) \\ + * &= \frac{2}{\sqrt\pi}\int_z^{\infty} e^{-t^2}\,dt + * \end{aligned} \] */ public final class Erfc { - /** The threshold value for returning the extreme value. */ - private static final double EXTREME_VALUE_BOUND = 40; - /** Private constructor. */ private Erfc() { // intentionally empty. } /** - * <p> - * This implementation computes erfc(x) using the - * {@link RegularizedGamma.Q#value(double, double, double, int) regularized gamma function}, - * following <a href="http://mathworld.wolfram.com/Erf.html">Erf</a>, equation (3). - * </p> + * Returns the complementary error function. * - * <p> - * The value returned is always between 0 and 2 (inclusive). - * If {@code abs(x) > 40}, then {@code erf(x)} is indistinguishable from - * either 0 or 2 at {@code double} precision, so the appropriate extreme - * value is returned. - * </p> + * <p>The value returned is always between 0 and 2 (inclusive). + * The appropriate extreme is returned when {@code erfc(x)} is + * indistinguishable from either 0 or 2 at {@code double} precision. + * + * <p>Special cases: + * <ul> + * <li>If the argument is 0, then the result is 1. + * <li>If the argument is {@code > 28}, then the result is 0. + * <li>If the argument is {@code < 6}, then the result is 2. + * <li>If the argument is nan, then the result is nan. + * </ul> * * @param x Value. * @return the complementary error function. - * @throws ArithmeticException if the algorithm fails to converge. - * - * @see RegularizedGamma.Q#value(double, double, double, int) */ public static double value(double x) { - if (Math.abs(x) > EXTREME_VALUE_BOUND) { - return x > 0 ? 0 : 2; - } - final double ret = RegularizedGamma.Q.value(0.5, x * x, 1e-15, 10000); - return x < 0 ? - 2 - ret : - ret; + return BoostErf.erfc(x); } } diff --git a/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/BoostErfTest.java b/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/BoostErfTest.java index 8f2a6f0..e171269 100644 --- a/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/BoostErfTest.java +++ b/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/BoostErfTest.java @@ -46,6 +46,8 @@ class BoostErfTest { * This is a utility to identify if the function is an odd function: f(x) = -f(-x). */ private enum TestFunction { + ERF(BoostErf::erf, true), + ERFC(BoostErf::erfc, false), ERF_INV(BoostErf::erfInv, true), ERFC_INV(BoostErf::erfcInv, false); @@ -94,10 +96,33 @@ class BoostErfTest { * pass. Spot checks on larger errors have been verified against the reference * implementation compiled with promotion of double <strong>disabled</strong>. * + * <p>For the erf and erfc functions the Boost error is due to the accuracy of + * exponentiation. From the Boost test_erf.cpp: + * <pre> + * "On MacOS X erfc has much higher error levels than + * expected: given that the implementation is basically + * just a rational function evaluation combined with + * exponentiation, we conclude that exp and pow are less + * accurate on this platform, especially when the result + * is outside the range of a double." + * </pre> + * * @see <a href="https://www.boost.org/doc/libs/1_77_0/libs/math/doc/html/math_toolkit/relative_error.html">Relative error</a> * @see <a href="https://www.boost.org/doc/libs/1_77_0/libs/math/doc/html/math_toolkit/pol_tutorial/policy_tut_defaults.html">Policy defaults</a> */ private enum TestCase { + /** Erf Boost data. */ + ERF(TestFunction.ERF, 1.4, 0.25), + /** Erfc Boost data. */ + ERFC(TestFunction.ERFC, 2.2, 0.5), + /** Erf Boost large data (simple case where all z>8, p=1.0). */ + ERF_LARGE(TestFunction.ERF, 0, 0.0), + /** Erfc Boost large data. */ + ERFC_LARGE(TestFunction.ERFC, 1.99, 0.75), + /** Erf Boost small data (no exponentiation required). */ + ERF_SMALL(TestFunction.ERF, 1.2, 0.25), + /** Erfc Boost small data (no exponentiation required: ulp=0). */ + ERFC_SMALL(TestFunction.ERFC, 0, 0.0), /** Inverse Erf Boost data. */ ERF_INV(TestFunction.ERF_INV, 1.8, 0.65), /** Inverse Erfc Boost data. */ @@ -232,6 +257,132 @@ class BoostErfTest { @ParameterizedTest @CsvSource({ + "-Infinity, -1", + "Infinity, 1", + "0, 0", + // Odd function + "-0.0, -0.0", + "NaN, NaN", + // Realistic limits + "-6, -1", + "6, 1", + }) + void testErfEdgeCases(double z, double p) { + Assertions.assertEquals(p, BoostErf.erf(z)); + } + + @ParameterizedTest + @CsvSource({ + "-Infinity, 2", + "Infinity, 0", + "0, 1", + "NaN, NaN", + // Realistic limits + "-6, 2", + "28, 0", + }) + void testErfcEdgeCases(double z, double q) { + Assertions.assertEquals(q, BoostErf.erfc(z)); + } + + @ParameterizedTest + @Order(1) + @CsvFileSource(resources = "erf_data.csv") + void testErf(double z, BigDecimal p, double q) { + assertErf(TestCase.ERF, z, p); + } + + @Test + @Order(1010) + void testErfRMS() { + assertRms(TestCase.ERF); + } + + @ParameterizedTest + @Order(1) + @CsvFileSource(resources = "erf_data.csv") + void testErfc(double z, double p, BigDecimal q) { + assertErf(TestCase.ERFC, z, q); + } + + @Test + @Order(1020) + void testErfcRMS() { + assertRms(TestCase.ERFC); + } + + @ParameterizedTest + @Order(1) + @CsvFileSource(resources = "erf_large_data.csv") + void testErfLarge(double z, BigDecimal p, double q) { + assertErf(TestCase.ERF_LARGE, z, p); + } + + @Test + @Order(1030) + void testErfLargeRMS() { + assertRms(TestCase.ERF_LARGE); + } + + @ParameterizedTest + @Order(1) + @CsvFileSource(resources = "erf_large_data.csv") + void testErfcLarge(double z, double p, BigDecimal q) { + assertErf(TestCase.ERFC_LARGE, z, q); + } + + @Test + @Order(1040) + void testErfcLargeRMS() { + assertRms(TestCase.ERFC_LARGE); + } + + @ParameterizedTest + @Order(1) + @CsvFileSource(resources = "erf_small_data.csv") + void testErfSmall(double z, BigDecimal p, double q) { + assertErf(TestCase.ERF_SMALL, z, p); + } + + @Test + @Order(1050) + void testErfSmallRMS() { + assertRms(TestCase.ERF_SMALL); + } + + @ParameterizedTest + @Order(1) + @CsvFileSource(resources = "erf_small_data.csv") + void testErfcSmall(double z, double p, BigDecimal q) { + assertErf(TestCase.ERFC_SMALL, z, q); + } + + @Test + @Order(1060) + void testErfcSmallRMS() { + assertRms(TestCase.ERFC_SMALL); + } + + /** + * This tests the erf function as the result approaches 1.0. The Boost threshold + * for large z is 5.8f. This is too low and results in 2 ulp errors when z is + * just above 5.8 and the result is 0.9999999999999998. + * + * @param z Value to test + * @param p Expected p + */ + @ParameterizedTest + @CsvFileSource(resources = "erf_close_to_1_data.csv") + void testErfCloseTo1(double z, double p) { + Assertions.assertTrue(5.8 < z, () -> "z not above Boost threshold: " + z); + Assertions.assertTrue(z < 5.95, () -> "z not close to Boost threhsold: " + z); + Assertions.assertTrue(p <= 1.0, () -> "p not <= 1: " + p); + Assertions.assertEquals(1.0, p, 0x1.0p-52, "Value not with 2 ulp of 1.0"); + Assertions.assertEquals(p, BoostErf.erf(z)); + } + + @ParameterizedTest + @CsvSource({ "0, 0", // Odd function "-0.0, -0.0", @@ -331,10 +482,10 @@ class BoostErfTest { @Test void testErfRoundTrip() { assertRoundTrip("erf(erfInv(x))", - x -> Erf.value(BoostErf.erfInv(x)), + x -> BoostErf.erf(BoostErf.erfInv(x)), // Inverse Erf domain: [-1, 1] -0.95, 1, 0.125, - 5L, 2.99); + 2L, 0.99); } /** @@ -343,10 +494,10 @@ class BoostErfTest { @Test void testErfcRoundTrip() { assertRoundTrip("erfc(erfcInv(x))", - x -> Erfc.value(BoostErf.erfcInv(x)), + x -> BoostErf.erfc(BoostErf.erfcInv(x)), // Inverse Erfc domain: [0, 2] 0.125, 2, 0.125, - 15L, 3.99); + 2L, 0.99); } /** diff --git a/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_close_to_1_data.csv b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_close_to_1_data.csv new file mode 100644 index 0000000..d6ed9f9 --- /dev/null +++ b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_close_to_1_data.csv @@ -0,0 +1,159 @@ +# 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. + +# Erf close to 1 +# +# Data generated using the following matlab script +# using variable precision arithmetic (vpa). +# Values should be machine representable using double precision. +# +# f = fopen('erf_close_to_1_data.csv', 'wt'); +# digits(30); +# for i = [5950:6080] +# fprintf(f, "%.17g,%s\n", i/1024, vpa(erf(sym(i/1024)))); +# end +# fclose(f); + +5.810546875,0.999999999999999791958062733146 +5.8115234375,0.999999999999999794339532405692 +5.8125,0.999999999999999796694123729017 +5.8134765625,0.999999999999999799022135624054 +5.814453125,0.999999999999999801323863738235 +5.8154296875,0.999999999999999803599600480763 +5.81640625,0.999999999999999805849635057516 +5.8173828125,0.99999999999999980807425350557 +5.818359375,0.999999999999999810273738727369 +5.8193359375,0.999999999999999812448370524522 +5.8203125,0.999999999999999814598425631252 +5.8212890625,0.99999999999999981672417774748 +5.822265625,0.999999999999999818825897571563 +5.8232421875,0.999999999999999820903852832688 +5.82421875,0.999999999999999822958308322917 +5.8251953125,0.999999999999999824989525928893 +5.826171875,0.999999999999999826997764663212 +5.8271484375,0.999999999999999828983280695457 +5.828125,0.999999999999999830946327382911 +5.8291015625,0.999999999999999832887155300935 +5.830078125,0.999999999999999834806012273026 +5.8310546875,0.999999999999999836703143400561 +5.83203125,0.999999999999999838578791092215 +5.8330078125,0.999999999999999840433195093076 +5.833984375,0.999999999999999842266592513446 +5.8349609375,0.999999999999999844079217857332 +5.8359375,0.999999999999999845871303050644 +5.8369140625,0.999999999999999847643077469084 +5.837890625,0.999999999999999849394767965741 +5.8388671875,0.999999999999999851126598898395 +5.83984375,0.999999999999999852838792156527 +5.8408203125,0.999999999999999854531567188044 +5.841796875,0.999999999999999856205141025717 +5.8427734375,0.99999999999999985785972831334 +5.84375,0.999999999999999859495541331608 +5.8447265625,0.999999999999999861112790023722 +5.845703125,0.999999999999999862711682020719 +5.8466796875,0.999999999999999864292422666534 +5.84765625,0.999999999999999865855215042791 +5.8486328125,0.999999999999999867400259993336 +5.849609375,0.999999999999999868927756148501 +5.8505859375,0.999999999999999870437899949118 +5.8515625,0.999999999999999871930885670268 +5.8525390625,0.999999999999999873406905444781 +5.853515625,0.999999999999999874866149286487 +5.8544921875,0.999999999999999876308805113216 +5.85546875,0.999999999999999877735058769551 +5.8564453125,0.999999999999999879145094049344 +5.857421875,0.999999999999999880539092717984 +5.8583984375,0.999999999999999881917234534436 +5.859375,0.999999999999999883279697273034 +5.8603515625,0.99999999999999988462665674505 +5.861328125,0.999999999999999885958286820028 +5.8623046875,0.999999999999999887274759446895 +5.86328125,0.999999999999999888576244674835 +5.8642578125,0.999999999999999889862910673956 +5.865234375,0.99999999999999989113492375572 +5.8662109375,0.999999999999999892392448393167 +5.8671875,0.999999999999999893635647240914 +5.8681640625,0.999999999999999894864681154947 +5.869140625,0.999999999999999896079709212193 +5.8701171875,0.999999999999999897280888729891 +5.87109375,0.99999999999999989846837528475 +5.8720703125,0.999999999999999899642322731904 +5.873046875,0.999999999999999900802883223664 +5.8740234375,0.999999999999999901950207228066 +5.875,0.999999999999999903084443547228 +5.8759765625,0.9999999999999999042057393355 +5.876953125,0.999999999999999905314240117428 +5.8779296875,0.99999999999999990641008980552 +5.87890625,0.999999999999999907493430717825 +5.8798828125,0.999999999999999908564403595321 +5.880859375,0.999999999999999909623147619119 +5.8818359375,0.999999999999999910669800427479 +5.8828125,0.999999999999999911704498132647 +5.8837890625,0.999999999999999912727375337509 +5.884765625,0.999999999999999913738565152067 +5.8857421875,0.999999999999999914738199209736 +5.88671875,0.999999999999999915726407683473 +5.8876953125,0.999999999999999916703319301722 +5.888671875,0.999999999999999917669061364196 +5.8896484375,0.999999999999999918623759757488 +5.890625,0.999999999999999919567538970512 +5.8916015625,0.999999999999999920500522109777 +5.892578125,0.999999999999999921422830914503 +5.8935546875,0.999999999999999922334585771566 +5.89453125,0.999999999999999923235905730293 +5.8955078125,0.999999999999999924126908517082 +5.896484375,0.999999999999999925007710549884 +5.8974609375,0.999999999999999925878426952512 +5.8984375,0.999999999999999926739171568808 +5.8994140625,0.99999999999999992759005697665 +5.900390625,0.999999999999999928431194501812 +5.9013671875,0.999999999999999929262694231675 +5.90234375,0.999999999999999930084665028788 +5.9033203125,0.999999999999999930897214544282 +5.904296875,0.999999999999999931700449231146 +5.9052734375,0.99999999999999993249447435735 +5.90625,0.999999999999999933279394018838 +5.9072265625,0.999999999999999934055311152368 +5.908203125,0.999999999999999934822327548226 +5.9091796875,0.999999999999999935580543862796 +5.91015625,0.999999999999999936330059630993 +5.9111328125,0.999999999999999937070973278568 +5.912109375,0.999999999999999937803382134274 +5.9130859375,0.999999999999999938527382441906 +5.9140625,0.999999999999999939243069372207 +5.9150390625,0.999999999999999939950537034645 +5.916015625,0.999999999999999940649878489069 +5.9169921875,0.999999999999999941341185757232 +5.91796875,0.999999999999999942024549834194 +5.9189453125,0.999999999999999942700060699598 +5.919921875,0.999999999999999943367807328828 +5.9208984375,0.999999999999999944027877704043 +5.921875,0.999999999999999944680358825097 +5.9228515625,0.999999999999999945325336720333 +5.923828125,0.999999999999999945962896457267 +5.9248046875,0.999999999999999946593122153154 +5.92578125,0.999999999999999947216096985439 +5.9267578125,0.999999999999999947831903202093 +5.927734375,0.999999999999999948440622131848 +5.9287109375,0.999999999999999949042334194303 +5.9296875,0.999999999999999949637118909936 +5.9306640625,0.999999999999999950225054910001 +5.931640625,0.999999999999999950806219946321 +5.9326171875,0.999999999999999951380690900967 +5.93359375,0.999999999999999951948543795844 +5.9345703125,0.999999999999999952509853802165 +5.935546875,0.999999999999999953064695249823 +5.9365234375,0.999999999999999953613141636663 +5.9375,0.999999999999999954155265637656 diff --git a/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_data.csv b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_data.csv new file mode 100644 index 0000000..0c9f923 --- /dev/null +++ b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_data.csv @@ -0,0 +1,522 @@ +# 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. + +# (C) Copyright John Maddock 2006-7. +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# Extracted from: boost/libs/math/test/erf_data.ipp + +-7.954905033111572265625,-0.9999999999999999999999999999768236114552,1.999999999999999999999999999976823611455 +-7.925852298736572265625,-0.9999999999999999999999999999631035087875,1.999999999999999999999999999963103508787 +-7.923464298248291015625,-0.9999999999999999999999999999616689085769,1.999999999999999999999999999961668908577 +-7.870497226715087890625,-0.999999999999999999999999999910929780403,1.999999999999999999999999999910929780403 +-7.809566974639892578125,-0.9999999999999999999999999997666672740312,1.999999999999999999999999999766667274031 +-7.78337383270263671875,-0.9999999999999999999999999996477997000614,1.999999999999999999999999999647799700061 +-7.75354480743408203125,-0.9999999999999999999999999994380404842296,1.99999999999999999999999999943804048423 +-7.735670566558837890625,-0.9999999999999999999999999992571019874276,1.999999999999999999999999999257101987428 +-7.715617656707763671875,-0.9999999999999999999999999989846832415537,1.999999999999999999999999998984683241554 +-7.7047863006591796875,-0.999999999999999999999999998798456908148,1.999999999999999999999999998798456908148 +-7.53247547149658203125,-0.9999999999999999999999999830308685738632,1.999999999999999999999999983030868573863 +-7.490674495697021484375,-0.9999999999999999999999999680283814121658,1.999999999999999999999999968028381412166 +-7.4677028656005859375,-0.9999999999999999999999999547824309252063,1.999999999999999999999999954782430925206 +-7.45092296600341796875,-0.9999999999999999999999999417916071317633,1.999999999999999999999999941791607131763 +-7.448862552642822265625,-0.999999999999999999999999939960596846754,1.999999999999999999999999939960596846754 +-7.428613185882568359375,-0.9999999999999999999999999186357837637381,1.999999999999999999999999918635783763738 +-7.41693973541259765625,-0.9999999999999999999999999030902896226869,1.999999999999999999999999903090289622687 +-7.352462291717529296875,-0.9999999999999999999999997466806221320354,1.999999999999999999999999746680622132035 +-7.32713413238525390625,-0.9999999999999999999999996313499781458314,1.999999999999999999999999631349978145831 +-7.311619281768798828125,-0.9999999999999999999999995363881484604713,1.999999999999999999999999536388148460471 +-7.279047489166259765625,-0.9999999999999999999999992510468758087201,1.99999999999999999999999925104687580872 +-7.261257648468017578125,-0.999999999999999999999999027617901396665,1.999999999999999999999999027617901396665 +-7.232891559600830078125,-0.9999999999999999999999985274747006541921,1.999999999999999999999998527474700654192 +-7.20552921295166015625,-0.9999999999999999999999978059072279635353,1.999999999999999999999997805907227963535 +-7.18053722381591796875,-0.9999999999999999999999968458614521146074,1.999999999999999999999996845861452114607 +-7.14955902099609375,-0.9999999999999999999999950624010083082766,1.999999999999999999999995062401008308277 +-7.13679790496826171875,-0.9999999999999999999999940645544114571544,1.999999999999999999999994064554411457154 +-7.043527126312255859375,-0.9999999999999999999999774337000610083234,1.999999999999999999999977433700061008323 +-6.9184741973876953125,-0.9999999999999999999998683679500951423272,1.999999999999999999999868367950095142327 +-6.7863311767578125,-0.9999999999999999999991795120414840889856,1.999999999999999999999179512041484088986 +-6.784533023834228515625,-0.9999999999999999999991590255661336519112,1.999999999999999999999159025566133651911 +-6.75908756256103515625,-0.9999999999999999999988086234364717344992,1.999999999999999999998808623436471734499 +-6.7491912841796875,-0.9999999999999999999986362669470340916908,1.999999999999999999998636266947034091691 +-6.701987743377685546875,-0.999999999999999999997409009041632256952,1.999999999999999999997409009041632256952 +-6.658857822418212890625,-0.9999999999999999999953604766205454848685,1.999999999999999999995360476620545484869 +-6.649026393890380859375,-0.9999999999999999999947043111854298902328,1.999999999999999999994704311185429890233 +-6.63174724578857421875,-0.9999999999999999999933213242713558320894,1.999999999999999999993321324271355832089 +-6.562829494476318359375,-0.9999999999999999999832486398825313868824,1.999999999999999999983248639882531386882 +-6.474317073822021484375,-0.9999999999999999999461767620323245787117,1.999999999999999999946176762032324578712 +-6.456727504730224609375,-0.9999999999999999999322505846330688168028,1.999999999999999999932250584633068816803 +-6.44589138031005859375,-0.9999999999999999999219560784452381988458,1.999999999999999999921956078445238198846 +-6.439353466033935546875,-0.9999999999999999999150123383981949772306,1.999999999999999999915012338398194977231 +-6.388184070587158203125,-0.9999999999999999998348790206445813875893,1.999999999999999999834879020644581387589 +-6.293555736541748046875,-0.9999999999999999994437019971919548391819,1.999999999999999999443701997191954839182 +-6.2710094451904296875,-0.9999999999999999992589325173780715980195,1.99999999999999999925893251737807159802 +-6.242211818695068359375,-0.9999999999999999989326493643877411691996,1.9999999999999999989326493643877411692 +-6.22209262847900390625,-0.999999999999999998624109280849850203527,1.999999999999999998624109280849850203527 +-6.220756053924560546875,-0.9999999999999999986007425210281758251292,1.999999999999999998600742521028175825129 +-6.200567722320556640625,-0.9999999999999999981962301352174253788249,1.999999999999999998196230135217425378825 +-6.188919544219970703125,-0.9999999999999999979123729253091532478511,1.999999999999999997912372925309153247851 +-6.121317386627197265625,-0.9999999999999999951502004864042604960246,1.999999999999999995150200486404260496025 +-6.0960369110107421875,-0.999999999999999993368492031514234286194,1.999999999999999993368492031514234286194 +-6.08724498748779296875,-0.9999999999999999926083315666932664549236,1.999999999999999992608331566693266454924 +-6.026896953582763671875,-0.9999999999999999844955556006137776564529,1.999999999999999984495555600613777656453 +-5.9970760345458984375,-0.9999999999999999777013911828554459912853,1.999999999999999977701391182855445991285 +-5.98565387725830078125,-0.9999999999999999743831687415390670278399,1.99999999999999997438316874153906702784 +-5.96821117401123046875,-0.999999999999999968354398455085434720569,1.999999999999999968354398455085434720569 +-5.92245578765869140625,-0.9999999999999999450648430800723663224774,1.999999999999999945064843080072366322477 +-5.921500682830810546875,-0.9999999999999999444311537798288144041217,1.999999999999999944431153779828814404122 +-5.888427257537841796875,-0.9999999999999999174281958873362911444154,1.999999999999999917428195887336291144415 +-5.87206363677978515625,-0.9999999999999998996343433163177337705717,1.999999999999999899634343316317733770572 +-5.860218048095703125,-0.9999999999999998844434106367807360220097,1.99999999999999988444341063678073602201 +-5.83236789703369140625,-0.9999999999999998392204407202278816953224,1.999999999999999839220440720227881695322 +-5.822903156280517578125,-0.9999999999999998201851297606348078114632,1.999999999999999820185129760634807811463 +-5.7919788360595703125,-0.9999999999999997411398900200191738483065,1.999999999999999741139890020019173848306 +-5.782009124755859375,-0.9999999999999997089916610994263590057672,1.999999999999999708991661099426359005767 +-5.757698535919189453125,-0.9999999999999996131703510337485986984616,1.999999999999999613170351033748598698462 +-5.7298183441162109375,-0.9999999999999994646206751994613491480939,1.999999999999999464620675199461349148094 +-5.6807231903076171875,-0.9999999999999990546672380240389993944094,1.999999999999999054667238024038999394409 +-5.67137622833251953125,-0.9999999999999989471628690116228142127541,1.999999999999998947162869011622814212754 +-5.63473606109619140625,-0.9999999999999983967395492779530149899861,1.999999999999998396739549277953014989986 +-5.614176273345947265625,-0.9999999999999979723800510435190721967745,1.999999999999997972380051043519072196774 +-5.6112957000732421875,-0.9999999999999979047003987118507997439545,1.999999999999997904700398711850799743955 +-5.56195163726806640625,-0.9999999999999963321711826091909555528649,1.999999999999996332171182609190955552865 +-5.52898502349853515625,-0.999999999999994682538283828212635195642,1.999999999999994682538283828212635195642 +-5.47819042205810546875,-0.9999999999999906156035801749079852647386,1.999999999999990615603580174907985264739 +-5.4710788726806640625,-0.9999999999999898428944822493616106985002,1.9999999999999898428944822493616106985 +-5.405083179473876953125,-0.9999999999999789329565303176610969074478,1.999999999999978932956530317661096907448 +-5.402743816375732421875,-0.9999999999999783844591899263947698611185,1.999999999999978384459189926394769861119 +-5.398212432861328125,-0.9999999999999772817558127269992185563875,1.999999999999977281755812726999218556388 +-5.39404582977294921875,-0.9999999999999762190932060075070452678252,1.999999999999976219093206007507045267825 +-5.349620342254638671875,-0.9999999999999613641252395001102021837028,1.999999999999961364125239500110202183703 +-5.3191070556640625,-0.9999999999999462010476635137780577801192,1.999999999999946201047663513778057780119 +-5.2961597442626953125,-0.9999999999999310743837318684932169157806,1.999999999999931074383731868493216915781 +-5.2686710357666015625,-0.9999999999999073829182184635550018139178,1.999999999999907382918218463555001813918 +-5.261013031005859375,-0.999999999999899463963517023463646064969,1.999999999999899463963517023463646064969 +-5.218157291412353515625,-0.999999999999841220863178602997391812622,1.999999999999841220863178602997391812622 +-5.09483242034912109375,-0.9999999999994203324744342031290577923874,1.999999999999420332474434203129057792387 +-5.09044742584228515625,-0.9999999999993933525823679657367786914755,1.999999999999393352582367965736778691476 +-5.0638217926025390625,-0.9999999999992009929816947679454761069971,1.999999999999200992981694767945476106997 +-5.05747509002685546875,-0.9999999999991469518921467092111635858909,1.999999999999146951892146709211163585891 +-5.04293918609619140625,-0.9999999999990093020187848982236516240641,1.999999999999009302018784898223651624064 +-5.0100383758544921875,-0.9999999999986122073654265981749793751861,1.999999999998612207365426598174979375186 +-4.98588848114013671875,-0.9999999999982250531272305424718207921526,1.999999999998225053127230542471820792153 +-4.97671985626220703125,-0.999999999998051837006412113097549508585,1.999999999998051837006412113097549508585 +-4.88807392120361328125,-0.9999999999952475475430397811200299233621,1.999999999995247547543039781120029923362 +-4.883771419525146484375,-0.999999999995039278283384091602446410145,1.999999999995039278283384091602446410145 +-4.85447597503662109375,-0.9999999999933632419317336295299664149692,1.999999999993363241931733629529966414969 +-4.8071804046630859375,-0.9999999999894197712585954179441600183832,1.999999999989419771258595417944160018383 +-4.8020343780517578125,-0.999999999988871990172530478547610656837,1.999999999988871990172530478547610656837 +-4.67612361907958984375,-0.9999999999623486826561914023506448369931,1.999999999962348682656191402350644836993 +-4.67091083526611328125,-0.9999999999604264343616001426261420203042,1.999999999960426434361600142626142020304 +-4.63665485382080078125,-0.9999999999451799554409023277165162445309,1.999999999945179955440902327716516244531 +-4.63516998291015625,-0.9999999999444029440920085430347846425569,1.999999999944402944092008543034784642557 +-4.609210968017578125,-0.9999999999289428162110384732949528732821,1.999999999928942816211038473294952873282 +-4.579636096954345703125,-0.9999999999061772810501309067972710348531,1.999999999906177281050130906797271034853 +-4.5241947174072265625,-0.9999999998427575929141653776733036798231,1.999999999842757592914165377673303679823 +-4.4634552001953125,-0.9999999997250438347478646951934940057007,1.999999999725043834747864695193494005701 +-4.45205211639404296875,-0.9999999996948757672104213971222453301401,1.99999999969487576721042139712224533014 +-4.42528057098388671875,-0.9999999996107829436098873733936274863483,1.999999999610782943609887373393627486348 +-4.41900920867919921875,-0.9999999995880275737192502467322057148997,1.9999999995880275737192502467322057149 +-4.385251522064208984375,-0.9999999994413719520612921019983336162185,1.999999999441371952061292101998333616218 +-4.35737133026123046875,-0.9999999992828314119867337542458504771416,1.999999999282831411986733754245850477142 +-4.336368560791015625,-0.9999999991351915352325599843092928507457,1.999999999135191535232559984309292850746 +-4.3175029754638671875,-0.9999999989775860530323911767706859733538,1.999999998977586053032391176770685973354 +-4.3121891021728515625,-0.9999999989283533546777667686892314376364,1.999999998928353354677766768689231437636 +-4.24352169036865234375,-0.9999999980419084658739942819306906184851,1.999999998041908465873994281930690618485 +-4.2034626007080078125,-0.9999999972285679690220595850552637350437,1.999999997228567969022059585055263735044 +-4.167960643768310546875,-0.9999999962392394571627954662587140061652,1.999999996239239457162795466258714006165 +-4.16134166717529296875,-0.9999999960200815333961445529473170709169,1.999999996020081533396144552947317070917 +-4.16075992584228515625,-0.9999999960002360604729678479207669714279,1.999999996000236060472967847920766971428 +-4.1587848663330078125,-0.9999999959321378359433584056353681610608,1.999999995932137835943358405635368161061 +-4.13293933868408203125,-0.9999999949300206910645246208514668562552,1.999999994930020691064524620851466856255 +-4.10360050201416015625,-0.9999999935003875691498030735774774570481,1.999999993500387569149803073577477457048 +-4.093787670135498046875,-0.9999999929399558954302260075393445424033,1.999999992939955895430226007539344542403 +-4.03443813323974609375,-0.9999999884036843046875049228478172494175,1.999999988403684304687504922847817249418 +-3.98265838623046875,-0.9999999822208421118305103285259015091646,1.999999982220842111830510328525901509165 +-3.95270442962646484375,-0.999999977288881596788417317605289657808,1.999999977288881596788417317605289657808 +-3.93148517608642578125,-0.9999999730162981717884382202253382435415,1.999999973016298171788438220225338243541 +-3.9184780120849609375,-0.9999999700219312753222765854504223837405,1.999999970021931275322276585450422383741 +-3.879868030548095703125,-0.9999999591094922703532983235991568008465,1.999999959109492270353298323599156800846 +-3.87096500396728515625,-0.9999999560932170720769359018836285296472,1.999999956093217072076935901883628529647 +-3.8672657012939453125,-0.9999999547774543398438306972996188616961,1.999999954777454339843830697299618861696 +-3.8420734405517578125,-0.9999999447445478718542012659151234910068,1.999999944744547871854201265915123491007 +-3.80461215972900390625,-0.9999999257348372704254553693981655561718,1.999999925734837270425455369398165556172 +-3.80028438568115234375,-0.9999999231677373273547880220190103959364,1.999999923167737327354788022019010395936 +-3.7924594879150390625,-0.9999999183064389713690424963266578644364,1.999999918306438971369042496326657864436 +-3.779153347015380859375,-0.9999999093479967587842599992485780175831,1.999999909347996758784259999248578017583 +-3.745269298553466796875,-0.9999998820281274980831886027456911311136,1.999999882028127498083188602745691131114 +-3.635951519012451171875,-0.9999997281881766345956227352142649973655,1.999999728188176634595622735214264997366 +-3.583598613739013671875,-0.9999995979271880120576416299198266820133,1.999999597927188012057641629919826682013 +-3.569232463836669921875,-0.9999995527387093906657265121528897426977,1.999999552738709390665726512152889742698 +-3.54402828216552734375,-0.9999994613639729253001570644107494201161,1.999999461363972925300157064410749420116 +-3.493962764739990234375,-0.9999992236058222995205263652341878797772,1.999999223605822299520526365234187879777 +-3.47722721099853515625,-0.9999991236228879726907047497841004833717,1.999999123622887972690704749784100483372 +-3.42657566070556640625,-0.9999987396721107155880129044796731448843,1.999998739672110715588012904479673144884 +-3.395120143890380859375,-0.9999984245945048910106563425119028396989,1.999998424594504891010656342511902839699 +-3.2588672637939453125,-0.9999959487230642521321857857111066240831,1.999995948723064252132185785711106624083 +-3.25318622589111328125,-0.9999957892666030355025210909109288232829,1.999995789266603035502521090910928823283 +-3.24752902984619140625,-0.9999956245131483542950695952847663629895,1.999995624513148354295069595284766362989 +-3.202692508697509765625,-0.999994081810816371407042912866658069023,1.999994081810816371407042912866658069023 +-3.18005847930908203125,-0.9999931172272250183599071058385709997756,1.999993117227225018359907105838570999776 +-3.1707630157470703125,-0.9999926790059947731109719912653300431319,1.999992679005994773110971991265330043132 +-3.169390201568603515625,-0.9999926120675897748726975211646249757192,1.999992612067589774872697521164624975719 +-3.14217662811279296875,-0.9999911578738950876912019671208070065199,1.99999115787389508769120196712080700652 +-3.098408222198486328125,-0.9999882303073587594668534541884135423388,1.999988230307358759466853454188413542339 +-3.06932735443115234375,-0.999985796037084204485104304979662919637,1.999985796037084204485104304979662919637 +-3.022363185882568359375,-0.9999808232882432626861296621474557768078,1.999980823288243262686129662147455776808 +-3.0205593109130859375,-0.99998060254361354516950352566536112825,1.99998060254361354516950352566536112825 +-2.9998722076416015625,-0.9999778917007014674907019090992903927905,1.99997789170070146749070190909929039279 +-2.93519306182861328125,-0.9999668959531720126596587741439225107667,1.999966895953172012659658774143922510767 +-2.926408290863037109375,-0.9999650517107016922239378838021163842873,1.999965051710701692223937883802116384287 +-2.899547100067138671875,-0.999958788198949955666474096263902253671,1.999958788198949955666474096263902253671 +-2.839828014373779296875,-0.9999408366877163447694128978591340253067,1.999940836687716344769412897859134025307 +-2.800583362579345703125,-0.999925245516783962943949700531260241058,1.999925245516783962943949700531260241058 +-2.680827617645263671875,-0.9998501167313102825068480156096308901785,1.999850116731310282506848015609630890178 +-2.606037616729736328125,-0.9997717403084130424047446475974562075669,1.999771740308413042404744647597456207567 +-2.596489429473876953125,-0.9997593314310112494727877345037418013218,1.999759331431011249472787734503741801322 +-2.556484699249267578125,-0.9997001335302201489942673149686527944858,1.999700133530220148994267314968652794486 +-2.55382823944091796875,-0.9996957549944839552321892922320479894269,1.999695754994483955232189292232047989427 +-2.4985675811767578125,-0.9995899165690053281055967168476241365437,1.999589916569005328105596716847624136544 +-2.497124195098876953125,-0.9995867384254941652801786367398089660165,1.999586738425494165280178636739808966017 +-2.490753173828125,-0.9995724334726506448073869548176702294685,1.999572433472650644807386954817670229469 +-2.460265636444091796875,-0.9994973515109755881934536091311894641618,1.999497351510975588193453609131189464162 +-2.40025997161865234375,-0.9993124098945743590409442455200430144501,1.99931240989457435904094424552004301445 +-2.388366222381591796875,-0.9992689456487626816982924092483781182671,1.999268945648762681698292409248378118267 +-2.384761810302734375,-0.9992552781640235711505276307965871326558,1.999255278164023571150527630796587132656 +-2.373447895050048828125,-0.9992108203337266317630339931581723787703,1.99921082033372663176303399315817237877 +-2.35580158233642578125,-0.9991365376081490204083636912804528578856,1.999136537608149020408363691280452857886 +-2.349462985992431640625,-0.9991083086054509601980729014412256941765,1.999108308605450960198072901441225694177 +-2.325789928436279296875,-0.9989951442451653569033517704201324436285,1.998995144245165356903351770420132443629 +-2.298477649688720703125,-0.9988481323367447342223184498893246720825,1.998848132336744734222318449889324672082 +-2.2262287139892578125,-0.9983581224514242039282878472715945919025,1.998358122451424203928287847271594591902 +-2.219295978546142578125,-0.998302189420417444109741372233572205265,1.998302189420417444109741372233572205265 +-2.189016819000244140625,-0.9980367577158553307156976632350258375259,1.998036757715855330715697663235025837526 +-2.104246616363525390625,-0.9970782617526262805996280944999396165258,1.997078261752626280599628094499939616526 +-2.09205150604248046875,-0.996909676793369814528976371166247129793,1.996909676793369814528976371166247129793 +-1.943993091583251953125,-0.9940262977790097894466206756466888367063,1.994026297779009789446620675646688836706 +-1.942249774932861328125,-0.9939812101597516949958261235233631934366,1.993981210159751694995826123523363193437 +-1.92929840087890625,-0.9936365327754943109828903386026580883517,1.993636532775494310982890338602658088352 +-1.9128665924072265625,-0.9931737109637705201269656939986887652236,1.993173710963770520126965693998688765224 +-1.895064830780029296875,-0.9926383642753156425388548860773597376898,1.99263836427531564253885488607735973769 +-1.882672786712646484375,-0.9922437750397196518941448785374711511261,1.992243775039719651894144878537471151126 +-1.828631877899169921875,-0.9902924477378445174333029970634342529452,1.990292447737844517433302997063434252945 +-1.80326557159423828125,-0.9892339674123972616044498747407170334529,1.989233967412397261604449874740717033453 +-1.782883167266845703125,-0.9883103648996334893102564452420811120219,1.988310364899633489310256445242081112022 +-1.782157421112060546875,-0.9882762203088354892421983954567744612798,1.98827622030883548924219839545677446128 +-1.764178752899169921875,-0.9874016428696177596270555371821625326888,1.987401642869617759627055537182162532689 +-1.724367618560791015625,-0.9852567034182150765341946638967494699071,1.985256703418215076534194663896749469907 +-1.72287273406982421875,-0.9851702400474429438625280403202433838526,1.985170240047442943862528040320243383853 +-1.7025623321533203125,-0.9839504468402545890671810248015208820884,1.983950446840254589067181024801520882088 +-1.681468486785888671875,-0.9825910751286767851758755186900841221579,1.982591075128676785175875518690084122158 +-1.620183467864990234375,-0.9780530894885187264467073421784139736619,1.978053089488518726446707342178413973662 +-1.60347747802734375,-0.9766500377526993846072575680069692660948,1.976650037752699384607257568006969266095 +-1.571071624755859375,-0.9737052575465025934260968149501583467125,1.973705257546502593426096814950158346713 +-1.53740596771240234375,-0.9703114107420642954692014594922082792993,1.970311410742064295469201459492208279299 +-1.532663822174072265625,-0.9698043138855053203894778295822038830362,1.969804313885505320389477829582203883036 +-1.520298004150390625,-0.9684468462170278589593123134293666728451,1.968446846217027858959312313429366672845 +-1.46048259735107421875,-0.9611180737284418513301177062365441297047,1.961118073728441851330117706236544129705 +-1.46030139923095703125,-0.9610938428333207830423176962413277320147,1.961093842833320783042317696241327732015 +-1.397335529327392578125,-0.95186004156783627938149047892729029742,1.95186004156783627938149047892729029742 +-1.323727130889892578125,-0.9387979426539853054753709161513664166231,1.938797942653985305475370916151366416623 +-1.276960849761962890625,-0.9290653127836001839333487555304113443469,1.929065312783600183933348755530411344347 +-1.251819610595703125,-0.9233295267095685592936382247773245095211,1.923329526709568559293638224777324509521 +-1.2465972900390625,-0.922091885695169724540643322054908203716,1.922091885695169724540643322054908203716 +-1.229358196258544921875,-0.9178904588743834920391721278905832368302,1.91789045887438349203917212789058323683 +-1.213331699371337890625,-0.9138215103657655632884642680979616998362,1.913821510365765563288464268097961699836 +-1.116681575775146484375,-0.8857158242630258840771197321511943815897,1.88571582426302588407711973215119438159 +-1.09737873077392578125,-0.8793205199265164668934947879280656428528,1.879320519926516466893494787928065642853 +-1.03606891632080078125,-0.8571398352791599842463927101183584004108,1.857139835279159984246392710118358400411 +-1.02882099151611328125,-0.8543231526950909266263537903698694334291,1.854323152695090926626353790369869433429 +-1.026262760162353515625,-0.8533188869429530167338078137781125122721,1.853318886942953016733807813778112512272 +-1.022119045257568359375,-0.8516809958278677712657998641436434438829,1.851680995827867771265799864143643443883 +-0.98133087158203125,-0.8348055259299460511418008829670873610918,1.834805525929946051141800882967087361092 +-0.98009014129638671875,-0.8342704307251498046946024215096246227333,1.834270430725149804694602421509624622733 +-0.978080272674560546875,-0.8334008602869646802889203803617335510339,1.833400860286964680288920380361733551034 +-0.940424442291259765625,-0.8164688788909394484793384087716057083799,1.81646887889093944847933840877160570838 +-0.91714763641357421875,-0.8053834793732810256405554109602821691384,1.805383479373281025640555410960282169138 +-0.8706207275390625,-0.781768246143243039204234681706396017802,1.781768246143243039204234681706396017802 +-0.851459980010986328125,-0.7714669440617130962820390740100194505811,1.771466944061713096282039074010019450581 +-0.838649749755859375,-0.7643894884988580737761809305277678222351,1.764389488498858073776180930527767822235 +-0.807102680206298828125,-0.7463029660131220821356233145746604568211,1.746302966013122082135623314574660456821 +-0.791334629058837890625,-0.736909415458981852160328895368373188263,1.736909415458981852160328895368373188263 +-0.785220623016357421875,-0.733203302564899727070457054931447622963,1.733203302564899727070457054931447622963 +-0.70347499847412109375,-0.6801975294548325529556721796784430699978,1.680197529454832552955672179678443069998 +-0.67217350006103515625,-0.6581909469611049063385748815906001209893,1.658190946961104906338574881590600120989 +-0.664049625396728515625,-0.6523246956990475458808567744402919677512,1.652324695699047545880856774440291967751 +-0.6584186553955078125,-0.6482212253745081770626529427408934017486,1.648221225374508177062652942740893401749 +-0.600412845611572265625,-0.6041810203314129078699785592786899867966,1.604181020331412907869978559278689986797 +-0.489749908447265625,-0.511446271301716371110680826950617647501,1.511446271301716371110680826950617647501 +-0.465226650238037109375,-0.4894167837515200466665783301747412934405,1.489416783751520046666578330174741293441 +-0.44869136810302734375,-0.4742750638478986908270201721978810099748,1.474275063847898690827020172197881009975 +-0.431758880615234375,-0.4585350903554068789999156737476376374281,1.458535090355406878999915673747637637428 +-0.42737865447998046875,-0.4544253812246350465277000224478606192938,1.454425381224635046527700022447860619294 +-0.40386104583740234375,-0.432099163831203009522492134188633143318,1.432099163831203009522492134188633143318 +-0.373790740966796875,-0.4029308717684010449096733839740115560375,1.402930871768401044909673383974011556038 +-0.233989715576171875,-0.2592886113836899036561306247377429906331,1.259288611383689903656130624737742990633 +-0.211333751678466796875,-0.2349615691289957823240891523819732686167,1.234961569128995782324089152381973268617 +-0.19889736175537109375,-0.2215069175571250998650947268880775414973,1.221506917557125099865094726888077541497 +-0.182256221771240234375,-0.2033995434419099358670147911035329678187,1.203399543441909935867014791103532967819 +-0.18211650848388671875,-0.2032470406749777206160247638754155004452,1.203247040674977720616024763875415500445 +-0.17195796966552734375,-0.1921381404648513701112796196929619853574,1.192138140464851370111279619692961985357 +-0.16376972198486328125,-0.1831554574798521513436655145245684061007,1.183155457479852151343665514524568406101 +-0.1551761627197265625,-0.1737022152361176281597084824103780401593,1.173702215236117628159708482410378040159 +-0.150575160980224609375,-0.1686304768425467295981309155148784764793,1.168630476842546729598130915514878476479 +-0.14617443084716796875,-0.1637729176827752878270766458400701270093,1.163772917682775287827076645840070127009 +-0.120928287506103515625,-0.1357907214549539753359678326306578109211,1.135790721454953975335967832630657810921 +-0.10677051544189453125,-0.120021374070160212148900319045677271623,1.120021374070160212148900319045677271623 +-0.026175022125244140625,-0.02952860584830764246354187242063295294678,1.029528605848307642463541872420632952947 +-0.023293018341064453125,-0.02627860393458503686138222115868091914281,1.026278603934585036861382221158680919143 +0.0510406494140625,0.05754323159766276460633141130734206381764,0.9424567684023372353936685886926579361824 +0.0586032867431640625,0.06605110514470391012871050500624176400922,0.9339488948552960898712894949937582359908 +0.076335906982421875,0.0859688297890711056959299022462129164399,0.9140311702109288943040700977537870835601 +0.0879764556884765625,0.09901527946158023583191911912735088560206,0.9009847205384197641680808808726491143979 +0.09531307220458984375,0.1072244906212039889473333509272810724811,0.8927755093787960110526666490727189275189 +0.125732421875,0.141129766841816338386433828128425005518,0.858870233158183661613566171871574994482 +0.136138916015625,0.1526725386198208366577407509841325704749,0.8473274613801791633422592490158674295251 +0.17234516143798828125,0.1925622815596925250765701529203770551484,0.8074377184403074749234298470796229448516 +0.2119922637939453125,0.2356720655395377271770852173917242884116,0.7643279344604622728229147826082757115884 +0.43794345855712890625,0.4643112756462460685205691813402852159015,0.5356887243537539314794308186597147840985 +0.45653057098388671875,0.4814821136114279472122846649867025115386,0.5185178863885720527877153350132974884614 +0.47747135162353515625,0.5004808072450297309682843640858704431896,0.4995191927549702690317156359141295568104 +0.49276065826416015625,0.5141150988347504841569692774090664542419,0.4858849011652495158430307225909335457581 +0.5252094268798828125,0.5423719706469999625701008732557153279125,0.4576280293530000374298991267442846720875 +0.54292964935302734375,0.5574049622516386907232939533524308087156,0.4425950377483613092767060466475691912844 +0.61347866058349609375,0.6143810907170157257383288013023603675948,0.3856189092829842742616711986976396324052 +0.642208099365234375,0.6362376857636366143813206114170006573371,0.3637623142363633856186793885829993426629 +0.7008876800537109375,0.6784144434439739073654322843049904496467,0.3215855565560260926345677156950095503533 +0.70489788055419921875,0.6811753668779429503087291745627064840922,0.3188246331220570496912708254372935159078 +0.74547100067138671875,0.7082339060756917047499724898172912878096,0.2917660939243082952500275101827087121904 +0.75010395050048828125,0.7112224614494741974710200961895796339406,0.2887775385505258025289799038104203660594 +0.7521419525146484375,0.7125305494335531148908418692735599063945,0.2874694505664468851091581307264400936055 +0.75544834136962890625,0.7146442322820387669270602166159252715355,0.2853557677179612330729397833840747284645 +0.7555294036865234375,0.7146959208691246816716474590070080412476,0.2853040791308753183283525409929919587524 +0.7955780029296875,0.7394606270451848746421982649233401081581,0.2605393729548151253578017350766598918419 +0.79776287078857421875,0.7407675218037960090659350830732732644233,0.2592324781962039909340649169267267355767 +0.802501678466796875,0.7435864497870381244667241506381330984847,0.2564135502129618755332758493618669015153 +0.84609889984130859375,0.7685236710399025207372546246556089909706,0.2314763289600974792627453753443910090294 +0.932300567626953125,0.812654343559088650769418669744883116426,0.187345656440911349230581330255116883574 +0.98491954803466796875,0.8363459095960576788409384172057128987876,0.1636540904039423211590615827942871012124 +1.0851459503173828125,0.8751247987335964581036476838295929858233,0.1248752012664035418963523161704070141767 +1.10117816925048828125,0.8806009859824617559963680716051525866734,0.1193990140175382440036319283948474133266 +1.1800746917724609375,0.9048583669746933087439482567321779057712,0.09514163302530669125605174326782209422885 +1.20333766937255859375,0.9112027176275558226265541876273530718072,0.08879728237244417737344581237264692819278 +1.25640106201171875,0.924402044657034973439387794208329304664,0.07559795534296502656061220579167069533596 +1.27527332305908203125,0.9286916599172518912865347736903588888277,0.07130834008274810871346522630964111117231 +1.295307159423828125,0.9330248800657541920348036618074490968745,0.06697511993424580796519633819255090312553 +1.35011577606201171875,0.9437833069017625783094606605709502627745,0.05621669309823742169053933942904973722551 +1.3642253875732421875,0.9463071202862943362652946301000630969371,0.05369287971370566373470536989993690306286 +1.36428356170654296875,0.9463173268680031585168957431066720358209,0.05368267313199684148310425689332796417912 +1.3927154541015625,0.9511154338502067564077082935533756107928,0.04888456614979324359229170644662438920721 +1.4851818084716796875,0.9643031892104382293515834445221352837052,0.03569681078956177064841655547786471629478 +1.51205730438232421875,0.9675134325647516868759572291075083838452,0.03248656743524831312404277089249161615477 +1.518337249755859375,0.9682268650544353738887342889004292746917,0.03177313494556462611126571109957072530829 +1.63171100616455078125,0.9789779282245029251422213871074674302737,0.02102207177549707485777861289253256972629 +1.64548969268798828125,0.9800386644418555265242976627229641636655,0.0199613355581444734757023372770358363345 +1.6677036285400390625,0.9816505008209075157523253425835050946976,0.01834949917909248424767465741649490530242 +1.85671520233154296875,0.9913552328828875044489090206698996138703,0.008644767117112495551090979330100386129716 +1.9257602691650390625,0.9935393324839248670687761360401723108545,0.006460667516075132931223863959827689145547 +1.95288181304931640625,0.994251490289876205808362023378052652071,0.005748509710123794191637976621947347929005 +1.95960140228271484375,0.994416616212766790816043281256924957545,0.005583383787233209183956718743075042454991 +1.97496891021728515625,0.9947782798791369498659664217390766721303,0.005221720120863050134033578260923327869708 +2.0098972320556640625,0.9955228085136240355207293005308942804012,0.004477191486375964479270699469105719598846 +2.03814983367919921875,0.9960531548179094257423200852703746881917,0.003946845182090574257679914729625311808335 +2.117748260498046875,0.9972550864787919269607935067171569551311,0.002744913521208073039206493282843044868944 +2.1290187835693359375,0.9973951443272600509200163541924012381496,0.002604855672739949079983645807598761850375 +2.23621368408203125,0.9984357051823096237088846035455957333292,0.00156429481769037629111539645440426667076 +2.303375244140625,0.9988758768562388876948647459384863503014,0.001124123143761112305135254061513649698603 +2.30908966064453125,0.9989074670835471212637911004565234713734,0.001092532916452878736208899543476528626611 +2.312808990478515625,0.9989275848915122403637796954988403953277,0.001072415108487759636220304501159604672322 +2.34100818634033203125,0.9990693226518036651484626523819889432217,0.0009306773481963348515373476180110567783143 +2.3639354705810546875,0.9991715482831704962257608094466908648703,0.0008284517168295037742391905533091351296536 +2.38584804534912109375,0.999259421812066783311382896374381171103,0.0007405781879332166886171036256188288969614 +2.43149852752685546875,0.9994153951428661086310888659892606189344,0.0005846048571338913689111340107393810656404 +2.4652652740478515625,0.9995104528238484099433299313593918017795,0.0004895471761515900566700686406081982204819 +2.48156833648681640625,0.99955099523573386718480702374077607517,0.0004490047642661328151929762592239248300062 +2.4876461029052734375,0.9995652906194901943292532623705382603416,0.0004347093805098056707467376294617396584017 +2.49185085296630859375,0.9995749306249868850890104144222839530978,0.000425069375013114910989585577716046902164 +2.49247837066650390625,0.9995763520644124185897036893206316527169,0.0004236479355875814102963106793683472830707 +2.56191158294677734375,0.9997088956437770874696680503820402085636,0.000291104356222912530331949617959791436386 +2.61768817901611328125,0.9997860681867462115075444425791486024542,0.0002139318132537884924555574208513975457818 +2.70856189727783203125,0.9998721090543402843946579280477699469948,0.0001278909456597156053420719522300530052477 +2.8597621917724609375,0.9999475235569074621407329404065298036302,0.5247644309253785926705959347019636981165e-4 +2.87231540679931640625,0.9999513599726121814302460826437500121134,0.486400273878185697539173562499878865947e-4 +2.87524318695068359375,0.9999522156906622409531206227837709057555,0.4778430933775904687937721622909424451951e-4 +2.87711620330810546875,0.9999527556197749239828920225935109603346,0.4724438022507601710797740648903966540875e-4 +2.88459300994873046875,0.9999548538467674878672671151663947818517,0.451461532325121327328848336052181482513e-4 +2.88650608062744140625,0.9999553763394753402536287360321951606741,0.4462366052465974637126396780483932586128e-4 +2.901752471923828125,0.9999593401316765560335455180271069550107,0.4065986832344396645448197289304498930035e-4 +2.988407135009765625,0.9999762377681189955434156740468765476593,0.2376223188100445658432595312345234070632e-4 +3.02743244171142578125,0.9999814308884347491833058360756432747941,0.1856911156525081669416392435672520592555e-4 +3.1172580718994140625,0.9999895895910693287857223981230233990902,0.1041040893067121427760187697660090977657e-4 +3.12372589111328125,0.9999900204264126334086680667418726148844,0.9979573587366591331933258127385115606816e-5 +3.18522739410400390625,0.9999933499347420108074901348507827945904,0.6650065257989192509865149217205409606005e-5 +3.29238796234130859375,0.9999967780665854867942389973420946273526,0.3221933414513205761002657905372647420117e-5 +3.2967376708984375,0.9999968729159633477071268771660526947916,0.3127084036652292873122833947305208397749e-5 +3.3171443939208984375,0.9999972832708583409073345432090835972393,0.2716729141659092665456790916402760700865e-5 +3.34983730316162109375,0.999997835067334282029598175811562644485,0.2164932665717970401824188437355514979697e-5 +3.3712615966796875,0.9999981364410852287169607711094884146581,0.1863558914771283039228890511585341885627e-5 +3.37945270538330078125,0.9999982406531561474633390199540623493194,0.1759346843852536660980045937650680642258e-5 +3.457611083984375,0.999998990617699127730974245504433748246,0.1009382300872269025754495566251753996237e-5 +3.4955196380615234375,0.9999992323270584793476652090838719488337,0.7676729415206523347909161280511663428336e-6 +3.5278949737548828125,0.9999993936918195198146685207850760783309,0.6063081804801853314792149239216690531313e-6 +3.61342334747314453125,0.9999996781007930814251486740993849897074,0.3218992069185748513259006150102926275088e-6 +3.6264705657958984375,0.9999997081011520562826605602874202304177,0.2918988479437173394397125797695823038285e-6 +3.631275177001953125,0.9999997184533550254224618089830656023236,0.2815466449745775381910169343976763508771e-6 +3.68529415130615234375,0.9999998129758023803895471307314617042189,0.1870241976196104528692685382957810818761e-6 +3.70755863189697265625,0.9999998422528716665807398297179388578707,0.1577471283334192601702820611421293094744e-6 +3.7247791290283203125,0.9999998618060870277521151678834001759796,0.1381939129722478848321165998240204186296e-6 +3.85035610198974609375,0.9999999482602965422579575137240309686828,0.517397034577420424862759690313172362617e-7 +3.8901195526123046875,0.9999999623340564928678105257711087384931,0.3766594350713218947422889126150691316762e-7 +3.9150848388671875,0.9999999691892380022718296491207196532311,0.3081076199772817035087928034676891629959e-7 +3.97042560577392578125,0.9999999803471559662108676689373849556513,0.1965284403378913233106261504434869643474e-7 +3.9990558624267578125,0.9999999844623994226841345546976315715757,0.1553760057731586544530236842842427928529e-7 +4.0202732086181640625,0.9999999869588516313974107653969576328928,0.1304114836860258923460304236710719133298e-7 +4.059665679931640625,0.9999999906011039329440428181500764654351,0.9398896067055957181849923534564871471163e-8 +4.07498645782470703125,0.9999999917319758181060151635650756156136,0.826802418189398483643492438438638626357e-8 +4.0926380157470703125,0.9999999928712989950214740371563331235804,0.712870100497852596284366687641963609073e-8 +4.115203857421875,0.9999999941073845432394979591533284778705,0.5892615456760502040846671522129518138003e-8 +4.1200580596923828125,0.999999994344624655910219644297408134312,0.5655375344089780355702591865688007494418e-8 +4.1238422393798828125,0.9999999945230987630125942263956192615149,0.5476901236987405773604380738485137636205e-8 +4.18769931793212890625,0.999999996825324701191836773808018915496,0.3174675298808163226191981084503971517082e-8 +4.19874095916748046875,0.9999999971133285173570966406051015581972,0.2886671482642903359394898441802794211932e-8 +4.20690250396728515625,0.9999999973096908466694080193834019387566,0.2690309153330591980616598061243415309299e-8 +4.22000026702880859375,0.999999997597935669219902570917607920444,0.2402064330780097429082392079555956337119e-8 +4.24826908111572265625,0.9999999981212753683849542506366834896337,0.1878724631615045749363316510366333537567e-8 +4.38267421722412109375,0.9999999994282841249115685789971164547536,0.5717158750884314210028835452464447445326e-9 +4.39856719970703125,0.9999999995044692226766877552910187174272,0.4955307773233122447089812825728300182121e-9 +4.41140270233154296875,0.9999999995586805369524462894635438947331,0.4413194630475537105364561052668571821336e-9 +4.46236324310302734375,0.9999999997222859477763385026053465470885,0.2777140522236614973946534529114539167313e-9 +4.46667575836181640625,0.9999999997330229427656384209340139818838,0.2669770572343615790659860181161641325611e-9 +4.47502994537353515625,0.9999999997526814932597596604866425689186,0.2473185067402403395133574310814301241976e-9 +4.483638763427734375,0.999999999771458639310503189444558378199,0.2285413606894968105554416218009889101498e-9 +4.48403263092041015625,0.9999999997722835544847406994462153715198,0.2277164455152593005537846284801644209053e-9 +4.51054668426513671875,0.9999999998216079429645380731036969585483,0.1783920570354619268963030414516833989782e-9 +4.67531681060791015625,0.9999999999620572592624488052520567621063,0.3794274073755119474794323789371137879806e-10 +4.6975612640380859375,0.999999999969337756904297867060374000221,0.3066224309570213293962599977898805627251e-10 +4.7035999298095703125,0.9999999999710656528628511442036423007801,0.289343471371488557963576992198893036785e-10 +4.70855236053466796875,0.9999999999724112829756039222900224238312,0.2758871702439607770997757616876384504719e-10 +4.7173023223876953125,0.9999999999746405889607731362343521159649,0.2535941103922686376564788403511585907718e-10 +4.72319889068603515625,0.9999999999760424196780308137523103887781,0.2395758032196918624768961122193089155665e-10 +4.75647830963134765625,0.9999999999826417500285260584857944861917,0.1735824997147394151420551380832331628646e-10 +4.7578258514404296875,0.9999999999828675379559186553605097933328,0.1713246204408134463949020666719436603364e-10 +4.76685810089111328125,0.9999999999843084121078261289867881913554,0.1569158789217387101321180864461434335413e-10 +4.7696933746337890625,0.999999999984735725688693624461200005215,0.1526427431130637553879999478501051129862e-10 +4.7944507598876953125,0.9999999999880137552217601142622348550727,0.1198624477823988573776514492731315953542e-10 +4.8010959625244140625,0.9999999999887691458776479444900639126969,0.1123085412235205550993608730307459147162e-10 +4.8044872283935546875,0.9999999999891364693161538500903435641699,0.1086353068384614990965643583011596109973e-10 +4.81623363494873046875,0.999999999990320054976935784005315704344,0.9679945023064215994684295656048935330699e-11 +4.83378314971923828125,0.9999999999918566015822786881415506967502,0.8143398417721311858449303249839611412579e-11 +4.9204959869384765625,0.9999999999965640766819005108029784331824,0.3435923318099489197021566817649105671184e-11 +4.93080806732177734375,0.9999999999969022277087461656235776754241,0.3097772291253834376422324575851562900089e-11 +4.9461956024169921875,0.9999999999973469736805588663004234322273,0.2653026319441133699576567772727096047411e-11 +4.95575237274169921875,0.9999999999975909997954754364337223859339,0.2409000204524563566277614066144810071518e-11 +4.98528766632080078125,0.9999999999982141805054615991904787167496,0.1785819494538400809521283250366820400389e-11 +4.98998355865478515625,0.9999999999982974491525865962396432033197,0.1702550847413403760356796680337710810069e-11 +5.02855682373046875,0.9999999999988517264956378980619258324192,0.1148273504362101938074167580787042639038e-11 +5.03557872772216796875,0.9999999999989315115047508105969225357869,0.1068488495249189403077464213064479671328e-11 +5.0523052215576171875,0.9999999999991002937379749143926146803551,0.8997062620250856073853196449004253366533e-12 +5.07685184478759765625,0.9999999999993016238951734186597928920516,0.6983761048265813402071079483580106775973e-12 +5.08204364776611328125,0.9999999999993381566276206363690381882733,0.6618433723793636309618117267347844272082e-12 +5.13345241546630859375,0.999999999999612331260405493647794650402,0.3876687395945063522053495979737659683032e-12 +5.1391048431396484375,0.999999999999634588517990564238879426641,0.3654114820094357611205733589988913877604e-12 +5.13993549346923828125,0.9999999999996377517440695332277429140254,0.3622482559304667722570859745677578023379e-12 +5.15045261383056640625,0.9999999999996755500658564562474091399993,0.3244499341435437525908600006936606245925e-12 +5.16167926788330078125,0.9999999999997116260010072844300443598171,0.2883739989927155699556401829053926593583e-12 +5.17528629302978515625,0.9999999999997501000542008628351256583835,0.2498999457991371648743416165426368804179e-12 +5.1753253936767578125,0.9999999999997502029947677817117184848968,0.2497970052322182882815151031630978773029e-12 +5.2130718231201171875,0.9999999999998324127754807945970261376527,0.1675872245192054029738623472857515088274e-12 +5.29325771331787109375,0.9999999999999288856738052204016145340166,0.7111432619477959838546598339183116790691e-13 +5.2994289398193359375,0.9999999999999334607492711678557262715706,0.665392507288321442737284293716776963984e-13 +5.36013698577880859375,0.9999999999999655451494392296744414479568,0.344548505607703255585520432106041683721e-13 +5.45147609710693359375,0.9999999999999873739267894844232513365118,0.1262607321051557674866348821792628557972e-13 +5.50894069671630859375,0.9999999999999933423585918075134713785513,0.6657641408192486528621448736888188965298e-14 +5.57548427581787109375,0.9999999999999968527672544482246160644115,0.314723274555177538393558852118569471685e-14 +5.5860691070556640625,0.9999999999999972086083536154872247664216,0.2791391646384512775233578379487718997086e-14 +5.64849758148193359375,0.9999999999999986305669378936272102876212,0.136943306210637278971237882925180230156e-14 +5.67121601104736328125,0.9999999999999989452188942213501238951865,0.1054781105778649876104813506873549674391e-14 +5.6940021514892578125,0.9999999999999991890350782086923335431393,0.8109649217913076664568606728738587613782e-15 +5.8028507232666015625,0.9999999999999997722139370566709142078876,0.2277860629433290857921123973267448027079e-15 +5.89911556243896484375,0.9999999999999999273310114171591943570055,0.7266898858284080564299449379332489531228e-16 +5.90867519378662109375,0.9999999999999999351899407560267583020934,0.6481005924397324169790663469831296572444e-16 +5.92298793792724609375,0.9999999999999999454148146455550046656746,0.5458518535444499533432536380511720243893e-16 +5.95886135101318359375,0.9999999999999999645670653382102726138283,0.3543293466178972738617174425389934295203e-16 +6.0150852203369140625,0.9999999999999999820915182893228664770405,0.1790848171067713352295947212902047549442e-16 +6.02811908721923828125,0.9999999999999999847253231421033886323739,0.1527467685789661136762605508631698629412e-16 +6.037822723388671875,0.9999999999999999864342825303533563325582,0.1356571746964664366744180012364556731983e-16 +6.05489063262939453125,0.9999999999999999889944678766415576341472,0.1100553212335844236585283710674808407408e-16 +6.1759700775146484375,0.9999999999999999975448452162650769292541,0.245515478373492307074589212037218914569e-17 +6.20361804962158203125,0.9999999999999999982640371408095169271104,0.1735962859190483072889644262633920675422e-17 +6.254451751708984375,0.9999999999999999990857858792087275530364,0.9142141207912724469636044315135167092246e-18 +6.4008617401123046875,0.999999999999999999859864992644041031821,0.1401350073559589681790226673644335192431e-18 +6.40293121337890625,0.9999999999999999998635724949753329988618,0.1364275050246670011381531339230014520635e-18 +6.44345760345458984375,0.9999999999999999999194393258289466407135,0.805606741710533592864585458434444068011e-19 +6.47809505462646484375,0.9999999999999999999487763610108722858332,0.5122363898912771416675345659572395374372e-19 +6.49267101287841796875,0.9999999999999999999576934136067901865991,0.423065863932098134009397058320083027927e-19 +6.5178356170654296875,0.9999999999999999999696208471565094820618,0.3037915284349051793818500085981039089403e-19 +6.53493785858154296875,0.9999999999999999999757610063637445566877,0.2423899363625544331226481168890701986164e-19 +6.56903934478759765625,0.9999999999999999999845747232345600776473,0.1542527676543992235266715952300598475537e-19 +6.57036113739013671875,0.9999999999999999999848432925940364693913,0.1515670740596353060870931696674263406445e-19 +6.6012401580810546875,0.9999999999999999999899544411087670709063,0.1004555889123292909367535592918549282524e-19 +6.6133975982666015625,0.9999999999999999999914607396914475599695,0.8539260308552440030489025187766437033893e-20 +6.614013671875,0.9999999999999999999915308157266726582396,0.846918427332734176038950311387000199938e-20 +6.65176868438720703125,0.9999999999999999999948960492295407549616,0.5103950770459245038373864424994355232744e-20 +6.67388629913330078125,0.9999999999999999999962112561597774386166,0.3788743840222561383427898405609521135209e-20 +6.675098419189453125,0.9999999999999999999962727294431245722943,0.3727270556875427705686833997971476711389e-20 +6.73399639129638671875,0.9999999999999999999983224938408648373451,0.1677506159135162654937097106857586013789e-20 +6.774074554443359375,0.9999999999999999999990294388848823039468,0.9705611151176960532165924022124182051181e-21 +6.839885711669921875,0.9999999999999999999996075324506377418898,0.3924675493622581101992853509398975667702e-21 +6.86166667938232421875,0.9999999999999999999997097026235625653255,0.2902973764374346745366897115310349140629e-21 +6.86821842193603515625,0.9999999999999999999997349241430742071849,0.2650758569257928151403169457718795390422e-21 +6.87017536163330078125,0.9999999999999999999997420278370314862565,0.2579721629685137435110698159577792881e-21 +6.9438915252685546875,0.999999999999999999999907789706111134148,0.9221029388886585196730336935045033388208e-22 +6.94417095184326171875,0.9999999999999999999999081504757103419795,0.9184952428965802049788611864563591946226e-22 +7.02402496337890625,0.999999999999999999999970229303356580071,0.2977069664341992903453738993900401285503e-22 +7.04118442535400390625,0.9999999999999999999999766690647347813976,0.2333093526521860243876854475410979262103e-22 +7.0728092193603515625,0.9999999999999999999999851346580378971058,0.1486534196210289422461831541803890066821e-22 +7.11659526824951171875,0.9999999999999999999999920618538775044464,0.7938146122495553642615968497016709781571e-23 +7.18280124664306640625,0.9999999999999999999999969477254268593726,0.3052274573140627399432973240733715500213e-23 +7.20355319976806640625,0.9999999999999999999999977419301284355623,0.2258069871564437709331260570315365949665e-23 +7.27909374237060546875,0.9999999999999999999999992515556916792261,0.7484443083207738734503483608935021035732e-24 +7.28028106689453125,0.9999999999999999999999992645004451770347,0.7354995548229653146869970523781527988642e-24 +7.298152923583984375,0.9999999999999999999999994345631928770567,0.5654368071229432894992332067407147179749e-24 +7.31467151641845703125,0.9999999999999999999999995568116259996168,0.4431883740003831823890539135951501761503e-24 +7.32010936737060546875,0.9999999999999999999999995910130381669911,0.4089869618330089157685151201949087925479e-24 +7.34866237640380859375,0.9999999999999999999999997319906448357093,0.268009355164290673339087031887057715089e-24 +7.351879119873046875,0.9999999999999999999999997444791197223142,0.2555208802776857586959896180952785091403e-24 +7.35590362548828125,0.9999999999999999999999997592943074733691,0.2407056925266308623391590746789683246709e-24 +7.390369415283203125,0.9999999999999999999999998558663763263787,0.1441336236736213391389793807586759175995e-24 +7.43821620941162109375,0.9999999999999999999999999295502581038212,0.7044974189617879705218727765406635153304e-25 +7.43946170806884765625,0.9999999999999999999999999308550578406467,0.6914494215935333790398074475111218230458e-25 +7.48311901092529296875,0.999999999999999999999999964163218913179,0.3583678108682102561152351850893798856277e-25 +7.49824619293212890625,0.9999999999999999999999999714868908856129,0.2851310911438713788012919629820992423858e-25 +7.50188446044921875,0.9999999999999999999999999730141507157818,0.2698584928421822020035304290073321597406e-25 +7.52948474884033203125,0.9999999999999999999999999822420651220879,0.1775793487791212989839150755243583008096e-25 +7.6320323944091796875,0.9999999999999999999999999962984458271673,0.3701554172832712513006017529906907914499e-26 +7.6759738922119140625,0.9999999999999999999999999981215459672183,0.1878454032781689292876320094611621328422e-26 +7.67881011962890625,0.999999999999999999999999998202249704333,0.1797750295667047232713633441478606640198e-26 +7.69775485992431640625,0.9999999999999999999999999986598159749852,0.1340184025014838921678286365792744470017e-26 +7.70757007598876953125,0.9999999999999999999999999988493273258458,0.1150672674154231530685408186230565876878e-26 +7.71776866912841796875,0.9999999999999999999999999990181051135537,0.9818948864462603043818495768683861311821e-27 +7.79935359954833984375,0.9999999999999999999999999997259876414039,0.2740123585961319556857387807076098785701e-27 +7.81407070159912109375,0.9999999999999999999999999997826446873284,0.2173553126715507615629930753265485721298e-27 +7.81634521484375,0.9999999999999999999999999997902963473516,0.209703652648431358354620963217352346183e-27 +7.84175968170166015625,0.9999999999999999999999999998595912638039,0.1404087361960659424532579514219630734144e-27 +7.88610076904296875,0.9999999999999999999999999999304798650663,0.6952013493370366965787168537834557597352e-28 +7.89655590057373046875,0.9999999999999999999999999999411317291543,0.5886827084565561878281328421149862522402e-28 +7.9050960540771484375,0.9999999999999999999999999999486179207741,0.513820792259039401977061154556515432295e-28 +7.93815517425537109375,0.9999999999999999999999999999696918627742,0.3030813722580726383815315462367670870671e-28 +7.94338130950927734375,0.9999999999999999999999999999721239170155,0.2787608298449905464917225531595312562447e-28 diff --git a/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_large_data.csv b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_large_data.csv new file mode 100644 index 0000000..deb90dc --- /dev/null +++ b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_large_data.csv @@ -0,0 +1,92 @@ +# 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. + +# (C) Copyright John Maddock 2006-7. +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# Extracted from: boost/libs/math/test/erf_large_data.ipp + +8.2311115264892578125,0.9999999999999999999999999999997436415644,0.2563584356432915693836191701249115171878e-30 +8.3800067901611328125,0.9999999999999999999999999999999787664373,0.212335626810981756102114466368867764939e-31 +8.39224529266357421875,0.9999999999999999999999999999999827316301,0.1726836993826464997300336080711750877816e-31 +8.66370105743408203125,0.9999999999999999999999999999999998367494,0.1632506054605993373182936619108145081694e-33 +8.9759693145751953125,0.9999999999999999999999999999999999993611,0.6389109854135105643535885036658544645608e-36 +9.1102085113525390625,0.9999999999999999999999999999999999999445,0.5554662272164108694298027082501260363284e-37 +9.45745944976806640625,0.9999999999999999999999999999999999999999,0.8480477594433168680596946662186145070498e-40 +10.61029338836669921875,1.0,0.6786472703144874611591306359565011820753e-50 +10.8140201568603515625,1.0,0.8470069870191149998048954134093763207838e-52 +10.82457828521728515625,1.0,0.6733586817565831939437647508350297170672e-52 +10.9283580780029296875,1.0,0.6977670213613499261034444110870077646237e-53 +10.98818302154541015625,1.0,0.1870385270398381154229086866501074415355e-53 +11.31863117218017578125,1.0,0.1142544869245536263179923727458113771164e-56 +11.69488239288330078125,1.0,0.1919907987324948057617154107998359393185e-60 +11.78605365753173828125,1.0,0.2239752724414047638235296360419194553396e-61 +12.1997470855712890625,1.0,0.1061491854672859805410277580039105082623e-65 +12.4239101409912109375,1.0,0.4177140558891845034847722323657671701092e-68 +13.54282093048095703125,1.0,0.9235451601555197945993611934762413642509e-81 +14.22005176544189453125,1.0,0.6009313847910459672567608314935750835662e-89 +14.22926807403564453125,1.0,0.4620339167397254212949689945484104460402e-89 +14.359676361083984375,1.0,0.1100471801774583728133644248988374419641e-90 +14.41039371490478515625,1.0,0.2548929323782609375991749296565683531577e-91 +14.87335300445556640625,1.0,0.3198000452629152167848001696581299429735e-97 +14.92373943328857421875,1.0,0.7101988862786309879894988884459001902733e-98 +15.8191242218017578125,1.0,0.7438591168260150840237290305856485663443e-110 +15.96480560302734375,1.0,0.7187861904421355163894524608883700422307e-112 +15.99831295013427734375,1.0,0.2457896620902286177098546091913977024151e-112 +16.7455272674560546875,1.0,0.5559992295828943910250640094814395579468e-123 +17.008663177490234375,1.0,0.760237064211963037211163791564153667507e-127 +17.2220897674560546875,1.0,0.5043169273534506801418127595237229711103e-130 +17.757808685302734375,1.0,0.35565429074608249855471197796329792194e-138 +17.802867889404296875,1.0,0.7145708921803004436285314631231014067581e-139 +18.112152099609375,1.0,0.1053094819294519519788245447399920974245e-143 +18.2649860382080078125,1.0,0.4020674492293458832133643654712400773494e-146 +18.32352447509765625,1.0,0.4706809140073901333884996503518029500936e-147 +18.4129180908203125,1.0,0.1755474923764976123532737166943228663005e-148 +18.652309417724609375,1.0,0.2428091775485678872414439322587700295772e-152 +18.9056758880615234375,1.0,0.1764835785229242910502507612159515936326e-156 +19.1091136932373046875,1.0,0.7645206854732087495539968665185944859194e-160 +19.1576213836669921875,1.0,0.1191626992794708978523133508616313098621e-160 +19.31610870361328125,1.0,0.2657165206820982194424196529775105931442e-163 +19.3672046661376953125,1.0,0.3671679040400985756060408739652361271147e-164 +19.6346797943115234375,1.0,0.1067452532475426004914816798590685683097e-168 +19.8862934112548828125,1.0,0.5060597273643268882175716699743699135461e-173 +19.93419647216796875,1.0,0.7494327004502860500754429706601818608063e-174 +20.2273464202880859375,1.0,0.5692529890798582547111055729709760376723e-179 +20.242107391357421875,1.0,0.3130080167182599318145495989493729041355e-179 +20.4949970245361328125,1.0,0.1037715327566096248596862690543722677311e-183 +20.6639499664306640625,1.0,0.9828104968491392552509099594974133192176e-187 +20.9242725372314453125,1.0,0.1928501126858728847552898327055431396084e-191 +20.9607219696044921875,1.0,0.4182492638018175069922633264256087874033e-192 +21.2989482879638671875,1.0,0.2552602767811562690060253249228934667833e-198 +21.3341617584228515625,1.0,0.5679087385569991824361542895704294427451e-199 +21.5831966400146484375,1.0,0.1280987506428470296014925421711821162698e-203 +22.0373077392578125,1.0,0.3131661581007378806102060325912155502701e-212 +22.2569446563720703125,1.0,0.1846614406013614928732974356509343390705e-216 +22.9114551544189453125,1.0,0.2598259766741800523533570657530873506244e-229 +23.0804386138916015625,1.0,0.108696918487531328017390687052866837422e-232 +23.3235530853271484375,1.0,0.1355781333962075845012366321672254343728e-237 +23.4473209381103515625,1.0,0.4129348514781646974836324488402049303682e-240 +24.12081146240234375,1.0,0.4900590012091086604540120205982908317771e-254 +24.3631992340087890625,1.0,0.382044899410099463972224844951303224334e-259 +25.061580657958984375,1.0,0.379460392354870154626118964688104627376e-274 +25.23714447021484375,1.0,0.5508622514289808668363975738198678197993e-278 +25.3777942657470703125,1.0,0.4435055276360357438046878641441812378362e-281 +25.813503265380859375,1.0,0.8969991006618404791166973289604328222239e-291 +26.1247920989990234375,1.0,0.8433396822097075603573541828301520902564e-298 +26.3525791168212890625,1.0,0.5380559555748413036380180439113786214843e-303 +26.776111602783203125,1.0,0.8944111506115654515313274252719979616663e-313 +26.8727970123291015625,1.0,0.4980346568584009068204868294049186460128e-315 diff --git a/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_small_data.csv b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_small_data.csv new file mode 100644 index 0000000..083040e --- /dev/null +++ b/commons-numbers-gamma/src/test/resources/org/apache/commons/numbers/gamma/erf_small_data.csv @@ -0,0 +1,172 @@ +# 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. + +# (C) Copyright John Maddock 2006-7. +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# Extracted from: boost/libs/math/test/erf_small_data.ipp + +0.0,0.0,1.0 +0.140129846432481707092372958328991613128e-44,0.1581195994027057927040695988659415347357e-44,1.0 +0.2802596928649634141847459166579832262561e-44,0.3162391988054115854081391977318830694715e-44,1.0 +0.4203895392974451212771188749869748393841e-44,0.4743587982081173781122087965978246042072e-44,1.0 +0.8407790785948902425542377499739496787682e-44,0.9487175964162347562244175931956492084145e-44,1.0 +0.1541428310757298778016102541618907744408e-43,0.1739315593429763719744765587525356882093e-43,1.0 +0.3222986467947079263124578041566807101945e-43,0.3636750786262233232193600773916655298922e-43,1.0 +0.7426881860921530475895766791436555495785e-43,0.8380338768343407013315688739894901340994e-43,1.0 +0.105097384824361280319279718746743709846e-42,0.1185896995520293445280521991494561510518e-42,1.0 +0.210194769648722560638559437493487419692e-42,0.2371793991040586890561043982989123021036e-42,1.0 +0.4666323886201640846176019512355420717163e-42,0.52653826601101028970455176422358531067e-42,1.0 +0.1223333559355565302916415926212096782608e-41,0.1380384102785621570306527598099669598243e-41,1.0 +0.2578389174357663410499662433253445681556e-41,0.2909400629009786585754880619133324239138e-41,1.0 +0.2960943655118338470861840609491592785395e-41,0.3341067135379173399836990624037344628966e-41,1.0 +0.7557202618103738463491673642682517695994e-41,0.8527389995787923400530473466840226968299e-41,1.0 +0.1465898323530191137893313517079581264932e-40,0.1654089129351705297477272073736614394871e-40,1.0 +0.4298903428855673810179817615616804707542e-40,0.4850793070476208308575447154009354402623e-40,1.0 +0.4803791265551905400833637384476161489642e-40,0.5420497987124157279688209918723341752276e-40,0.9999999999999999999999999999999999999999 +0.1055289847513733239771242274583970040145e-39,0.1190767079181896783695807335139632509788e-39,0.9999999999999999999999999999999999999999 +0.2015109230653016692500450852658398094265e-39,0.227380727529073011082233205257189905196e-39,0.9999999999999999999999999999999999999998 +0.7325049501519046019351739362618877290525e-39,0.8265433255457460713757641362399021627702e-39,0.9999999999999999999999999999999999999992 +0.1339665153968418641693291185028075750078e-38,0.1511650250621765838235665056990208282135e-38,0.9999999999999999999999999999999999999985 +0.2677046191439987831560976690835388936862e-38,0.3020723151773267572050253779518901717253e-38,0.999999999999999999999999999999999999997 +0.4980653348629733537806134066371931674319e-38,0.5620065477118294341833797281540012541512e-38,0.9999999999999999999999999999999999999944 +0.6613229117999040042200470598735932013487e-38,0.7462229963979548044442924939647721094874e-38,0.9999999999999999999999999999999999999925 +0.1548242965319156795913711730955404935546e-37,0.1747005107668316705149757196187806484869e-37,0.9999999999999999999999999999999999999825 +0.4146556501891822617936303213288858289615e-37,0.4678887971919177014040265951235884621123e-37,0.9999999999999999999999999999999999999532 +0.9169899847717825977881300331923883942907e-37,0.1034712395251710806479818721979201078743e-36,0.9999999999999999999999999999999999998965 +0.1401743180405455194869357938110469019064e-36,0.1581697802387722354144421623938376299412e-36,0.9999999999999999999999999999999999998418 +0.1945576912957096415426581064633919119024e-36,0.2195348456562787018647206880870297955178e-36,0.9999999999999999999999999999999999997805 +0.6257788193068770148365547155357311502081e-36,0.7061157829155071490944174116544753093472e-36,0.9999999999999999999999999999999999992939 +0.1082390914972224343528760935165450352846e-35,0.1221347359108108275138920730258033965505e-35,0.9999999999999999999999999999999999987787 +0.1694061057766321374547939115222498639949e-35,0.1911543205371304725231209426978241547223e-35,0.9999999999999999999999999999999999980885 +0.4157476136990655326859281227151399960547e-35,0.469120946067698479126142569921586497913e-35,0.9999999999999999999999999999999999953088 +0.7283681265086265937666854409047925692044e-35,0.8218754199287230086952619241467251109843e-35,0.9999999999999999999999999999999999917812 +0.2125163494676521664376074827660149555726e-34,0.2397990214064882285432839461962890817645e-34,0.9999999999999999999999999999999999760201 +0.2530711628583540298128114059620192234547e-34,0.2855602279620023372947687038386988804286e-34,0.999999999999999999999999999999999971444 +0.8643572969601960480494638860332170085101e-34,0.9753227668168746390533409248013332505622e-34,0.9999999999999999999999999999999999024677 +0.99805657801365854084424590887058919672e-34,0.1126186250213249491600342719979975982704e-33,0.9999999999999999999999999999999998873814 +0.2285833483419143806137872349711124495646e-33,0.2579286882139527639322447178720013355598e-33,0.9999999999999999999999999999999997420713 +0.5426235288674262982106993151912976763677e-33,0.6122850855498543097076270518307709592481e-33,0.9999999999999999999999999999999993877149 +0.1147672787261224070426617104882286355311e-32,0.1295010063788005409890233863705470341395e-32,0.9999999999999999999999999999999987049899 +0.22463880715206230259705675341401055879e-32,0.2534777501115735340046251758622995828684e-32,0.9999999999999999999999999999999974652225 +0.4454556413592197901478916560693101385393e-32,0.5026428655749137894397761320610666694693e-32,0.9999999999999999999999999999999949735713 +0.9167850888743889506336831720594191266931e-32,0.1034481194989668475298051221951978796736e-31,0.9999999999999999999999999999999896551881 +0.2029237383788489473978179376606301463249e-31,0.2289749188958332742407712486623796907403e-31,0.9999999999999999999999999999999771025081 +0.4422489809322529014977160404510081439987e-31,0.4990245367531747508971186530942781923233e-31,0.9999999999999999999999999999999500975463 +0.8427819595678069227982621602322463722706e-31,0.9509776055802459297555061290310693509558e-31,0.9999999999999999999999999999999049022394 +0.1894128825516700180187896525548839017318e-30,0.2137295506508135613325177084306249463745e-30,0.9999999999999999999999999999997862704493 +0.3460509137323572130893969054757060828136e-30,0.390476641809958306521950254784930239331e-30,0.9999999999999999999999999999996095233582 +0.7129452701155289322465925784842836259778e-30,0.8044725900776457681286359991257189545736e-30,0.9999999999999999999999999999991955274099 +0.1006606281422698106765835646474453774524e-29,0.1135833557424855221443633868642206855925e-29,0.9999999999999999999999999999988641664426 +0.2691237328241499384996035977623006944895e-29,0.3036736134897495655058606838487828118587e-29,0.9999999999999999999999999999969632638651 +0.53002073552022827485063776974422846038e-29,0.5980643560896661370936819930965482836573e-29,0.9999999999999999999999999999940193564391 +0.6328674258047448903166407618549998992304e-29,0.7141144188114391407566450273134713579864e-29,0.9999999999999999999999999999928588558119 +0.2089027321727668921272023434652731888509e-28,0.2357214909330836434674323280791160963504e-28,0.9999999999999999999999999999764278509067 +0.431842364003957104364921550167833797347e-28,0.4872819270113422778304421472654534392263e-28,0.9999999999999999999999999999512718072989 +0.5869689191576790243963724295243864109357e-28,0.6623235001100951114675477389355052037517e-28,0.999999999999999999999999999933767649989 +0.1659976352436858066871624892515432120194e-27,0.1873082733960948939621836113363260997334e-27,0.9999999999999999999999999998126917266039 +0.2259797844707783785531125574841037632032e-27,0.2549908809815603534966750948985043565705e-27,0.9999999999999999999999999997450091190184 +0.5880869455645201196495195879197812435557e-27,0.6635850578158372552104628507822996913944e-27,0.9999999999999999999999999993364149421842 +0.1210368873588132831231840717009055000898e-26,0.136575502145771107167093316323928936418e-26,0.9999999999999999999999999986342449785423 +0.2865917801972336300962667874631175760926e-26,0.3233841942353746978165316543252271930097e-26,0.9999999999999999999999999967661580576463 +0.6332274308614525819994844546119106938273e-26,0.7145206410174771386698068058159747695855e-26,0.9999999999999999999999999928547935898252 +0.1017015117562076843891927280903461796905e-25,0.1147578671278241071470420542046720634233e-25,0.9999999999999999999999999885242132872176 +0.1732407881343339865174865944566931617746e-25,0.1954812962219899413849001377507194449177e-25,0.999999999999999999999999980451870377801 +0.4851304131156321593400980501390172514877e-25,0.5474110514841189450665720204629142546924e-25,0.9999999999999999999999999452588948515881 +0.8195642344688286703600152101217105477795e-25,0.9247792082712082720339044529059539700692e-25,0.9999999999999999999999999075220791728792 +0.1869609713097047478340985963996916097412e-24,0.2109628650858126659649010477127478351642e-24,0.9999999999999999999999997890371349141873 +0.2530783866565756141965447805546793991855e-24,0.2855683791454228747266674274313813542172e-24,0.9999999999999999999999997144316208545771 +0.4209414052294289885709092151366397306124e-24,0.474981512228797723082223866616547403578e-24,0.9999999999999999999999995250184877712023 +0.1448614172287997697834930368987483835595e-23,0.1634586053169086194558576878083327447891e-23,0.9999999999999999999999983654139468309138 +0.3012998612797836509437815728233749567808e-23,0.3399804865168757552575507775525287643073e-23,0.9999999999999999999999966001951348312424 +0.415276141474016400714459480565419005095e-23,0.4685889466310888715323687240479993998499e-23,0.9999999999999999999999953141105336891113 +0.1204931390183540503963647385927016736362e-22,0.1359619478462541509417967524360939547446e-22,0.9999999999999999999999864038052153745849 +0.1993117661558407300079387840940773127252e-22,0.2248992446872631349043635494217604899453e-22,0.9999999999999999999999775100755312736865 +0.5135333031694984418963713908106404060216e-22,0.5794602809062059992419407432753169472345e-22,0.9999999999999999999999420539719093794001 +0.899483690375495720736892890190099236758e-22,0.1014958657361899781022539075381620547142e-21,0.9999999999999999999998985041342638100219 +0.1495718898928958003798630318006718936674e-21,0.1687738045382474786366114844967457859701e-21,0.9999999999999999999998312261954617525214 +0.4004143349189545415674843981449458618638e-21,0.4518191937289535418778128853745495698362e-21,0.9999999999999999999995481808062710464581 +0.6027338573124474618509081343250763374009e-21,0.6801123278944849878208640332552941589305e-21,0.9999999999999999999993198876721055150122 +0.1659584418309930229572620634728719046791e-20,0.1872640483657249799664013537449399617766e-20,0.9999999999999999999981273595163427502003 +0.2678244821868696143277384944057090132574e-20,0.3022075661378068793988187051769889525453e-20,0.999999999999999999996977924338621931206 +0.5242169890349582687359968492107897830579e-20,0.5915155294645836590589096407129433743023e-20,0.9999999999999999999940848447053541634094 +0.7847303335957885127235572164487720225878e-20,0.8854733602173995706713015709887803225844e-20,0.9999999999999999999911452663978260042933 +0.1543123850410999503479436223765675073594e-19,0.1741228805051983958166845695046398116561e-19,0.9999999999999999999825877119494801604183 +0.4775181844358503128246959748559596903306e-19,0.5388215712266861317995086503415856707862e-19,0.99999999999999999994611784287733138682 +0.6230335359741914917030257154567651767252e-19,0.7030180623951302655508677093605170542092e-19,0.9999999999999999999296981937604869734449 +0.1333737877121347004096484859664295541393e-18,0.1504962034909922627946995932175931040167e-18,0.9999999999999999998495037965090077372053 +0.272678641362033605222928850375652132243e-18,0.3076848982248274637704507517821273969355e-18,0.9999999999999999996923151017751725362295 +0.7848472665613653936552990969532928033914e-18,0.885605304939703219820034216816760452174e-18,0.99999999999999999911439469506029678018 +0.1596567770068200412154901801642381542479e-17,0.180153381060109581137526939833213468117e-17,0.9999999999999999981984661893989041886247 +0.3449535060248237706634344412748305330751e-17,0.3892383498149675248979402679995676281369e-17,0.9999999999999999961076165018503247510206 +0.4351665680924082666098176574998035448516e-17,0.4910328896519242978931639720387530850973e-17,0.9999999999999999950896711034807570210684 +0.9245716998221635790720235315021113819967e-17,0.1043267444565415210292590191714661224142e-16,0.9999999999999999895673255543458478970741 +0.2517825949792599072966925444205799067277e-16,0.2841062348118440801806623646517627970916e-16,0.9999999999999999715893765188155919819338 +0.3607757836945135819072677518803970997396e-16,0.4070918783134460417227759258926655100437e-16,0.9999999999999999592908121686553958277224 +0.6902950590186084176697045577952849271242e-16,0.7789145637455650616639975178325762794953e-16,0.9999999999999999221085436254434938336002 +0.1125254418367572150846966927417724946281e-15,0.1269713643368146509171410927223650268325e-15,0.9999999999999998730286356631853490828589 +0.4283825720300077181945663795659129391424e-15,0.4833779698254535301267982815421810779873e-15,0.9999999999999995166220301745464698732017 +0.5405621861962687634689528337617048237007e-15,0.6099591094234751315857573573713433261908e-15,0.9999999999999993900408905765248684142426 +0.1199026382331771015121724133223324315622e-14,0.1352956390621069391623702837955015493166e-14,0.9999999999999986470436093789306083762972 +0.3388160376379171188909733558602965786122e-14,0.3823129583484747580613317941389808261798e-14,0.9999999999999961768704165152524193866821 +0.4251160106447451902944578705501044169068e-14,0.4796920500102846351328633565382312006865e-14,0.9999999999999952030794998971536486713664 +0.1313415386649738336721782161475857719779e-13,0.1482030560038262349331825316596395555414e-13,0.9999999999999851796943996173765066817468 +0.1777897084111537684414372506580548360944e-13,0.2006142030951317354054567215576954023455e-13,0.9999999999999799385796904868264594543278 +0.5556494121154026410991377815662417560816e-13,0.6269832208398892455680747006005262348402e-13,0.9999999999999373016779160110754431925299 +0.9186150917630392376267423060198780149221e-13,0.1036546132124946068175722614185676168866e-12,0.9999999999998963453867875053931824277386 +0.2022372612257850033046224780264310538769e-12,0.228200312377628882307346737694658892409e-12,0.9999999999997717996876223711176926532623 +0.334987083645127414754938399710226804018e-12,0.3779924464312436744509548821977467036951e-12,0.9999999999996220075535687563255490451178 +0.9037920151860889816930466622579842805862e-12,0.1019820081323253936787897658201809797801e-11,0.9999999999989801799186767460632121023418 +0.1229327186921813641617973189568147063255e-11,0.1387147187266705574841551295246781201059e-11,0.9999999999986128528127332944251584487048 +0.1941944651959182088774014118826016783714e-11,0.2191249888923286935404641309633986461335e-11,0.9999999999978087501110767130645953586904 +0.6660515888823326235979038756340742111206e-11,0.7515587371056892484340940489030914565555e-11,0.999999999992484412628943107515659059511 +0.1305013996172332824130535300355404615402e-10,0.1472550606048923346284018897482637545021e-10,0.9999999999852744939395107665371598110252 +0.2306862860457226105381778324954211711884e-10,0.2603015993086296441348608813996585159423e-10,0.99999999997396984006913703558651391186 +0.464061636340495908825687365606427192688e-10,0.5236374826948694233006052031278254256924e-10,0.9999999999476362517305130576699394796872 +0.9020578728424766268290113657712936401367e-10,0.1017863311229943567634007843433802039614e-9,0.9999999998982136688770056432365992156566 +0.2017243178054073382554634008556604385376e-9,0.2276215177081760092443407256160138975684e-9,0.999999999772378482291823990755659274384 +0.4463814318178549456206383183598518371582e-9,0.5036875082415334987251679342248332272253e-9,0.9999999994963124917584665012748320657752 +0.7894043196898792302818037569522857666016e-9,0.8907473887532656624292837310188997818123e-9,0.9999999991092526112467343375707162689811 +0.1197530963281678850762546062469482421875e-8,0.1351268990918867631962395950793232393347e-8,0.9999999986487310090811323680376040492068 +0.3128908243610339923179708421230316162109e-8,0.3530594877843318503414910172348506997629e-8,0.9999999964694051221566814965850898276515 +0.654608101058329339139163494110107421875e-8,0.7386461438461727721842489523977686137653e-8,0.9999999926135385615382722781575104760223 +0.1037359531608217366738244891166687011719e-7,0.1170534884254671319566985248995045101925e-7,0.9999999882946511574532868043301475100495 +0.2613260008388351707253605127334594726563e-7,0.2948748151669259830348980474563029807727e-7,0.9999999705125184833074016965101952543697 +0.4653804097642932902090251445770263671875e-7,0.525125559152401230823420797240431154212e-7,0.9999999474874440847598769176579202759569 +0.8228098380413939594291150569915771484375e-7,0.9284414797271396176853241560056526014051e-7,0.9999999071558520272860382314675843994347 +0.1440129295815495424903929233551025390625e-6,0.1625011895322124534932667008476984221693e-6,0.9999998374988104677875465067332991523016 +0.373797803376874071545898914337158203125e-6,0.4217856540365096975937056642610100404098e-6,0.99999957821434596349030240629433573899 +0.72830744102247990667819976806640625e-6,0.8218069436902647194923144120911901417405e-6,0.9999991781930563097352805076855879088099 +0.10260146154905669391155242919921875e-5,0.1157733517254662264894221065154775581876e-5,0.9999988422664827453377351057789348452244 +0.2678315240700612775981426239013671875e-5,0.3022155120513748374723247514313931180799e-5,0.9999969778448794862516252767524856860688 +0.40205004552262835204601287841796875e-5,0.4536648954950918836538342339896039137139e-5,0.9999954633510450490811634616576601039609 +0.10320758519810624420642852783203125e-4,0.1164572890196433412287423508862147085112e-4,0.9999883542710980356658771257649113785291 +0.233581158681772649288177490234375e-4,0.2635681132346089850308780034445740445022e-4,0.9999736431886765391014969121996555425955 +0.4860912667936645448207855224609375e-4,0.5484952583250342934869652426491962534587e-4,0.9999451504741674965706513034757350803747 +0.0001085917465388774871826171875,0.0001225326640313436930517738593548252912385,0.9998774673359686563069482261406451747088 +0.000165569479577243328094482421875,0.0001868251497546456322442598271644064384812,0.9998131748502453543677557401728355935615 +0.0004721705918200314044952392578125,0.0005327874195307728646012144512357625925006,0.9994672125804692271353987855487642374075 +0.00095945619978010654449462890625,0.001082630055365222472802272152269070171599,0.9989173699446347775271977278477309298284 +0.0011034240014851093292236328125,0.001245080150435437151082626328085359462604,0.9987549198495645628489173736719146405374 +0.00225476245395839214324951171875,0.002544222668224971136268866790058243266433,0.9974557773317750288637311332099417567336 +0.006128217093646526336669921875,0.0069148659371010946376763193961158375309,0.9930851340628989053623236806038841624691 +0.01089772023260593414306640625,0.01229627370763712993609092392080824128196,0.987703726292362870063909076079191758718 +0.0229592286050319671630859375,0.02590216393432758991206927422057375200344,0.9740978360656724100879307257794262479966 +0.043352998793125152587890625,0.04888799071126766325637634356499925915047,0.9511120092887323367436236564350007408495 +0.06324388086795806884765625,0.07126804593959971882312270799434219648871,0.9287319540604002811768772920056578035113 +0.2158693373203277587890625,0.2398511631288111077158786048968679107576,0.7601488368711888922841213951031320892424 +0.334280669689178466796875,0.3636043520990431448970776140491250415292,0.6363956479009568551029223859508749584708 diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml index 4ba91b2..5d11c46 100644 --- a/src/main/resources/pmd/pmd-ruleset.xml +++ b/src/main/resources/pmd/pmd-ruleset.xml @@ -67,6 +67,13 @@ <!-- Rule customisations. --> + <rule ref="category/java/bestpractices.xml/AvoidReassigningParameters"> + <properties> + <!-- The ported method follows the original C++ usage of the 'invert' flag. --> + <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='BoostErf']"/> + </properties> + </rule> + <rule ref="category/java/codestyle.xml/ShortMethodName"> <properties> <!-- TODO: Current regex effectively disables this rule. --> @@ -90,6 +97,12 @@ value="//ClassOrInterfaceDeclaration[@SimpleName='BoostErf']"/> </properties> </rule> + <rule ref="category/java/codestyle.xml/ConfusingTernary"> + <properties> + <!-- Use the original C++ code logic for identifying the erf domain. --> + <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='BoostErf']"/> + </properties> + </rule> <rule ref="category/java/design.xml/CyclomaticComplexity"> <properties>