Home
last modified time | relevance | path

Searched refs:divisor (Results 1 – 18 of 18) sorted by relevance

/libcore/luni/src/main/java/java/math/
DDivision.java50 final int divisor) { in divideArrayByInt() argument
53 long bLong = divisor & 0xffffffffL; in divideArrayByInt()
67 long bPos = divisor >>> 1; in divideArrayByInt()
72 if ((divisor & 1) != 0) { in divideArrayByInt()
DBigDecimal.java997 public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode) { in divide() argument
998 return divide(divisor, scale, RoundingMode.valueOf(roundingMode)); in divide()
1024 public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode) { in divide() argument
1029 if (divisor.isZero()) { in divide()
1033 long diffScale = ((long)this.scale - divisor.scale) - scale; in divide()
1042 if(this.bitLength < 64 && divisor.bitLength < 64 ) { in divide()
1045 if (this.smallValue != Long.MIN_VALUE || divisor.smallValue != -1) { in divide()
1047 divisor.smallValue, in divide()
1053 divisor.bitLength + LONG_POWERS_OF_TEN_BIT_LENGTH[(int)diffScale] < 64) { in divide()
1055 divisor.smallValue*MathUtils.LONG_POWERS_OF_TEN[(int)diffScale], in divide()
[all …]
DBigInteger.java942 public @NonNull BigInteger @NonNull [] divideAndRemainder(@NonNull BigInteger divisor) { in divideAndRemainder() argument
943 BigInt divisorBigInt = divisor.getBigInt(); in divideAndRemainder()
958 @NonNull public BigInteger divide(@NonNull BigInteger divisor) { in divide() argument
960 BigInt.division(getBigInt(), divisor.getBigInt(), quotient, null); in divide()
973 @NonNull public BigInteger remainder(@NonNull BigInteger divisor) { in remainder() argument
975 BigInt.division(getBigInt(), divisor.getBigInt(), null, remainder); in remainder()
DBigInt.java298 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/luni/src/test/java/libcore/java/lang/
DIntegerTest.java175 for(long divisor : 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);
DLongTest.java190 for(BigInteger divisor : 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);
/libcore/ojluni/src/main/java/java/lang/
DLong.java1295 public static long divideUnsigned(long dividend, long divisor) { in divideUnsigned() argument
1296 if (divisor < 0L) { // signed comparison in divideUnsigned()
1299 return (compareUnsigned(dividend, divisor)) < 0 ? 0L :1L; in divideUnsigned()
1303 return dividend/divisor; in divideUnsigned()
1312 divide(toUnsignedBigInteger(divisor)).longValue(); 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()
1336 remainder(toUnsignedBigInteger(divisor)).longValue(); in remainderUnsigned()
DInteger.java1327 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/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.c116 jdouble divisor) in StrictMath_IEEEremainder() argument
118 return (jdouble) ieee_remainder(dividend, divisor); in StrictMath_IEEEremainder()
/libcore/ojluni/annotations/hiddenapi/java/lang/
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
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
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DLong.annotated.java101 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
DInteger.annotated.java102 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
/libcore/ojluni/src/main/java/java/time/
DDuration.java969 public Duration dividedBy(long divisor) { in dividedBy() argument
970 if (divisor == 0) { in dividedBy()
973 if (divisor == 1) { in dividedBy()
976 return create(toSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN)); in dividedBy()
/libcore/ojluni/annotations/hiddenapi/java/time/
DDuration.java253 public java.time.Duration dividedBy(long divisor) { in dividedBy() argument
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKDuration.java2354 …public void dividedBy(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNano… in dividedBy() argument
2356 t = t.dividedBy(divisor); in dividedBy()
2362 …public void dividedByZero(long seconds, int nanos, int divisor, long expectedSeconds, int expected… in dividedByZero() argument
/libcore/ojluni/src/main/java/java/text/
DSimpleDateFormat.java2699 final double divisor = Math.pow(10, width); in subParse() local
2700 value = (int) ((doubleValue / divisor) * 1000); in subParse()