- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for Binomial (0.15 sec)
-
guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java
int j = i & ARRAY_MASK; tmp += IntMath.factorial(factorial[j]); } return tmp; } @Benchmark int binomial(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += IntMath.binomial(factorial[j], binomial[j]); } return tmp; } @Benchmark int isPrime(int reps) { int tmp = 0;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.2K bytes - Viewed (0) -
src/math/big/hilbert_test.go
a := newMatrix(n, n) for i := 0; i < n; i++ { for j := 0; j < n; j++ { x1 := new(Rat).SetInt64(int64(i + j + 1)) x2 := new(Rat).SetInt(new(Int).Binomial(int64(n+i), int64(n-j-1))) x3 := new(Rat).SetInt(new(Int).Binomial(int64(n+j), int64(n-i-1))) x4 := new(Rat).SetInt(new(Int).Binomial(int64(i+j), int64(i))) x1.Mul(x1, x2) x1.Mul(x1, x3) x1.Mul(x1, x4) x1.Mul(x1, x4) if (i+j)&1 != 0 { x1.Neg(x1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 08 04:08:51 UTC 2014 - 2.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
} // Depends on the correctness of BigIntegerMath.binomial. public void testBinomial() { for (int n = 0; n <= 70; n++) { for (int k = 0; k <= n; k++) { BigInteger expectedBig = BigIntegerMath.binomial(n, k); long expectedLong = fitsInLong(expectedBig) ? expectedBig.longValue() : Long.MAX_VALUE; assertEquals(expectedLong, LongMath.binomial(n, k)); } } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 04 20:15:57 UTC 2024 - 32.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/LongMathTest.java
} // Depends on the correctness of BigIntegerMath.binomial. public void testBinomial() { for (int n = 0; n <= 70; n++) { for (int k = 0; k <= n; k++) { BigInteger expectedBig = BigIntegerMath.binomial(n, k); long expectedLong = fitsInLong(expectedBig) ? expectedBig.longValue() : Long.MAX_VALUE; assertEquals(expectedLong, LongMath.binomial(n, k)); } } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 04 20:15:57 UTC 2024 - 32.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} // Depends on the correctness of BigIntegerMath.binomial. public void testBinomial() { for (int n = 0; n <= 50; n++) { for (int k = 0; k <= n; k++) { BigInteger expectedBig = BigIntegerMath.binomial(n, k); int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE; assertEquals(expectedInt, IntMath.binomial(n, k)); } } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 24.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
int j = i & ARRAY_MASK; tmp += LongMath.factorial(factorialArguments[j]); } return tmp; } @Benchmark int binomial(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.binomial(binomialArguments[j][0], binomialArguments[j][1]); } return tmp; } @Benchmark int isPrime(int reps) { int tmp = 0;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
static final Random RANDOM_SOURCE = new Random(314159265358979L); static final int MAX_EXPONENT = 100; /* * Duplicated from LongMath. * 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,
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/MathBenchmarking.java
static final Random RANDOM_SOURCE = new Random(314159265358979L); static final int MAX_EXPONENT = 100; /* * Duplicated from LongMath. * 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,
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
guava/src/com/google/common/math/IntMath.java
}; /** * Returns {@code n} choose {@code k}, also known as the binomial coefficient of {@code n} and * {@code k}, or {@link Integer#MAX_VALUE} if the result does not fit in an {@code int}. * * @throws IllegalArgumentException if {@code n < 0}, {@code k < 0} or {@code k > n} */ public static int binomial(int n, int k) { checkNonNegative("n", n); checkNonNegative("k", k);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0)