/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | ExpTests.java | 95 EXP_OVERFLOW_THRESH - 512 * Math.ulp(EXP_OVERFLOW_THRESH), in testAgainstTranslit() 98 EXP_UNDERFLOW_THRESH - 512 * Math.ulp(EXP_UNDERFLOW_THRESH), in testAgainstTranslit() 107 Double.MIN_NORMAL - Math.ulp(Double.MIN_NORMAL) * 512, in testAgainstTranslit() 112 double ulp = Math.ulp(decisionPoint); in testAgainstTranslit() local 113 testRange(decisionPoint - 1024 * ulp, ulp, 1_024); in testAgainstTranslit() 119 testRange(x, Math.ulp(x), 100); in testAgainstTranslit()
|
D | CubeRootTests.java | 482 testRange(x, Math.ulp(x), 1000); in testAgainstTranslit() 486 testRange(x, -Math.ulp(x), 1000); in testAgainstTranslit() 497 testRange(x, 2.0 * Math.ulp(x), 1000); in testAgainstTranslit()
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | FusedMultiplyAddTests.java | 208 {1.0 + Math.ulp(1.0), 1.0 + Math.ulp(1.0), -1.0 - 2.0 * Math.ulp(1.0), in testSimpleD() 209 Math.ulp(1.0) * Math.ulp(1.0)}, in testSimpleD() 328 {1.0f + Math.ulp(1.0f), 1.0f + Math.ulp(1.0f), -1.0f - 2.0f * Math.ulp(1.0f), in testSimpleF() 329 Math.ulp(1.0f) * Math.ulp(1.0f)}, in testSimpleF()
|
D | Log10Tests.java | 109 if (Math.abs(((result = Math.log10(input)) - expected) / Math.ulp(expected)) in testLog10() 118 ((result = StrictMath.log10(input)) - expected) / Math.ulp(expected)) in testLog10() 171 if (Math.abs(neighbors[i] - expected) > 3 * Math.ulp(expected)) { in testLog10() 178 if (Math.abs(neighborsStrict[i] - expected) > 3 * Math.ulp(expected)) { in testLog10()
|
D | IeeeRecommendedTests.java | 1280 Math.ulp(f), expected); in testUlpCase() 1282 Math.ulp(minus_f), expected); in testUlpCase() 1284 StrictMath.ulp(f), expected); in testUlpCase() 1286 StrictMath.ulp(minus_f), expected); in testUlpCase() 1293 Math.ulp(d), expected); in testUlpCase() 1295 Math.ulp(minus_d), expected); in testUlpCase() 1297 StrictMath.ulp(d), expected); in testUlpCase() 1299 StrictMath.ulp(minus_d), expected); in testUlpCase()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidStrictMathTest.java | 615 .isNaN(StrictMath.ulp(Double.NaN))); in testUlp_D() 617 StrictMath.ulp(Double.POSITIVE_INFINITY), 0D); in testUlp_D() 619 StrictMath.ulp(Double.NEGATIVE_INFINITY), 0D); in testUlp_D() 621 .ulp(0.0), 0D); in testUlp_D() 623 .ulp(+0.0), 0D); in testUlp_D() 625 .ulp(-0.0), 0D); in testUlp_D() 627 StrictMath.ulp(Double.MAX_VALUE), 0D); in testUlp_D() 629 StrictMath.ulp(-Double.MAX_VALUE), 0D); in testUlp_D() 632 .ulp(Double.MIN_VALUE), 0D); in testUlp_D() 634 .ulp(-Double.MIN_VALUE), 0D); in testUlp_D() [all …]
|
D | OldAndroidMathTest.java | 38 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); in assertEquals() 46 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); in assertEquals() 631 assertTrue("Should return NaN", Double.isNaN(Math.ulp(Double.NaN))); in testUlpD() 633 .ulp(Double.POSITIVE_INFINITY), 0D); in testUlpD() 635 .ulp(Double.NEGATIVE_INFINITY), 0D); in testUlpD() 637 .ulp(0.0), 0D); in testUlpD() 639 .ulp(+0.0), 0D); in testUlpD() 641 .ulp(-0.0), 0D); in testUlpD() 643 .ulp(Double.MAX_VALUE), 0D); in testUlpD() 645 .ulp(-Double.MAX_VALUE), 0D); in testUlpD() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StrictMathTest.java | 1020 assertEquals(Double.MAX_VALUE, halfMax - StrictMath.ulp(halfMax) in test_scalb_DI() 1024 .ulp(1.0), Double.MAX_EXPONENT + 1)); in test_scalb_DI() 1026 1.0 - StrictMath.ulp(1.0), Double.MAX_EXPONENT + 2)); in test_scalb_DI() 1030 assertEquals(-Double.MAX_VALUE, halfMax + StrictMath.ulp(halfMax) in test_scalb_DI() 1174 assertEquals(Float.MAX_VALUE, halfMax - StrictMath.ulp(halfMax) in test_scalb_FI() 1178 .ulp(1.0f), Float.MAX_EXPONENT + 1)); in test_scalb_FI() 1180 1.0f - StrictMath.ulp(1.0f), Float.MAX_EXPONENT + 2)); in test_scalb_FI() 1184 assertEquals(-Float.MAX_VALUE, halfMax + StrictMath.ulp(halfMax) in test_scalb_FI() 1489 .isNaN(StrictMath.ulp(Double.NaN))); in test_ulp_D() 1491 StrictMath.ulp(Double.POSITIVE_INFINITY), 0D); in test_ulp_D() [all …]
|
D | MathTest.java | 131 assertEquals(23.111993172558684, Math.cbrt(12345.6), Math.ulp(23.111993172558684)); in test_cbrt_D() 136 assertEquals(-23.111993172558684, Math.cbrt(-12345.6), Math.ulp(-23.111993172558684)); in test_cbrt_D() 1456 assertEquals(Double.MAX_VALUE, halfMax - Math.ulp(halfMax) + halfMax); in test_scalb_DI() 1458 assertEquals(1.7976931348623155E308, Math.scalb(1.0 - Math.ulp(1.0), in test_scalb_DI() 1460 assertEquals(Double.POSITIVE_INFINITY, Math.scalb(1.0 - Math.ulp(1.0), in test_scalb_DI() 1465 assertEquals(-Double.MAX_VALUE, halfMax + Math.ulp(halfMax) + halfMax); in test_scalb_DI() 1609 assertEquals(Float.MAX_VALUE, halfMax - Math.ulp(halfMax) + halfMax); in test_scalb_FI() 1611 assertEquals(3.4028233E38f, Math.scalb(1.0f - Math.ulp(1.0f), in test_scalb_FI() 1613 assertEquals(Float.POSITIVE_INFINITY, Math.scalb(1.0f - Math.ulp(1.0f), in test_scalb_FI() 1618 assertEquals(-Float.MAX_VALUE, halfMax + Math.ulp(halfMax) + halfMax); in test_scalb_FI() [all …]
|
/libcore/ojluni/src/test/java/lang/Float/ |
D | ParseFloat.java | 103 … l = new BigDecimal(Float.MAX_VALUE).add(new BigDecimal(Math.ulp(Float.MAX_VALUE)).multiply(HALF)); in check() 106 … l = new BigDecimal(na).subtract(new BigDecimal(Math.ulp(-Math.nextUp(-na))).multiply(HALF)); in check() 107 u = new BigDecimal(na).add(new BigDecimal(Math.ulp(n)).multiply(HALF)); in check() 310 … BigDecimal lowerBound = f_BD.subtract(new BigDecimal(Math.ulp(-Math.nextUp(-f))).multiply(HALF)); in testPowers() 311 BigDecimal upperBound = f_BD.add(new BigDecimal(Math.ulp(f)).multiply(HALF)); in testPowers() 316 …check(new BigDecimal(Float.MAX_VALUE).add(new BigDecimal(Math.ulp(Float.MAX_VALUE)).multiply(HALF)… in testPowers()
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | RunCSVTests.java | 62 allowedError = UlpMap.get(func)*Math.ulp(expectedOutput); in runTest() 64 allowedError = Math.ulp(expectedOutput); in runTest() 96 allowedError = UlpMap.get(func)*Math.ulp(expectedOutput); in run2InputTest() 98 allowedError = Math.ulp(expectedOutput); in run2InputTest()
|
/libcore/luni/src/test/resources/ |
D | math_java_only.csv | 273 ulp,0x1.0p971,-0x1.8ec3beb2d4185p1023 274 ulp,0x1.0p971,-0x1.a49ea827e7d05p1023 275 ulp,0x1.0p969,-0x1.47afe754a89fep1021 276 ulp,0x1.0p970,-0x1.ea33b08c7fbfbp1022 277 ulp,0x1.0p971,0x1.40c8f2c416881p1023 278 ulp,0x1.0p970,-0x1.d2762c5e7c22bp1022 279 ulp,0x1.0p969,0x1.0c0c8b67b7daep1021 280 ulp,0x1.0p971,-0x1.800e50b80ea85p1023 281 ulp,0x1.0p968,0x1.ccf6eeb86909cp1020 282 ulp,0x1.0p970,-0x1.6d6d5ccb7231fp1022 [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | FpUtils.java | 853 public static double ulp(double d) { in ulp() method in FpUtils 854 return Math.ulp(d); in ulp() 882 public static float ulp(float f) { in ulp() method in FpUtils 883 return Math.ulp(f); in ulp()
|
/libcore/ojluni/src/test/java/lang/Double/ |
D | ParseDouble.java | 104 …l = new BigDecimal(Double.MAX_VALUE).add(new BigDecimal(Math.ulp(Double.MAX_VALUE)).multiply(HALF)… in check() 107 … l = new BigDecimal(na).subtract(new BigDecimal(Math.ulp(Math.nextUp(-na))).multiply(HALF)); in check() 108 u = new BigDecimal(na).add(new BigDecimal(Math.ulp(n)).multiply(HALF)); in check() 730 … BigDecimal lowerBound = d_BD.subtract(new BigDecimal(Math.ulp(Math.nextUp(-d))).multiply(HALF)); in testPowers() 731 BigDecimal upperBound = d_BD.add(new BigDecimal(Math.ulp(d)).multiply(HALF)); in testPowers() 736 …check(new BigDecimal(Double.MAX_VALUE).add(new BigDecimal(Math.ulp(Double.MAX_VALUE)).multiply(HAL… in testPowers()
|
/libcore/ojluni/src/test/java/math/BigDecimal/ |
D | SquareRootTests.java | 305 BigDecimal near10sq_ulp = near10sq.add(near10sq.ulp()); 329 BigDecimal near1sq_ulp = near1sq.add(near1sq.ulp()); 626 BigDecimal ulp = result.ulp(); 627 BigDecimal neighborUp = result.add(ulp); 630 ulp = ulp.divide(TEN); 632 BigDecimal neighborDown = result.subtract(ulp);
|
D | ZeroScalingTests.java | 353 result = zero.ulp(); in ulpTests()
|
/libcore/ojluni/annotations/hiddenapi/sun/misc/ |
D | FpUtils.java | 149 public static double ulp(double d) { in ulp() method in FpUtils 154 public static float ulp(float f) { in ulp() method in FpUtils
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 2090 public static double ulp(double d) { in ulp() method in StrictMath 2091 return Math.ulp(d); in ulp() 2117 public static float ulp(float f) { in ulp() method in StrictMath 2118 return Math.ulp(f); in ulp()
|
D | Math.java | 2679 public static double ulp(double d) { in ulp() method in Math 2726 public static float ulp(float f) { in ulp() method
|
/libcore/ojluni/annotations/flagged_api/java/lang/ |
D | Math.annotated.java | 206 public static double ulp(double d) { throw new RuntimeException("Stub!"); } in ulp() method in Math 208 public static float ulp(float f) { throw new RuntimeException("Stub!"); } in ulp() method in Math
|
D | StrictMath.annotated.java | 205 public static double ulp(double d) { throw new RuntimeException("Stub!"); } in ulp() method in StrictMath 207 public static float ulp(float f) { throw new RuntimeException("Stub!"); } in ulp() method in StrictMath
|
/libcore/ojluni/src/test/java/util/stream/ |
D | TestDoubleSumAverage.java | 72 double increment = Math.ulp(base)/2.0; in testForCompenstation() 162 double ulpDifference = Math.abs(expected - computed) / Math.ulp(expected); in compareUlpDifference()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StrictMathBenchmark.java | 377 StrictMath.ulp(d); in timeUlpD() 383 StrictMath.ulp(f); in timeUlpF()
|
D | MathBenchmark.java | 469 result = Math.ulp(d); in timeUlpD() 477 result = Math.ulp(f); in timeUlpF()
|
/libcore/ojluni/src/main/java/java/math/ |
D | BigDecimal.java | 2297 BigDecimal ulp = result.ulp(); in sqrt() 2305 ulp = ulp.multiply(ONE_TENTH); in sqrt() 2307 result = result.subtract(ulp); in sqrt() 2315 result = result.add(result.ulp()); in sqrt() 2396 BigDecimal ulp = result.ulp(); 2397 BigDecimal neighborUp = result.add(ulp); 2400 ulp = ulp.divide(TEN); 2402 BigDecimal neighborDown = result.subtract(ulp); 3875 public BigDecimal ulp() {
|