Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for biggestBinomials (0.1 sec)

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

      }
    
      public void testConstantsBiggestBinomials() {
        for (int k = 0; k < IntMath.biggestBinomials.length; k++) {
          assertTrue(fitsInInt(BigIntegerMath.binomial(IntMath.biggestBinomials[k], k)));
          assertTrue(
              IntMath.biggestBinomials[k] == Integer.MAX_VALUE
                  || !fitsInInt(BigIntegerMath.binomial(IntMath.biggestBinomials[k] + 1, k)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/LongMathTest.java

      public void testConstantsBiggestBinomials() {
        for (int k = 0; k < LongMath.biggestBinomials.length; k++) {
          assertTrue(fitsInLong(BigIntegerMath.binomial(LongMath.biggestBinomials[k], k)));
          assertTrue(
              LongMath.biggestBinomials[k] == Integer.MAX_VALUE
                  || !fitsInLong(BigIntegerMath.binomial(LongMath.biggestBinomials[k] + 1, k)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/IntMathTest.java

      }
    
      public void testConstantsBiggestBinomials() {
        for (int k = 0; k < IntMath.biggestBinomials.length; k++) {
          assertTrue(fitsInInt(BigIntegerMath.binomial(IntMath.biggestBinomials[k], k)));
          assertTrue(
              IntMath.biggestBinomials[k] == Integer.MAX_VALUE
                  || !fitsInInt(BigIntegerMath.binomial(IntMath.biggestBinomials[k] + 1, k)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/LongMath.java

        // so denominator must be a divisor of numerator.
        return x * (numerator / denominator);
      }
    
      /*
       * binomial(biggestBinomials[k], k) fits in a long, but not binomial(biggestBinomials[k] + 1, k).
       */
      static final int[] biggestBinomials = {
        Integer.MAX_VALUE,
        Integer.MAX_VALUE,
        Integer.MAX_VALUE,
        3810779,
        121977,
        16175,
        4337,
        1733,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/math/BigIntegerMath.java

        checkNonNegative("n", n);
        checkNonNegative("k", k);
        checkArgument(k <= n, "k (%s) > n (%s)", k, n);
        if (k > (n >> 1)) {
          k = n - k;
        }
        if (k < LongMath.biggestBinomials.length && n <= LongMath.biggestBinomials[k]) {
          return BigInteger.valueOf(LongMath.binomial(n, k));
        }
    
        BigInteger accum = BigInteger.ONE;
    
        long numeratorAccum = n;
        long denominatorAccum = 1;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/LongMath.java

        // so denominator must be a divisor of numerator.
        return x * (numerator / denominator);
      }
    
      /*
       * binomial(biggestBinomials[k], k) fits in a long, but not binomial(biggestBinomials[k] + 1, k).
       */
      static final int[] biggestBinomials = {
        Integer.MAX_VALUE,
        Integer.MAX_VALUE,
        Integer.MAX_VALUE,
        3810779,
        121977,
        16175,
        4337,
        1733,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top