- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for LongMath (0.1 sec)
-
guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.pow(positive[j], exponents[j]); } return tmp; } @Benchmark int mod(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.mod(longs[j], positive[j]); } return tmp; } @Benchmark int gCD(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.pow(positive[j], exponents[j]); } return tmp; } @Benchmark int mod(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.mod(longs[j], positive[j]); } return tmp; } @Benchmark int gCD(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java
return IntMath.gcd(a, b); } @Override public long gcdLong(long a, long b) { return LongMath.gcd(a, b); } @Override public long binomialCoefficient(int n, int k) { return LongMath.binomial(n, k); } @Override public boolean noAddOverflow(int a, int b) { try {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 6.9K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/LongMathRoundingBenchmark.java
int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.log2(positive[j], mode); } return tmp; } @Benchmark int log10(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.log10(positive[j], mode); } return tmp; } @Benchmark int sqrt(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
private static BigInteger oldSlowFactorial(int n) { if (n <= 20) { return BigInteger.valueOf(LongMath.factorial(n)); } else { int k = 20; return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n)); } } /** Returns the product of {@code n1} exclusive through {@code n2} inclusive. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 19 16:21:24 UTC 2024 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/QuantilesAlgorithm.java
return builder.buildOrThrow(); } 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 {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 01 16:30:37 UTC 2022 - 7.1K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
private static BigInteger oldSlowFactorial(int n) { if (n <= 20) { return BigInteger.valueOf(LongMath.factorial(n)); } else { int k = 20; return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n)); } } /** Returns the product of {@code n1} exclusive through {@code n2} inclusive. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 19 16:21:24 UTC 2024 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
static final int ARRAY_SIZE = 0x10000; static final int ARRAY_MASK = 0x0ffff; 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,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/LessThanBenchmark.java
int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & SAMPLE_MASK; long x = xLongs[j]; long y = yLongs[j]; int z = constant[j]; tmp += z + LongMath.lessThanBranchFree(x, y); } return tmp; } @Benchmark int ternaryLtLongAddOutsideTernary(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & SAMPLE_MASK;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/MathBenchmarking.java
static final int ARRAY_SIZE = 0x10000; static final int ARRAY_MASK = 0x0ffff; 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,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0)