Ignore:
Timestamp:
2017-04-29T19:43:53+02:00 (7 years ago)
Author:
Don-vip
Message:

see #13387 - lower the max difference to 850 ULPs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java

    r12003 r12021  
    157157    @BeforeClass
    158158    public static void setUp() {
     159        System.out.println(Math.abs(-365218.9961895874 - -365218.9961895873) / Math.ulp(-365218.9961895874));
     160        System.out.println(Math.abs(-1004398.8994415683 - -1004398.899441569) / Math.ulp(-1004398.8994415683));
     161        System.out.println(Math.abs(24167.894484478747 - 24167.894484477292) / Math.ulp(24167.894484478747));
     162        System.out.println(Math.abs(22416.160243623483 - 22416.16024362645) / Math.ulp(22416.160243623483));
     163        System.out.println(Math.abs(602.4722978938371 - 602.4722978937789) / Math.ulp(602.4722978938371));
    159164        JOSMFixture.createUnitTestFixture().init();
    160165    }
     
    212217
    213218    private static boolean equalsDoubleMaxUlp(double d1, double d2) {
    214         // Due to error accumulation in projection computation, the difference can reach thousands of ULPs
    215         // The worst error is 34813 ULP (followed by 6144 ULP then 4193 ULP) with:
    216         // ID74 / UTM zone 49N (EPSG:23849): Projecting latlon(45.59023817877892,104.5874747574324):
    217         // expected: eastnorth(-196.85762506100582,5068568.526775028),
    218         // but got:  eastnorth(-196.85762506199535,5068568.526775027)!
    219         return Math.abs(d1 - d2) <= 35000 * Math.ulp(d1);
     219        // Due to error accumulation in projection computation, the difference can reach hundreds of ULPs
     220        // The worst error is 816 ULP (followed by 512 ULP then 400 ULP) with:
     221        // WGS 72BE / UTM zone 12N (EPSG:32412): Projecting latlon(-19.603789209544317,-115.55033658613439):
     222        // expected: eastnorth(22416.160243623483,-2174011.280696576),
     223        // but got:  eastnorth(22416.16024362645,-2174011.280696576)!
     224        return Math.abs(d1 - d2) <= 850 * Math.ulp(d1);
    220225    }
    221226
Note: See TracChangeset for help on using the changeset viewer.