/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/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/main/java/java/lang/ |
D | StrictMath.java | 1140 public static double ulp(double d) { in ulp() method in StrictMath 1141 return Math.ulp(d); in ulp() 1167 public static float ulp(float f) { in ulp() method in StrictMath 1168 return Math.ulp(f); in ulp()
|
D | Math.java | 1461 public static double ulp(double d) { in ulp() method in Math 1512 public static float ulp(float f) { in ulp() method in Math
|
/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/annotations/mmodule/java/lang/ |
D | Math.annotated.java | 142 public static double ulp(double d) { throw new RuntimeException("Stub!"); } in ulp() method in Math 144 public static float ulp(float f) { throw new RuntimeException("Stub!"); } in ulp() method in Math
|
/libcore/ojluni/src/test/java/util/stream/ |
D | TestDoubleSumAverage.java | 70 double increment = Math.ulp(base)/2.0; in testForCompenstation() 160 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigDecimalArithmeticTest.java | 1589 BigDecimal result = aNumber.ulp(); in testUlpPos() 1603 BigDecimal result = aNumber.ulp(); in testUlpNeg() 1617 BigDecimal result = aNumber.ulp(); in testUlpZero()
|
/libcore/luni/src/main/java/java/math/ |
D | BigDecimal.java | 2649 public BigDecimal ulp() { in ulp() method in BigDecimal
|