Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for accum (0.1 sec)

  1. guava-testlib/src/com/google/common/testing/CollectorTester.java

              A result(Collector<T, A, R> collector, Iterable<T> inputs) {
            A accum = collector.supplier().get();
            for (T input : inputs) {
              A newAccum = collector.supplier().get();
              collector.accumulator().accept(newAccum, input);
              accum = collector.combiner().apply(accum, newAccum);
            }
            return accum;
          }
        },
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/CollectCollectors.java

                    }),
            (accum, t) -> {
              /*
               * We assign these to variables before calling checkNotNull to work around a bug in our
               * nullness checker.
               */
              K key = keyFunction.apply(t);
              V newValue = valueFunction.apply(t);
              accum.put(
                  checkNotNull(key, "Null key for input %s", t),
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. misc/cgo/gmp/pi.go

    	}
    	return tmp1.Int64()
    }
    
    func nextTerm(k int64) {
    	y2 := k*2 + 1
    	accum.Add(accum, tmp1.Lsh(numer, 1))
    	accum.Mul(accum, tmp1.SetInt64(y2))
    	numer.Mul(numer, tmp1.SetInt64(k))
    	denom.Mul(denom, tmp1.SetInt64(y2))
    }
    
    func eliminateDigit(d int64) {
    	accum.Sub(accum, tmp1.Mul(denom, tmp1.SetInt64(d)))
    	accum.Mul(accum, ten)
    	numer.Mul(numer, ten)
    }
    
    func main() {
    	i := 0
    	k := int64(0)
    	for {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Apr 10 22:32:35 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/LongMath.java

            default:
              throw new AssertionError();
          }
        }
        long accum = 1;
        while (true) {
          switch (k) {
            case 0:
              return accum;
            case 1:
              return checkedMultiply(accum, b);
            default:
              if ((k & 1) != 0) {
                accum = checkedMultiply(accum, b);
              }
              k >>= 1;
              if (k > 0) {
                checkNoOverflow(
    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

          if (numeratorBits + bits >= Long.SIZE - 1) {
            // The numerator is as big as it can get without risking overflow.
            // Multiply numeratorAccum / denominatorAccum into accum.
            accum =
                accum
                    .multiply(BigInteger.valueOf(numeratorAccum))
                    .divide(BigInteger.valueOf(denominatorAccum));
            numeratorAccum = p;
            denominatorAccum = q;
    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

            default:
              throw new AssertionError();
          }
        }
        long accum = 1;
        while (true) {
          switch (k) {
            case 0:
              return accum;
            case 1:
              return checkedMultiply(accum, b);
            default:
              if ((k & 1) != 0) {
                accum = checkedMultiply(accum, b);
              }
              k >>= 1;
              if (k > 0) {
                checkNoOverflow(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/Longs.java

        if (digit < 0 || digit >= radix) {
          return null;
        }
        long accum = -digit;
    
        long cap = Long.MIN_VALUE / radix;
    
        while (index < string.length()) {
          digit = AsciiDigits.digit(string.charAt(index++));
          if (digit < 0 || digit >= radix || accum < cap) {
            return null;
          }
          accum *= radix;
          if (accum < Long.MIN_VALUE + digit) {
            return null;
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/primitives/Longs.java

        if (digit < 0 || digit >= radix) {
          return null;
        }
        long accum = -digit;
    
        long cap = Long.MIN_VALUE / radix;
    
        while (index < string.length()) {
          digit = AsciiDigits.digit(string.charAt(index++));
          if (digit < 0 || digit >= radix || accum < cap) {
            return null;
          }
          accum *= radix;
          if (accum < Long.MIN_VALUE + digit) {
            return null;
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:52:18 UTC 2024
    - 29K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/LongMathTest.java

      @GwtIncompatible // TODO
      private long simpleBinomial(int n, int k) {
        long accum = 1;
        for (int i = 0; i < k; i++) {
          accum = LongMath.checkedMultiply(accum, n - i);
          accum /= i + 1;
        }
        return accum;
      }
    
      @GwtIncompatible // java.math.BigInteger
      public void testIsPowerOfTwo() {
        for (long x : ALL_LONG_CANDIDATES) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
Back to top