- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 61 for divider (0.15 sec)
-
guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java
Random r = new Random(0L); for (int i = 0; i < 1000000; i++) { int dividend = r.nextInt(); int divisor = r.nextInt(); // Test that the Euclidean property is preserved: assertThat( dividend - (divisor * UnsignedInts.divide(dividend, divisor) + UnsignedInts.remainder(dividend, divisor))) .isEqualTo(0); } }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 12.7K 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) -
android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Feb 09 15:36:17 GMT 2024 - 13.2K 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-tests/test/com/google/common/primitives/UnsignedIntsTest.java
Random r = new Random(0L); for (int i = 0; i < 1000000; i++) { int dividend = r.nextInt(); int divisor = r.nextInt(); // Test that the Euclidean property is preserved: assertThat( dividend - (divisor * UnsignedInts.divide(dividend, divisor) + UnsignedInts.remainder(dividend, divisor))) .isEqualTo(0); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 12.7K bytes - Viewed (1) -
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) -
android/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 May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 01 16:30:37 GMT 2022 - 7.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterables.java
*/ public static <T extends @Nullable Object> Iterable<T> concat( Iterable<? extends Iterable<? extends T>> inputs) { return FluentIterable.concat(inputs); } /** * Divides an iterable into unmodifiable sublists of the given size (the final iterable may be * smaller). For example, partitioning an iterable containing {@code [a, b, c, d, e]} with a
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 24 19:38:27 GMT 2024 - 42.8K bytes - Viewed (0)