/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidMathTest.java | 36 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); in assertEquals() 44 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); in assertEquals() 591 assertTrue("Should return NaN", Double.isNaN(Math.ulp(Double.NaN))); in testUlpD() 593 .ulp(Double.POSITIVE_INFINITY), 0D); in testUlpD() 595 .ulp(Double.NEGATIVE_INFINITY), 0D); in testUlpD() 597 .ulp(0.0), 0D); in testUlpD() 599 .ulp(+0.0), 0D); in testUlpD() 601 .ulp(-0.0), 0D); in testUlpD() 603 .ulp(Double.MAX_VALUE), 0D); in testUlpD() 605 .ulp(-Double.MAX_VALUE), 0D); in testUlpD() [all …]
|
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 …]
|
/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/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StrictMathTest.java | 956 assertEquals(Double.MAX_VALUE, halfMax - StrictMath.ulp(halfMax) in test_scalb_DI() 960 .ulp(1.0), Double.MAX_EXPONENT + 1)); in test_scalb_DI() 962 1.0 - StrictMath.ulp(1.0), Double.MAX_EXPONENT + 2)); in test_scalb_DI() 966 assertEquals(-Double.MAX_VALUE, halfMax + StrictMath.ulp(halfMax) in test_scalb_DI() 1110 assertEquals(Float.MAX_VALUE, halfMax - StrictMath.ulp(halfMax) in test_scalb_FI() 1114 .ulp(1.0f), Float.MAX_EXPONENT + 1)); in test_scalb_FI() 1116 1.0f - StrictMath.ulp(1.0f), Float.MAX_EXPONENT + 2)); in test_scalb_FI() 1120 assertEquals(-Float.MAX_VALUE, halfMax + StrictMath.ulp(halfMax) in test_scalb_FI() 1425 .isNaN(StrictMath.ulp(Double.NaN))); in test_ulp_D() 1427 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() 1357 assertEquals(Double.MAX_VALUE, halfMax - Math.ulp(halfMax) + halfMax); in test_scalb_DI() 1359 assertEquals(1.7976931348623155E308, Math.scalb(1.0 - Math.ulp(1.0), in test_scalb_DI() 1361 assertEquals(Double.POSITIVE_INFINITY, Math.scalb(1.0 - Math.ulp(1.0), in test_scalb_DI() 1366 assertEquals(-Double.MAX_VALUE, halfMax + Math.ulp(halfMax) + halfMax); in test_scalb_DI() 1510 assertEquals(Float.MAX_VALUE, halfMax - Math.ulp(halfMax) + halfMax); in test_scalb_FI() 1512 assertEquals(3.4028233E38f, Math.scalb(1.0f - Math.ulp(1.0f), in test_scalb_FI() 1514 assertEquals(Float.POSITIVE_INFINITY, Math.scalb(1.0f - Math.ulp(1.0f), in test_scalb_FI() 1519 assertEquals(-Float.MAX_VALUE, halfMax + Math.ulp(halfMax) + halfMax); in test_scalb_FI() [all …]
|
/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/luni/src/main/java/java/lang/ |
D | StrictMath.java | 886 public static double ulp(double d) { in ulp() method in StrictMath 916 public static float ulp(float f) { in ulp() method in StrictMath 917 return Math.ulp(f); in ulp()
|
D | Math.java | 946 public static double ulp(double d) { in ulp() method in Math 978 public static float ulp(float f) { in ulp() method in Math
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StrictMathBenchmark.java | 347 StrictMath.ulp(d); in timeUlpD() 353 StrictMath.ulp(f); in timeUlpF()
|
D | MathBenchmark.java | 473 result = Math.ulp(d); in timeUlpD() 481 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 | 2643 public BigDecimal ulp() { in ulp() method in BigDecimal
|