Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 61 for divider (0.15 sec)

  1. guava-tests/test/com/google/common/math/StatsTesting.java

          BigInteger.valueOf(Integer.MAX_VALUE)
              .multiply(BigInteger.valueOf(3L))
              .divide(BigInteger.valueOf(4L))
              .doubleValue();
      static final double LARGE_INTEGER_VALUES_POPULATION_VARIANCE =
          BigInteger.valueOf(Integer.MAX_VALUE)
              .multiply(BigInteger.valueOf(Integer.MAX_VALUE))
              .divide(BigInteger.valueOf(16L))
              .doubleValue();
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 23.8K bytes
    - Viewed (0)
  2. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/AbstractStreamingHasher.java

        int bytesToCopy = bufferSize - buffer.position();
        for (int i = 0; i < bytesToCopy; i++) {
          buffer.put(readBuffer.get());
        }
        munch(); // buffer becomes empty here, since chunkSize divides bufferSize
    
        // Now process directly from the rest of the input buffer
        while (readBuffer.remaining() >= chunkSize) {
          process(readBuffer);
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/BaseEncoding.java

    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.math.IntMath.divide;
    import static com.google.common.math.IntMath.log2;
    import static java.math.RoundingMode.CEILING;
    import static java.math.RoundingMode.FLOOR;
    import static java.math.RoundingMode.UNNECESSARY;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Mar 15 16:33:32 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/UnsignedIntegerTest.java

            if (b != 0) {
              UnsignedInteger aUnsigned = UnsignedInteger.fromIntBits(a);
              UnsignedInteger bUnsigned = UnsignedInteger.fromIntBits(b);
              int expected = aUnsigned.bigIntegerValue().divide(bUnsigned.bigIntegerValue()).intValue();
              UnsignedInteger unsignedDiv = aUnsigned.dividedBy(bUnsigned);
              assertThat(unsignedDiv.intValue()).isEqualTo(expected);
            }
          }
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        for (int i = 0; i < 1000000; i++) {
          long dividend = r.nextLong();
          long divisor = r.nextLong();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedLongs.divide(dividend, divisor)
                          + UnsignedLongs.remainder(dividend, divisor)))
              .isEqualTo(0);
        }
      }
    
    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)
  7. android/guava/src/com/google/common/collect/Lists.java

          int start = index * size;
          int end = Math.min(start + size, list.size());
          return list.subList(start, end);
        }
    
        @Override
        public int size() {
          return IntMath.divide(list.size(), size, RoundingMode.CEILING);
        }
    
        @Override
        public boolean isEmpty() {
          return list.isEmpty();
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 16:48:36 GMT 2024
    - 41.5K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += IntMath.sqrt(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int divide(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.divide(ints[j], nonzero[j], mode);
        }
        return tmp;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/math/LongMathRoundingBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += LongMath.sqrt(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int divide(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += LongMath.divide(longs[j], nonzero[j], mode);
        }
        return tmp;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/BigDecimalMathTest.java

        new RoundToDoubleTester(BigDecimal.ZERO).setExpectation(0.0, values()).test();
      }
    
      public void testRoundToDouble_oneThird() {
        new RoundToDoubleTester(
                BigDecimal.ONE.divide(BigDecimal.valueOf(3), new MathContext(50, HALF_EVEN)))
            .roundUnnecessaryShouldThrow()
            .setExpectation(0.33333333333333337, UP, CEILING)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10.6K bytes
    - Viewed (0)
Back to top