sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1540062 - in /sis/branches/JDK7/core: sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/ sis-utility/src/main/java/org/apache/sis/internal/util/ sis-utility/src/main/java/org/apache/sis/math/ sis-utility/src/test/ja...
Date Fri, 08 Nov 2013 14:57:58 GMT
Author: desruisseaux
Date: Fri Nov  8 14:57:57 2013
New Revision: 1540062

URL: http://svn.apache.org/r1540062
Log:
Removed the DoubleDouble hard-coded constants that can be calculated by deltaForDoubleToDecimal.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/GeneralMatrixTest.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/GeneralMatrixTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/GeneralMatrixTest.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/GeneralMatrixTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/GeneralMatrixTest.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -87,10 +87,10 @@ public final strictfp class GeneralMatri
                 0.9,
                 0.1234567,
 
-                // Values below this point are error terms copied from DoubleDouble.ERRORS.
+                // Most values below this point are error terms copied from DoubleDouble.ERRORS.
                  2.9486522708701687E-19,
                 -1.9878495670576283E-15,
                 -2.2204460492503132E-17,
-                 0}, elements, STRICT);
+                -2.5483615218035994E-18}, elements, STRICT);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -85,7 +85,7 @@ public abstract strictfp class MatrixTes
      * @see SolverTest#TOLERANCE
      * @see NonSquareMatrixTest#printStatistics()
      */
-    protected static final double TOLERANCE = DoubleDouble.DISABLED ? STRICT : 1E-12;
+    protected static final double TOLERANCE = DoubleDouble.DISABLED ? STRICT : 1E-11;
 
     /**
      * Number of random matrices to try in arithmetic operation tests.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -18,6 +18,7 @@ package org.apache.sis.internal.util;
 
 import java.util.Arrays;
 import org.apache.sis.math.MathFunctions;
+import org.apache.sis.math.DecimalFunctions;
 // No BigDecimal dependency - see class javadoc
 
 
@@ -114,45 +115,31 @@ public final class DoubleDouble extends 
     public static final double MAX_VALUE = Double.MAX_VALUE / SPLIT;
 
     /**
-     * Pre-defined constants frequently used in SIS. SIS often creates matrices for unit
conversions,
-     * and most conversion factors are defined precisely in base 10. For example the conversion
from
-     * feet to metre is defined by a factor of exactly 0.3048, which can not be represented
precisely
-     * as a {@code double}. Consequently if a value of 0.3048 is given, we can assume that
the intend
-     * was to provide the "feet to metres" conversion factor and complete the double-double
instance
-     * accordingly.
+     * Pre-defined constants frequently used in SIS, sorted in increasing order. This table
contains only
+     * constants that can not be inferred by {@link DecimalFunctions#deltaForDoubleToDecimal(double)},
+     * for example some transcendental values.
      *
      * <p>Elements in this array shall be sorted in strictly increasing order.
      * For any value at index <var>i</var>, the associated error is {@code ERRORS[i]}.
+     *
+     * @see #errorForWellKnownValue(double)
      */
     private static final double[] VALUES = {
         // Some of the following constants have more fraction digits than necessary. We declare
the extra
         // digits for documentation purpose, and in order to have identical content than
DoubleDoubleTest
         // so that a plain copy-and-paste can be performed between those two classes.
-         0.000001,
          0.000004848136811095359935899141023579480, // Arc-second to radians
-         0.00001,
-         0.0001,
          0.0002777777777777777777777777777777778,   // Second to degrees
-         0.001,
          0.002777777777777777777777777777777778,    // 1/360°
-         0.01,
          0.01666666666666666666666666666666667,     // Minute to degrees
          0.01745329251994329576923690768488613,     // Degrees to radians
-         0.1,
-         0.201168,                                  // Link to metres
-         0.3048,                                    // Feet to metres
          0.785398163397448309615660845819876,       // π/4
-         0.9,                                       // Degrees to gradians
-         0.9144,                                    // Yard to metres
          1.111111111111111111111111111111111,       // Gradian to degrees
          1.414213562373095048801688724209698,       // √2
          1.570796326794896619231321691639751,       // π/2
-         1.8288,                                    // Fathom to metres
          2.356194490192344928846982537459627,       // π * 3/4
-         2.54,                                      // Inch to centimetres
          3.14159265358979323846264338327950,        // π
          6.28318530717958647692528676655901,        // 2π
-        20.1168,                                    // Chain to metres
         57.2957795130823208767981548141052          // Radians to degrees
     };
 
@@ -169,31 +156,18 @@ public final class DoubleDouble extends 
      * </ul>
      */
     private static final double[] ERRORS = {
-        /*  0.000001  */  4.525188817411374E-23,
         /*  0.000004… */  9.320078015422868E-23,
-        /*  0.00001   */ -8.180305391403131E-22,
-        /*  0.0001    */ -4.79217360238593E-21,
         /*  0.000266… */  2.4093381610788987E-22,
-        /*  0.001     */ -2.0816681711721686E-20,
         /*  0.002666… */ -1.0601087908747154E-19,
-        /*  0.01      */ -2.0816681711721684E-19,
         /*  0.016666… */  2.312964634635743E-19,
         /*  0.017453… */  2.9486522708701687E-19,
-        /*  0.1       */ -5.551115123125783E-18,
-        /*  0.201168  */ -1.3471890270011499E-17,
-        /*  0.3048    */ -1.5365486660812166E-17,
         /*  0.785398… */  3.061616997868383E-17,
-        /*  0.9       */ -2.2204460492503132E-17,
-        /*  0.9144    */  9.414691248821328E-18,
         /*  1.111111… */ -4.9343245538895844E-17,
         /*  1.414213… */ -9.667293313452913E-17,
         /*  1.570796… */  6.123233995736766E-17,
-        /*  1.8288    */  1.8829382497642655E-17,
         /*  2.356194… */  9.184850993605148E-17,
-        /*  2.54      */ -3.552713678800501E-17,
         /*  3.141592… */  1.2246467991473532E-16,
         /*  6.283185… */  2.4492935982947064E-16,
-        /* 20.1168    */ -1.3471890270011499E-15,
         /* 57.295779… */ -1.9878495670576283E-15
     };
 
@@ -254,17 +228,31 @@ public final class DoubleDouble extends 
     @Override public int    intValue()    {return (int) longValue();}
 
     /**
-     * If the given value is one of the well known constants, returns the error for that
value.
-     * Otherwise returns 0.
+     * Suggests an {@link #error} for the given value. The {@code DoubleDouble} class contains
a hard-coded list
+     * of some frequently used constants, for example for various factors of π. If the given
value matches exactly
+     * one of those constants, then its error term is returned. Otherwise this method assumes
that the given value
+     * is defined in base 10 (e.g. many unit conversion factors) and tries to compute an
error term with
+     * {@link DecimalFunctions#deltaForDoubleToDecimal(double)}.
+     *
+     * {@section Rational}
+     * SIS often creates matrices for unit conversions, and most conversion factors are defined
precisely in base 10.
+     * For example the conversion from feet to metres is defined by a factor of exactly 0.3048,
which can not be
+     * represented precisely as a {@code double}. Consequently if a value of 0.3048 is given,
we can assume that
+     * the intend was to provide the "feet to metres" conversion factor and complete the
double-double instance
+     * accordingly.
      *
      * @param  value The value for which to get this error.
      * @return The error for the given value, or 0 if unknown. In the later case,
-     *         the given value is assumed to be the most accurate available representation.
+     *         the base 2 representation of the given value is assumed to be accurate enough.
      */
     public static double errorForWellKnownValue(final double value) {
         if (DISABLED) return 0;
         final int i = Arrays.binarySearch(VALUES, Math.abs(value));
-        return (i >= 0) ? MathFunctions.xorSign(ERRORS[i], value) : 0;
+        if (i >= 0) {
+            return MathFunctions.xorSign(ERRORS[i], value);
+        }
+        final double delta = DecimalFunctions.deltaForDoubleToDecimal(value);
+        return Double.isNaN(delta) ? 0 : delta;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -49,7 +49,8 @@ import static org.apache.sis.internal.ut
  * @version 0.4
  * @module
  *
- * @see org.apache.sis.util.Numbers
+ * @see MathFunctions#pow10(int)
+ * @see Math#log10(double)
  */
 public final class DecimalFunctions extends Static {
     /**
@@ -173,7 +174,9 @@ public final class DecimalFunctions exte
         if (Math.abs(r - mc) >= c/2) {
             r = Math.rint(mc);
         }
-        return Math.copySign(Math.scalb(r / c, e), value);
+        r = Math.copySign(Math.scalb(r / c, e), value);
+        assert value == (float) r : value;
+        return r;
     }
 
     /**
@@ -204,14 +207,14 @@ public final class DecimalFunctions exte
      * </font></blockquote>
      *
      * {@section Domain of validity}
-     * The current implementation has a hole for {@code abs(value) < 3E-8} approximatively,
except for the 0
-     * value which is supported. For any non-zero value closer to zero than the above-cited
threshold, this
-     * method returns {@code NaN} because it currently can not compute the delta with enough
accuracy.
-     * This limitation may change in any future SIS version if we found a better algorithm.
+     * The current implementation can not compute delta for {@code abs(value) < 3E-8}
approximatively,
+     * except for the 0 value which is supported. For any non-zero value closer to zero than
the 3E-8
+     * threshold, this method returns {@code NaN} because of insufficient algorithm accuracy.
+     * This limitation may change in any future SIS version if we find a better algorithm.
      *
      * @param  value The value for which to get the delta compared to its base 10 representation.
      * @return The delta that would need to be added to the given {@code double} value for
getting a result
-     *         closer to its base 10 representation, or {@link Double#NaN} if it can not
be computed.
+     *         closer to its base 10 representation, or {@link Double#NaN NaN} if it can
not be computed.
      */
     public static double deltaForDoubleToDecimal(final double value) {
         /*

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -286,6 +286,7 @@ public final class MathFunctions extends
      *
      * @see #pow10(int)
      * @see Math#pow(double, double)
+     * @see Math#log10(double)
      */
     public static double pow10(final double x) {
         final int ix = (int) x;
@@ -310,13 +311,17 @@ public final class MathFunctions extends
      * Special cases:
      * <ul>
      *   <li>If <var>x</var> is equals or lower than -324, then the result
is 0.</li>
-     *   <li>If <var>x</var> is equals or greater than 309, then the result
is {@link Double#POSITIVE_INFINITY}.</li>
+     *   <li>If <var>x</var> is equals or greater than 309, then the result
is {@linkplain Double#POSITIVE_INFINITY positive infinity}.</li>
      *   <li>If <var>x</var> is in the [0 … 18] range inclusive, then
the result is exact.</li>
      *   <li>For all other <var>x</var> values, the result is the closest
IEEE 754 approximation.</li>
      * </ul>
      *
      * @param x The exponent.
      * @return 10 raised to the given exponent.
+     *
+     * @see #pow10(double)
+     * @see #LOG10_2
+     * @see DecimalFunctions
      */
     public static double pow10(final int x) {
         return DecimalFunctions.pow10(x);

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -20,10 +20,12 @@ import java.util.Random;
 import java.math.BigDecimal;
 import java.math.MathContext;
 import java.lang.reflect.Field;
+import org.apache.sis.math.DecimalFunctions;
 import org.apache.sis.util.ArraysExt;
 import org.apache.sis.test.TestCase;
 import org.apache.sis.test.TestUtilities;
 import org.apache.sis.test.DependsOnMethod;
+import org.apache.sis.test.DependsOn;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
@@ -39,6 +41,7 @@ import static java.lang.StrictMath.*;
  * @version 0.4
  * @module
  */
+@DependsOn(org.apache.sis.math.DecimalFunctionsTest.class)
 public final strictfp class DoubleDoubleTest extends TestCase {
     /**
      * Number of time to repeat arithmetic tests.
@@ -287,62 +290,75 @@ public final strictfp class DoubleDouble
     }
 
     /**
-     * List of all {@link DoubleDouble#VALUES} as string decimal representation.
+     * List of all {@link DoubleDouble#VALUES} as string decimal representations,
+     * together with some additional values to test.
      */
     private static final String[] PREDEFINED_VALUES = {
-         "0.000001",
-         "0.000004848136811095359935899141023579480",
-         "0.00001",
-         "0.0001",
-         "0.0002777777777777777777777777777777778",
-         "0.001",
-         "0.002777777777777777777777777777777778",
-         "0.01",
-         "0.01666666666666666666666666666666667",
-         "0.01745329251994329576923690768488613",
          "0.1",
-         "0.201168",
-         "0.3048",
-         "0.785398163397448309615660845819876",
-         "0.9",
-         "0.9144",
-         "1.111111111111111111111111111111111",
-         "1.414213562373095048801688724209698",
-         "1.570796326794896619231321691639751",
-         "1.8288",
-         "2.356194490192344928846982537459627",
-         "2.54",
-         "3.14159265358979323846264338327950",
-         "6.28318530717958647692528676655901",
-        "20.1168",
-        "57.2957795130823208767981548141052"
+         "0.01",
+         "0.001",
+         "0.0001",
+         "0.00001",
+         "0.000001",
+         "0.3048",                                      // Feet to metres
+         "0.201168",                                    // Link to metres
+         "0.9144",                                      // Yard to metres
+         "1.8288",                                      // Fathom to metres
+        "20.1168",                                      // Chain to metres
+         "2.54",                                        // Inch to centimetres
+         "0.9",                                         // Degrees to gradians
+         "1.111111111111111111111111111111111",         // Gradian to degrees
+         "0.002777777777777777777777777777777778",      // 1/360°
+         "0.0002777777777777777777777777777777778",     // Second to degrees
+         "0.01666666666666666666666666666666667",       // Minute to degrees
+         "0.000004848136811095359935899141023579480",   // Arc-second to radians
+         "0.01745329251994329576923690768488613",       // Degrees to radians
+        "57.2957795130823208767981548141052",           // Radians to degrees
+         "3.14159265358979323846264338327950",          //  π
+         "6.28318530717958647692528676655901",          // 2π
+         "1.570796326794896619231321691639751",         //  π/2
+         "0.785398163397448309615660845819876",         //  π/4
+         "2.356194490192344928846982537459627",         // 3π/4
+         "1.414213562373095048801688724209698"          // √2
     };
 
     /**
-     * Ensures that the {@link DoubleDouble#VALUES} elements are sorted in strictly increasing
order.
-     * Also ensures that {@link DoubleDouble#ERRORS} has the same number of elements.
+     * Verifies the {@link DoubleDouble#VALUES} and {@link DoubleDouble#ERRORS} arrays.
+     *
+     * <ul>
+     *   <li>Elements in the {@code VALUES} array shall be sorted in increasing order.</li>
+     *   <li>{@code VALUES} and {@code ERRORS} arrays shall have the same length.</li>
+     *   <li>The arrays do not contains an entry for a value that could be omitted.</li>
+     * </ul>
      *
      * @throws ReflectiveOperationException Should never happen.
      */
     @Test
-    public void testValuesSorted() throws ReflectiveOperationException {
+    public void testArraysConsistency() throws ReflectiveOperationException {
         Field field = DoubleDouble.class.getDeclaredField("VALUES");
         field.setAccessible(true);
-        double[] array = (double[]) field.get(null);
-        assertTrue(ArraysExt.isSorted(array, true));
-        assertEquals(PREDEFINED_VALUES.length, array.length);
+        final double[] values = (double[]) field.get(null);
+        assertTrue(ArraysExt.isSorted(values, true));
 
         field = DoubleDouble.class.getDeclaredField("ERRORS");
         field.setAccessible(true);
-        array = (double[]) field.get(null);
-        assertEquals(PREDEFINED_VALUES.length, array.length);
+        final double[] errors = (double[]) field.get(null);
+        assertEquals(values.length, errors.length);
+
+        for (int i=0; i<values.length; i++) {
+            final double value = values[i];
+            final double delta = DecimalFunctions.deltaForDoubleToDecimal(value);
+            if (delta == errors[i]) {
+                fail("(value,entry) pair for value " + value + " can be omitted.");
+            }
+        }
     }
 
     /**
      * Tests {@link DoubleDouble#errorForWellKnownValue(double)}.
      */
     @Test
-    @DependsOnMethod("testValuesSorted")
+    @DependsOnMethod("testArraysConsistency")
     public void testErrorForWellKnownValue() {
         for (final String text : PREDEFINED_VALUES) {
             final double     value         = Double.valueOf(text);
@@ -376,10 +392,11 @@ public final strictfp class DoubleDouble
         assertEquals(9.184850993605148436E-17, DoubleDouble.errorForWellKnownValue(PI * (3./4)),
STRICT);
         assertEquals(9.320078015422868E-23,    DoubleDouble.errorForWellKnownValue(PI / (180
* 60 * 60)), STRICT);
 
-        assertTrue("toDegrees", DoubleDouble.errorForWellKnownValue(180 / PI)     != 0);
-        assertTrue("toDegrees", DoubleDouble.errorForWellKnownValue(toDegrees(1)) != 0);
-        assertTrue("toRadians", DoubleDouble.errorForWellKnownValue(PI / 180)     != 0);
-        assertTrue("toRadians", DoubleDouble.errorForWellKnownValue(toRadians(1)) != 0);
+        // Following is actually an anti-regression test.
+        assertEquals("toDegrees", -1.9878495670576283E-15, DoubleDouble.errorForWellKnownValue(180
/ PI),     STRICT);
+        assertEquals("toDegrees", -1.9878495670576283E-15, DoubleDouble.errorForWellKnownValue(toDegrees(1)),
STRICT);
+        assertEquals("toRadians",  2.9486522708701687E-19, DoubleDouble.errorForWellKnownValue(PI
/ 180),     STRICT);
+        assertEquals("toRadians",  2.9486522708701687E-19, DoubleDouble.errorForWellKnownValue(toRadians(1)),
STRICT);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -37,9 +37,7 @@ import static org.apache.sis.math.Decima
  * @version 0.4
  * @module
  */
-@DependsOn({
-    org.apache.sis.internal.util.NumericsTest.class
-})
+@DependsOn(org.apache.sis.internal.util.NumericsTest.class)
 public final strictfp class DecimalFunctionsTest extends TestCase {
     /**
      * Tolerance threshold for strict comparisons of floating point values.
@@ -159,7 +157,7 @@ public final strictfp class DecimalFunct
         assertEquals(-4.1729149110324215E-18, deltaForDoubleToDecimal(0.6546245266605436),
   4E-32); //       43 ULP
         assertEquals( 4.8633955884724856E-23, deltaForDoubleToDecimal(0.8234936921177336),
   4E-32); //  5666840 ULP
         assertEquals(-2.1507730707526207E-25, deltaForDoubleToDecimal(0.19920566694813302),
  2E-33); // 36267774 ULP
-        for (int i=0; i<50; i++) {
+        for (int i=0; i<500; i++) {
             double ieee = StrictMath.scalb(random.nextDouble(), 20 - random.nextInt(48));
             if (random.nextBoolean()) {
                 ieee = -ieee;

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1540062&r1=1540061&r2=1540062&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
[UTF-8] Fri Nov  8 14:57:57 2013
@@ -38,7 +38,6 @@ import org.junit.BeforeClass;
     // Most basic functions of SIS library.
     org.apache.sis.internal.jdk8.JDK8Test.class,
     org.apache.sis.internal.util.NumericsTest.class,
-    org.apache.sis.internal.util.DoubleDoubleTest.class,
     org.apache.sis.setup.OptionKeyTest.class,
     org.apache.sis.util.ArraysExtTest.class,
     org.apache.sis.util.CharactersTest.class,
@@ -61,6 +60,7 @@ import org.junit.BeforeClass;
     org.apache.sis.math.StatisticsTest.class,
     org.apache.sis.math.StatisticsFormatTest.class,
     org.apache.sis.internal.util.UtilitiesTest.class,
+    org.apache.sis.internal.util.DoubleDoubleTest.class,
 
     // Collections.
     org.apache.sis.internal.util.CheckedArrayListTest.class,



Mime
View raw message