/libcore/luni/src/test/java/libcore/java/lang/ |
D | IntegerTest.java | 174 for(long dividend : vals) { 176 int uq = Integer.divideUnsigned((int) dividend, (int) divisor); 177 int ur = Integer.remainderUnsigned((int) dividend, (int) divisor); 178 assertEquals((int) (dividend / divisor), uq); 179 assertEquals((int) (dividend % divisor), ur); 180 assertEquals((int) dividend, uq * (int) divisor + ur); 184 for(long dividend : vals) { 186 Integer.divideUnsigned((int) dividend, 0); 190 Integer.remainderUnsigned((int) dividend, 0);
|
D | LongTest.java | 189 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);
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Long.java | 1295 public static long divideUnsigned(long dividend, long divisor) { in divideUnsigned() argument 1299 return (compareUnsigned(dividend, divisor)) < 0 ? 0L :1L; in divideUnsigned() 1302 if (dividend > 0) // Both inputs non-negative in divideUnsigned() 1303 return dividend/divisor; in divideUnsigned() 1311 return toUnsignedBigInteger(dividend). in divideUnsigned() 1328 public static long remainderUnsigned(long dividend, long divisor) { in remainderUnsigned() argument 1329 if (dividend > 0 && divisor > 0) { // signed comparisons in remainderUnsigned() 1330 return dividend % divisor; in remainderUnsigned() 1332 if (compareUnsigned(dividend, divisor) < 0) // Avoid explicit check for 0 divisor in remainderUnsigned() 1333 return dividend; in remainderUnsigned() [all …]
|
D | Integer.java | 1327 public static int divideUnsigned(int dividend, int divisor) { 1329 return (int)(toUnsignedLong(dividend) / toUnsignedLong(divisor)); 1344 public static int remainderUnsigned(int dividend, int divisor) { 1346 return (int)(toUnsignedLong(dividend) % toUnsignedLong(divisor));
|
/libcore/luni/src/main/java/java/math/ |
D | Division.java | 49 static int divideArrayByInt(int[] quotient, int[] dividend, final int dividendLength, in divideArrayByInt() argument 56 long temp = (rem << 32) | (dividend[i] & 0xffffffffL); in divideArrayByInt()
|
D | BigInt.java | 298 static void division(BigInt dividend, BigInt divisor, BigInt quotient, BigInt remainder) { in division() argument 312 NativeBN.BN_div(quot, rem, dividend.bignum, divisor.bignum); in division()
|
/libcore/ojluni/src/main/native/ |
D | Math.c | 95 Math_IEEEremainder(jdouble dividend, jdouble divisor) { in Math_IEEEremainder() argument 96 return remainder(dividend, divisor); in Math_IEEEremainder()
|
D | StrictMath.c | 115 jdouble dividend, in StrictMath_IEEEremainder() argument 118 return (jdouble) ieee_remainder(dividend, divisor); in StrictMath_IEEEremainder()
|
/libcore/ojluni/annotations/hiddenapi/java/lang/ |
D | Long.java | 193 public static long divideUnsigned(long dividend, long divisor) { in divideUnsigned() argument 197 public static long remainderUnsigned(long dividend, long divisor) { in remainderUnsigned() argument
|
D | Integer.java | 193 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/ |
D | Integer.annotated.java | 102 public static int divideUnsigned(int dividend, int divisor) { throw new RuntimeException("Stub!"); } in divideUnsigned() argument 104 public static int remainderUnsigned(int dividend, int divisor) { throw new RuntimeException("Stub!"… in remainderUnsigned() argument
|
D | Long.annotated.java | 101 public static long divideUnsigned(long dividend, long divisor) { throw new RuntimeException("Stub!"… in divideUnsigned() argument 103 public static long remainderUnsigned(long dividend, long divisor) { throw new RuntimeException("Stu… in remainderUnsigned() argument
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | BigDecimalTest.java | 202 for (long dividend : dividends) { in testDivideByOne() 203 String expected = Long.toString(dividend); in testDivideByOne() 204 checkDivide(expected, dividend, 1, 0, RoundingMode.UNNECESSARY); in testDivideByOne()
|