Home
last modified time | relevance | path

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

/libcore/ojluni/src/main/java/java/math/
DBigDecimal.java1559 public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode) { in divide() argument
1563 if ((divisor.intCompact != INFLATED)) { in divide()
1564 …return divide(this.intCompact, this.scale, divisor.intCompact, divisor.scale, scale, roundingMode); in divide()
1566 … return divide(this.intCompact, this.scale, divisor.intVal, divisor.scale, scale, roundingMode); in divide()
1569 if ((divisor.intCompact != INFLATED)) { in divide()
1570 … return divide(this.intVal, this.scale, divisor.intCompact, divisor.scale, scale, roundingMode); in divide()
1572 … return divide(this.intVal, this.scale, divisor.intVal, divisor.scale, scale, roundingMode); in divide()
1593 public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode) { in divide() argument
1594 return divide(divisor, scale, roundingMode.oldMode); in divide()
1624 public BigDecimal divide(BigDecimal divisor, int roundingMode) { in divide() argument
[all …]
DMutableBigInteger.java1085 int divideOneWord(int divisor, MutableBigInteger quotient) { in divideOneWord() argument
1086 long divisorLong = divisor & LONG_MASK; in divideOneWord()
1105 int shift = Integer.numberOfLeadingZeros(divisor); in divideOneWord()
1125 long tmp = divWord(dividendEstimate, divisor); in divideOneWord()
1136 return rem % divisor; in divideOneWord()
1484 int[] divisor; in divideMagnitude() local
1487 divisor = new int[dlen]; in divideMagnitude()
1488 copyAndShift(div.value,div.offset,dlen,divisor,0,shift); in divideMagnitude()
1511 divisor = Arrays.copyOfRange(div.value, div.offset, div.offset + div.intLen); in divideMagnitude()
1537 int dh = divisor[0]; in divideMagnitude()
[all …]
/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/java/java/time/
DDuration.java971 public Duration dividedBy(long divisor) { in dividedBy() argument
972 if (divisor == 0) { in dividedBy()
975 if (divisor == 1) { in dividedBy()
978 return create(toBigDecimalSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN)); in dividedBy()
992 public long dividedBy(Duration divisor) { in dividedBy() argument
993 Objects.requireNonNull(divisor, "divisor"); in dividedBy()
995 BigDecimal divisorBigD = divisor.toBigDecimalSeconds(); in dividedBy()
/libcore/luni/src/main/java/libcore/math/
DNativeBN.java39 public static native void BN_div(long dv, long rem, long num, long divisor); in BN_div() argument
/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/luni/src/main/native/
Dlibcore_math_NativeBN.cpp151 static void NativeBN_BN_div(JNIEnv* env, jclass, jlong q, jlong rem, jlong num, jlong divisor) { in NativeBN_BN_div() argument
154 if (!ctxp || !BN_div(toBigNum(q), toBigNum(rem), toBigNum(num), toBigNum(divisor), ctxp)) { in NativeBN_BN_div()
/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.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
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
/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.java2483 …public void dividedBy(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNano… in dividedBy() argument
2485 t = t.dividedBy(divisor); in dividedBy()
2491 …public void dividedByZero(long seconds, int nanos, int divisor, long expectedSeconds, int expected… in dividedByZero() argument
2539 public void test_dividedByDur(Duration dividend, Duration divisor, long expected) { in test_dividedByDur() argument
2540 assertEquals(dividend.dividedBy(divisor), expected); in test_dividedByDur()
/libcore/ojluni/src/main/java/java/text/
DSimpleDateFormat.java2640 final double divisor = Math.pow(10, width); in subParse() local
2641 value = (int) ((doubleValue / divisor) * 1000); in subParse()