Searched refs:divisor (Results 1 - 13 of 13) sorted by relevance

/libcore/luni/src/main/java/java/math/
H A DDivision.java50 final int divisor) {
53 long bLong = divisor & 0xffffffffL;
67 long bPos = divisor >>> 1;
72 if ((divisor & 1) != 0) {
73 // the divisor is odd
49 divideArrayByInt(int[] quotient, int[] dividend, final int dividendLength, final int divisor) argument
H A DBigDecimal.java974 * Returns a new {@code BigDecimal} whose value is {@code this / divisor}.
979 * @param divisor
985 * @return {@code this / divisor} rounded according to the given rounding
988 * if {@code divisor == null}.
992 * if {@code divisor == 0}.
997 public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode) { argument
998 return divide(divisor, scale, RoundingMode.valueOf(roundingMode));
1002 * Returns a new {@code BigDecimal} whose value is {@code this / divisor}.
1007 * @param divisor
1013 * @return {@code this / divisor} rounde
1024 divide(BigDecimal divisor, int scale, RoundingMode roundingMode) argument
1157 divide(BigDecimal divisor, int roundingMode) argument
1181 divide(BigDecimal divisor, RoundingMode roundingMode) argument
1202 divide(BigDecimal divisor) argument
1280 divide(BigDecimal divisor, MathContext mc) argument
1348 divideToIntegralValue(BigDecimal divisor) argument
1419 divideToIntegralValue(BigDecimal divisor, MathContext mc) argument
1521 remainder(BigDecimal divisor) argument
1547 remainder(BigDecimal divisor, MathContext mc) argument
1568 divideAndRemainder(BigDecimal divisor) argument
1598 divideAndRemainder(BigDecimal divisor, MathContext mc) argument
[all...]
H A DBigInteger.java878 * Returns a {@code BigInteger} whose value is greatest common divisor
882 * @param value value with which the greatest common divisor is computed.
912 * {@code this / divisor} at index 0 and {@code this % divisor} at index 1.
914 * @param divisor value by which {@code this} is divided.
915 * @throws NullPointerException if {@code divisor == null}.
916 * @throws ArithmeticException if {@code divisor == 0}.
920 public BigInteger[] divideAndRemainder(BigInteger divisor) { argument
921 BigInt divisorBigInt = divisor.getBigInt();
929 * Returns a {@code BigInteger} whose value is {@code this / divisor}
936 divide(BigInteger divisor) argument
951 remainder(BigInteger divisor) argument
[all...]
H A DBigInt.java298 static void division(BigInt dividend, BigInt divisor, BigInt quotient, BigInt remainder) { argument
312 NativeBN.BN_div(quot, rem, dividend.bignum, divisor.bignum);
/libcore/luni/src/test/java/libcore/java/lang/
H A 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);
H A 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/
H A DLong.java1289 * @param divisor the value doing the dividing
1295 public static long divideUnsigned(long dividend, long divisor) { argument
1296 if (divisor < 0L) { // signed comparison
1298 // of dividend and divisor.
1299 return (compareUnsigned(dividend, divisor)) < 0 ? 0L :1L;
1303 return dividend/divisor;
1312 divide(toUnsignedBigInteger(divisor)).longValue();
1322 * @param divisor the value doing the dividing
1328 public static long remainderUnsigned(long dividend, long divisor) { argument
1329 if (dividend > 0 && divisor >
[all...]
H A DInteger.java1321 * @param divisor the value doing the dividing
1327 public static int divideUnsigned(int dividend, int divisor) { argument
1329 return (int)(toUnsignedLong(dividend) / toUnsignedLong(divisor));
1338 * @param divisor the value doing the dividing
1344 public static int remainderUnsigned(int dividend, int divisor) { argument
1346 return (int)(toUnsignedLong(dividend) % toUnsignedLong(divisor));
/libcore/ojluni/src/main/native/
H A DMath.c94 Math_IEEEremainder(jdouble dividend, jdouble divisor) { argument
95 return remainder(dividend, divisor);
H A DStrictMath.c116 jdouble divisor)
118 return (jdouble) ieee_remainder(dividend, divisor);
114 StrictMath_IEEEremainder(JNIEnv *env, jclass unused, jdouble dividend, jdouble divisor) argument
/libcore/ojluni/src/main/java/java/time/
H A DDuration.java965 * @param divisor the value to divide the duration by, positive or negative, not zero
966 * @return a {@code Duration} based on this duration divided by the specified divisor, not null
967 * @throws ArithmeticException if the divisor is zero or if numeric overflow occurs
969 public Duration dividedBy(long divisor) { argument
970 if (divisor == 0) {
973 if (divisor == 1) {
976 return create(toSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN));
/libcore/ojluni/src/test/java/time/tck/java/time/
H A DTCKDuration.java2354 public void dividedBy(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNanos) { argument
2356 t = t.dividedBy(divisor);
2362 public void dividedByZero(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNanos) { argument
/libcore/ojluni/src/main/java/java/text/
H A DSimpleDateFormat.java2399 final double divisor = Math.pow(10, width);
2400 value = (int) ((doubleValue / divisor) * 1000);

Completed in 287 milliseconds