Home
last modified time | relevance | path

Searched refs:dividend (Results 1 – 17 of 17) sorted by relevance

/libcore/ojluni/src/test/java/math/BigDecimal/
DIntegralDivisionTests.java74 BigDecimal dividend = new BigDecimal("11003"); in dividetoIntegralValueRoundedTests() local
83 divideContextTestPrecs(dividend, divisor, quotients); in dividetoIntegralValueRoundedTests()
85 dividend = new BigDecimal("11003"); in dividetoIntegralValueRoundedTests()
95 divideContextTestPrecs(dividend, divisor, quotients2); in dividetoIntegralValueRoundedTests()
97 dividend = new BigDecimal("1230000"); in dividetoIntegralValueRoundedTests()
107 divideContextTestPrecs(dividend, divisor, quotients3); in dividetoIntegralValueRoundedTests()
109 dividend = new BigDecimal("33"); in dividetoIntegralValueRoundedTests()
117 divideContextTestPrecs(dividend, divisor, quotients4); in dividetoIntegralValueRoundedTests()
119 dividend = new BigDecimal("34"); in dividetoIntegralValueRoundedTests()
127 divideContextTestPrecs(dividend, divisor, quotients5); in dividetoIntegralValueRoundedTests()
[all …]
DDivideTests.java43 BigDecimal anotherDivide(BigDecimal dividend, BigDecimal divisor) { in anotherDivide() argument
48 if (dividend.signum() == 0) // 0/0 in anotherDivide()
52 if (dividend.signum() == 0) // 0/y in anotherDivide()
76 … BigInteger dividendIntvalue = dividend.scaleByPowerOfTen(dividend.scale()).toBigInteger().abs(); in anotherDivide()
130 MathContext mc = new MathContext(dividend.precision() + in anotherDivide()
135 return dividend.divide(divisor, mc); in anotherDivide()
188 int dividend = primes[i] * primes[j]; in nonTerminating() local
191 if ( ((dividend/divisor) * divisor) != dividend ) { in nonTerminating()
193 BigDecimal quotient = (new BigDecimal(dividend). in nonTerminating()
197 dividend + " / " + divisor + "."); in nonTerminating()
/libcore/ojluni/src/test/java/lang/Integer/
DUnsigned.java306 for(long dividend : inRange) { in testDivideAndRemainder()
316 quotient = Integer.divideUnsigned((int) dividend, (int) divisor); in testDivideAndRemainder()
323 remainder = Integer.remainderUnsigned((int) dividend, (int) divisor); in testDivideAndRemainder()
329 quotient = Integer.divideUnsigned((int) dividend, (int) divisor); in testDivideAndRemainder()
330 longQuotient = dividend / divisor; in testDivideAndRemainder()
335 Integer.toUnsignedString((int) dividend), in testDivideAndRemainder()
339 remainder = Integer.remainderUnsigned((int) dividend, (int) divisor); in testDivideAndRemainder()
340 longRemainder = dividend % divisor; in testDivideAndRemainder()
345 Integer.toUnsignedString((int) dividend), in testDivideAndRemainder()
/libcore/luni/src/test/java/libcore/java/lang/
DLongTest.java189 for(BigInteger dividend : vals) {
191 long uq = Long.divideUnsigned(dividend.longValue(), divisor.longValue());
192 long ur = Long.remainderUnsigned(dividend.longValue(), divisor.longValue());
193 assertEquals(dividend.divide(divisor).longValue(), uq);
194 assertEquals(dividend.remainder(divisor).longValue(), ur);
195 assertEquals(dividend.longValue(), uq * divisor.longValue() + ur);
199 for(BigInteger dividend : vals) {
201 Long.divideUnsigned(dividend.longValue(), 0);
205 Long.remainderUnsigned(dividend.longValue(), 0);
DIntegerTest.java175 for (long dividend : vals) { in testDivideAndRemainderUnsigned()
177 int uq = Integer.divideUnsigned((int) dividend, (int) divisor); in testDivideAndRemainderUnsigned()
178 int ur = Integer.remainderUnsigned((int) dividend, (int) divisor); in testDivideAndRemainderUnsigned()
179 assertEquals((int) (dividend / divisor), uq); in testDivideAndRemainderUnsigned()
180 assertEquals((int) (dividend % divisor), ur); in testDivideAndRemainderUnsigned()
181 assertEquals((int) dividend, uq * (int) divisor + ur); in testDivideAndRemainderUnsigned()
185 for (long dividend : vals) { in testDivideAndRemainderUnsigned()
187 ArithmeticException.class, () -> Integer.divideUnsigned((int) dividend, 0)); in testDivideAndRemainderUnsigned()
189 ArithmeticException.class, () -> Integer.remainderUnsigned((int) dividend, 0)); in testDivideAndRemainderUnsigned()
/libcore/ojluni/src/test/java/lang/Long/
DUnsigned.java370 for(BigInteger dividend : inRange) { in testDivideAndRemainder()
380 quotient = Long.divideUnsigned(dividend.longValue(), divisor.longValue()); in testDivideAndRemainder()
387 … remainder = Long.remainderUnsigned(dividend.longValue(), divisor.longValue()); in testDivideAndRemainder()
393 quotient = Long.divideUnsigned(dividend.longValue(), divisor.longValue()); in testDivideAndRemainder()
394 longQuotient = dividend.divide(divisor); in testDivideAndRemainder()
401 Long.toUnsignedString(dividend.longValue()), in testDivideAndRemainder()
404 remainder = Long.remainderUnsigned(dividend.longValue(), divisor.longValue()); in testDivideAndRemainder()
405 longRemainder = dividend.remainder(divisor); in testDivideAndRemainder()
412 Long.toUnsignedString(dividend.longValue()), in testDivideAndRemainder()
/libcore/ojluni/src/main/java/java/lang/
DLong.java1709 public static long divideUnsigned(long dividend, long divisor) { in divideUnsigned() argument
1712 final long q = (dividend >>> 1) / divisor << 1; in divideUnsigned()
1713 final long r = dividend - q * divisor; in divideUnsigned()
1716 return (dividend & ~(dividend - divisor)) >>> (Long.SIZE - 1); in divideUnsigned()
1731 public static long remainderUnsigned(long dividend, long divisor) { in remainderUnsigned() argument
1734 final long q = (dividend >>> 1) / divisor << 1; in remainderUnsigned()
1735 final long r = dividend - q * divisor; in remainderUnsigned()
1758 return dividend - (((dividend & ~(dividend - divisor)) >> (Long.SIZE - 1)) & divisor); in remainderUnsigned()
DInteger.java1682 public static int divideUnsigned(int dividend, int divisor) {
1684 return (int)(toUnsignedLong(dividend) / toUnsignedLong(divisor));
1699 public static int remainderUnsigned(int dividend, int divisor) {
1701 return (int)(toUnsignedLong(dividend) % toUnsignedLong(divisor));
/libcore/ojluni/src/main/native/
DMath.c95 Math_IEEEremainder(jdouble dividend, jdouble divisor) { in Math_IEEEremainder() argument
96 return remainder(dividend, divisor); in Math_IEEEremainder()
DStrictMath.c115 jdouble dividend, in StrictMath_IEEEremainder() argument
118 return (jdouble) ieee_remainder(dividend, divisor); in StrictMath_IEEEremainder()
/libcore/ojluni/src/main/java/java/math/
DBigDecimal.java1824 BigDecimal dividend = this; in divide()
1825 long preferredScale = (long)dividend.scale - divisor.scale; in divide()
1839 if (dividend.signum() == 0) // 0/0 in divide()
1843 if (dividend.signum() == 0) // 0/y in divide()
1845 int xscale = dividend.precision(); in divide()
1847 if(dividend.intCompact!=INFLATED) { in divide()
1849 … return divide(dividend.intCompact, xscale, divisor.intCompact, yscale, preferredScale, mc); in divide()
1851 … return divide(dividend.intCompact, xscale, divisor.intVal, yscale, preferredScale, mc); in divide()
1855 … return divide(dividend.intVal, xscale, divisor.intCompact, yscale, preferredScale, mc); in divide()
1857 return divide(dividend.intVal, xscale, divisor.intVal, yscale, preferredScale, mc); in divide()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/lang/
DLong.java193 public static long divideUnsigned(long dividend, long divisor) { in divideUnsigned() argument
197 public static long remainderUnsigned(long dividend, long divisor) { in remainderUnsigned() argument
DInteger.java193 public static int divideUnsigned(int dividend, int divisor) { in divideUnsigned() argument
197 public static int remainderUnsigned(int dividend, int divisor) { in remainderUnsigned() argument
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DInteger.annotated.java106 public static int divideUnsigned(int dividend, int divisor) { throw new RuntimeException("Stub!"); } in divideUnsigned() argument
108 public static int remainderUnsigned(int dividend, int divisor) { throw new RuntimeException("Stub!"… in remainderUnsigned() argument
DLong.annotated.java105 public static long divideUnsigned(long dividend, long divisor) { throw new RuntimeException("Stub!"… in divideUnsigned() argument
107 public static long remainderUnsigned(long dividend, long divisor) { throw new RuntimeException("Stu… in remainderUnsigned() argument
/libcore/luni/src/test/java/libcore/java/math/
DBigDecimalTest.java202 for (long dividend : dividends) { in testDivideByOne()
203 String expected = Long.toString(dividend); in testDivideByOne()
204 checkDivide(expected, dividend, 1, 0, RoundingMode.UNNECESSARY); in testDivideByOne()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKDuration.java2564 public void test_dividedByDur(Duration dividend, Duration divisor, long expected) { in test_dividedByDur() argument
2565 assertEquals(dividend.dividedBy(divisor), expected); in test_dividedByDur()