Home
last modified time | relevance | path

Searched refs:round (Results 1 – 15 of 15) sorted by relevance

/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalArithmeticTest.java36 a.round(mc).toString()); in testAddMathContextNonTrivial()
38 b.round(mc).toString()); in testAddMathContextNonTrivial()
40 a.round(mc).add(b.round(mc)).toString()); in testAddMathContextNonTrivial()
61 a.round(mc).subtract(b.round(mc)).toString()); in testSubtractMathContextNonTrivial()
83 res = a.round(mc).multiply(b.round(mc)); in testMultiplyMathContextNonTrivial()
85 res = res.round(mc); in testMultiplyMathContextNonTrivial()
131 a.round(mc).pow(1000).round(mc).toString()); in testPowMathContextNonTrivial()
138 a.round(mc).pow(1000).round(mc).toString()); in testPowMathContextNonTrivial()
197 a.round(mc).divide(b.round(mc)).toString()); in testDivideINonTrivial()
252 a.round(mc).divide(b.round(mc)).toString()); in testDivideScaleRoundingModeNonTrivial()
[all …]
DBigDecimalTest.java69 BigDecimal rounded = bigDecimal.round(new MathContext(2, RoundingMode.FLOOR)); in testRound()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java653 public static int round(float a) { in round() method in StrictMath
654 return Math.round(a); in round()
677 public static long round(double a) { in round() method in StrictMath
678 return Math.round(a); in round()
DMath.java662 public static int round(float a) { in round() method in Math
711 public static long round(double a) { in round() method in Math
/libcore/ojluni/annotations/mmodule/java/lang/
DMath.annotated.java75 public static int round(float a) { throw new RuntimeException("Stub!"); } in round() method in Math
77 public static long round(double a) { throw new RuntimeException("Stub!"); } in round() method in Math
/libcore/ojluni/src/main/java/sun/misc/
DFloatingDecimal.java2236 boolean round = false; in parseHexString()
2319 round = (currentDigit & 0x1L) != 0L; in parseHexString()
2326 round = (currentDigit & 0x2L) != 0L; in parseHexString()
2334 round = (currentDigit & 0x4L) != 0L; in parseHexString()
2341 round = ((currentDigit & 0x8L) != 0); // is top bit set? in parseHexString()
2375 … boolean floatSticky = (significand & ((1L << threshShift) - 1)) != 0 || round || sticky; in parseHexString()
2390 … boolean floatSticky = (significand & ((1L << threshShift) - 1)) != 0 || round || sticky; in parseHexString()
2440 sticky = sticky || round; in parseHexString()
2441 round = false; in parseHexString()
2455 round = (significand & (1L << (bitsDiscarded - 1))) != 0L; in parseHexString()
[all …]
/libcore/luni/src/main/java/java/math/
DBigDecimal.java794 return add(augend).round(mc); in add()
804 return add(augend).round(mc); in add()
808 return add(augend).round(mc); in add()
823 return larger.round(mc); in add()
897 return subtract(subtrahend).round(mc); in subtract()
914 return leftOperand.round(mc); in subtract()
918 return subtract(subtrahend).round(mc); in subtract()
1665 accum = round(newPrecision); in pow()
1749 return round(mc); in plus()
1848 public BigDecimal round(MathContext mc) { in round() method in BigDecimal
/libcore/benchmarks/src/benchmarks/regression/
DStrictMathBenchmark.java299 StrictMath.round(d); in timeRoundD()
305 StrictMath.round(f); in timeRoundF()
DMathBenchmark.java365 result = Math.round(d); in timeRoundD()
373 result = Math.round(f); in timeRoundF()
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidStrictMathTest.java448 -91, StrictMath.round(-90.89d)); in testRoundD()
454 -91, StrictMath.round(-90.89f)); in testRoundF()
DOldAndroidMathTest.java472 assertEquals("Incorrect rounding of a float", -91, Math.round(-90.89d)); in testRoundD()
477 assertEquals("Incorrect rounding of a float", -91, Math.round(-90.89f)); in testRoundF()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalArithmeticTest.java1543 BigDecimal result = aNumber.round(mc); in testRoundMathContextHALF_DOWN()
1560 BigDecimal result = aNumber.round(mc); in testRoundMathContextHALF_UP()
1576 BigDecimal result = aNumber.round(mc); in testRoundMathContextPrecision0()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DStrictMathTest.java979 -91, StrictMath.round(-90.89d)); in test_roundD()
988 -91, StrictMath.round(-90.89f)); in test_roundF()
DMathTest.java1416 assertEquals("Incorrect rounding of a float", -91, Math.round(-90.89d)); in test_roundD()
1424 assertEquals("Incorrect rounding of a float", -91, Math.round(-90.89f)); in test_roundF()
/libcore/ojluni/src/main/java/java/util/
DFormatter.java3585 boolean round
3589 if((leastZero && round && sticky) || (!leastZero && round)) {