- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 63 for divider (0.17 sec)
-
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
result *= i; } return BigInteger.valueOf(result); } /* * We want each multiplication to have both sides with approximately the same number of digits. * Currently, we just divide the range in half. */ int mid = (n1 + n2) >>> 1; return oldSlowFactorial(n1, mid).multiply(oldSlowFactorial(mid, n2)); } @Benchmark int slowFactorial(int reps) { int tmp = 0;
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.3K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
a >>= aTwos; // divide out all 2s int bTwos = Long.numberOfTrailingZeros(b); b >>= bTwos; // divide out all 2s while (a != b) { // both a, b are odd // The key to the binary GCD algorithm is as follows: // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b). // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 44.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Fri Feb 09 15:36:17 GMT 2024 - 13.2K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedInteger.java
* * @throws ArithmeticException if {@code val} is zero * @since 14.0 */ public UnsignedInteger dividedBy(UnsignedInteger val) { return fromIntBits(UnsignedInts.divide(value, checkNotNull(val).value)); } /** * Returns this mod {@code val}. * * @throws ArithmeticException if {@code val} is zero * @since 14.0 */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 23 18:45:50 GMT 2023 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/TableCollectionTest.java
table.put('a', "two", 2); table.put('a', "three", 3); table.put('b', "four", 4); return table.row('a'); } } static final Function<@Nullable Integer, @Nullable Integer> DIVIDE_BY_2 = new Function<@Nullable Integer, @Nullable Integer>() { @Override public @Nullable Integer apply(@Nullable Integer input) { return (input == null) ? null : input / 2; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 35.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/TablesTransformValuesRowTest.java
} @Override protected Map<String, Integer> makePopulatedMap() { Table<Character, String, Integer> table = HashBasedTable.create(); table.put('a', "one", 2); table.put('a', "two", 4); table.put('a', "three", 6); table.put('b', "four", 8); return Tables.transformValues(table, TableCollectionTest.DIVIDE_BY_2).row('a'); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedLongs.java
* * @param dividend the dividend (numerator) * @param divisor the divisor (denominator) * @throws ArithmeticException if divisor is 0 * @since 11.0 */ public static long remainder(long dividend, long divisor) { if (divisor < 0) { // i.e., divisor >= 2^63: if (compare(dividend, divisor) < 0) { return dividend; // dividend < divisor } else {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 17.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { BigInteger expected = new BigDecimal(p).divide(new BigDecimal(q), 0, mode).toBigIntegerExact(); assertEquals(expected, BigIntegerMath.divide(p, q, mode)); } } } } private static final BigInteger BAD_FOR_ANDROID_P = new BigInteger("-9223372036854775808");
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { BigInteger expected = new BigDecimal(p).divide(new BigDecimal(q), 0, mode).toBigIntegerExact(); assertEquals(expected, BigIntegerMath.divide(p, q, mode)); } } } } private static final BigInteger BAD_FOR_ANDROID_P = new BigInteger("-9223372036854775808");
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/QuantilesAlgorithm.java
} private double singleQuantileFromSorted(int index, int scale, double[] dataset) { long numerator = (long) index * (dataset.length - 1); int positionFloor = (int) LongMath.divide(numerator, scale, RoundingMode.DOWN); int remainder = (int) (numerator - positionFloor * scale); if (remainder == 0) { return dataset[positionFloor]; } else {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 01 16:30:37 GMT 2022 - 7.1K bytes - Viewed (0)