Home
last modified time | relevance | path

Searched refs:ulp (Results 1 – 25 of 29) sorted by relevance

12

/libcore/ojluni/src/test/java/lang/StrictMath/
DExpTests.java95 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()
DCubeRootTests.java482 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/
DFusedMultiplyAddTests.java208 {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()
DLog10Tests.java109 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()
DIeeeRecommendedTests.java1280 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/
DOldAndroidStrictMathTest.java615 .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 …]
DOldAndroidMathTest.java38 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/
DStrictMathTest.java1020 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 …]
DMathTest.java131 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/
DParseFloat.java103 … 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/
DRunCSVTests.java62 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/
Dmath_java_only.csv273 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/
DFpUtils.java853 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/
DParseDouble.java104 …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/
DSquareRootTests.java305 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);
DZeroScalingTests.java353 result = zero.ulp(); in ulpTests()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DFpUtils.java149 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/
DStrictMath.java2090 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()
DMath.java2679 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/
DMath.annotated.java206 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
DStrictMath.annotated.java205 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/
DTestDoubleSumAverage.java72 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/
DStrictMathBenchmark.java377 StrictMath.ulp(d); in timeUlpD()
383 StrictMath.ulp(f); in timeUlpF()
DMathBenchmark.java469 result = Math.ulp(d); in timeUlpD()
477 result = Math.ulp(f); in timeUlpF()
/libcore/ojluni/src/main/java/java/math/
DBigDecimal.java2297 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() {

12