/external/guava/guava-tests/test/com/google/common/math/ |
D | LongMathTest.java | 53 LongMath.MAX_POWER_OF_SQRT2_UNSIGNED); in testConstantMaxPowerOfSqrt2Unsigned() 61 LongMath.maxLog10ForLeadingZeros[i]); in testMaxLog10ForLeadingZeros() 67 for (int i = 0; i < LongMath.powersOf10.length; i++) { in testConstantsPowersOf10() 68 assertEquals(LongMath.checkedPow(10, i), LongMath.powersOf10[i]); in testConstantsPowersOf10() 71 LongMath.checkedPow(10, LongMath.powersOf10.length); in testConstantsPowersOf10() 78 for (int i = 0; i < LongMath.halfPowersOf10.length; i++) { in testConstantsHalfPowersOf10() 80 BigInteger.valueOf(LongMath.halfPowersOf10[i])); in testConstantsHalfPowersOf10() 83 BigIntegerMath.sqrt(BigInteger.TEN.pow(2 * LongMath.halfPowersOf10.length + 1), FLOOR); in testConstantsHalfPowersOf10() 89 assertEquals(LongMath.sqrt(Long.MAX_VALUE, FLOOR), LongMath.FLOOR_SQRT_MAX_LONG); in testConstantsSqrtMaxLong() 95 for (int i = 0; i < LongMath.factorials.length; i++, expected *= i) { in testConstantsFactorials() [all …]
|
D | IntMathTest.java | 102 if (LongMath.fitsInInt((long) x - y)) { in testLessThanBranchFree()
|
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/ |
D | LongMathTest.java | 50 int actual = LongMath.lessThanBranchFree(x, y); in testLessThanBranchFree() 62 LongMath.log2(0L, mode); in testLog2ZeroAlwaysThrows() 72 LongMath.log2(x, mode); in testLog2NegativeAlwaysThrows() 84 assertEquals(BigIntegerMath.log2(valueOf(x), mode), LongMath.log2(x, mode)); in testLog2MatchesBigInteger() 93 boolean isPowerOf2 = LongMath.isPowerOfTwo(x); in testLog2Exact() 95 assertEquals(x, 1L << LongMath.log2(x, UNNECESSARY)); in testLog2Exact() 114 assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(LongMath.gcd(a, b))); in testGCDExhaustive() 127 assertEquals(expectedLong, LongMath.binomial(n, k)); in testBinomial() 135 LongMath.binomial(n, -1); in testBinomialOutside() 139 LongMath.binomial(n, n + 1); in testBinomialOutside() [all …]
|
D | IntMathTest.java | 49 if (LongMath.fitsInInt((long) x - y)) { in testLessThanBranchFree()
|
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/ |
D | BigIntegerMath.java | 137 if (n < LongMath.factorials.length) { in factorial() 138 return BigInteger.valueOf(LongMath.factorials[n]); in factorial() 146 int startingNumber = LongMath.factorials.length; in factorial() 147 long product = LongMath.factorials[startingNumber - 1]; in factorial() 153 int productBits = LongMath.log2(product, FLOOR) + 1; in factorial() 154 int bits = LongMath.log2(startingNumber, FLOOR) + 1; in factorial() 178 productBits = LongMath.log2(product, FLOOR) + 1; in factorial() 224 if (k < LongMath.biggestBinomials.length && n <= LongMath.biggestBinomials[k]) { in binomial() 225 return BigInteger.valueOf(LongMath.binomial(n, k)); in binomial() 233 int bits = LongMath.log2(n, RoundingMode.CEILING); in binomial()
|
D | LongMath.java | 47 public final class LongMath { class 229 int nBits = LongMath.log2(n, RoundingMode.CEILING); in binomial() 315 private LongMath() {} in LongMath() method in LongMath
|
/external/guava/guava/src/com/google/common/math/ |
D | BigIntegerMath.java | 132 return LongMath.log10(x.longValue(), mode); in log10() 210 return BigInteger.valueOf(LongMath.sqrt(x.longValue(), mode)); in sqrt() 320 if (n < LongMath.factorials.length) { in factorial() 321 return BigInteger.valueOf(LongMath.factorials[n]); in factorial() 329 int startingNumber = LongMath.factorials.length; in factorial() 330 long product = LongMath.factorials[startingNumber - 1]; in factorial() 336 int productBits = LongMath.log2(product, FLOOR) + 1; in factorial() 337 int bits = LongMath.log2(startingNumber, FLOOR) + 1; in factorial() 361 productBits = LongMath.log2(product, FLOOR) + 1; in factorial() 407 if (k < LongMath.biggestBinomials.length && n <= LongMath.biggestBinomials[k]) { in binomial() [all …]
|
D | LongMath.java | 52 public final class LongMath { class 674 int nBits = LongMath.log2(n, RoundingMode.CEILING); 760 private LongMath() {}
|
D | DoubleMath.java | 198 return x > 0.0 && isFinite(x) && LongMath.isPowerOfTwo(getSignificand(x)); in isPowerOfTwo()
|
/external/guava/guava-tests/benchmark/com/google/common/math/ |
D | LongMathBenchmark.java | 28 import com.google.common.math.LongMath; 62 tmp += LongMath.pow(positive[j], exponents[j]); in pow() 71 tmp += LongMath.mod(longs[j], positive[j]); in mod() 80 tmp += LongMath.mod(nonnegative[j], positive[j]); in gCD() 89 tmp += LongMath.factorial(factorialArguments[j]); in factorial() 98 tmp += LongMath.binomial(binomialArguments[j][0], binomialArguments[j][1]); in binomial()
|
D | LongMathRoundingBenchmark.java | 28 import com.google.common.math.LongMath; 58 tmp += LongMath.log2(positive[j], mode); in log2() 67 tmp += LongMath.log10(positive[j], mode); in log10() 76 tmp += LongMath.sqrt(positive[j], mode); in sqrt() 85 tmp += LongMath.divide(longs[j], nonzero[j], mode); in divide()
|
D | ApacheBenchmark.java | 30 import com.google.common.math.LongMath; 54 return LongMath.gcd(a, b); in gcdLong() 59 return LongMath.binomial(n, k); in binomialCoefficient() 75 LongMath.checkedAdd(a, b); in noAddOverflow() 95 LongMath.checkedMultiply(a, b); in noMulOverflow()
|
D | BigIntegerMathBenchmark.java | 29 import com.google.common.math.LongMath; 60 return BigInteger.valueOf(LongMath.factorial(n)); in oldSlowFactorial() 63 return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n)); in oldSlowFactorial()
|
D | LessThanBenchmark.java | 131 tmp += z + LongMath.lessThanBranchFree(x, y); in branchFreeLtLong()
|
/external/caliper/caliper/src/main/java/com/google/caliper/runner/ |
D | NanoTimeGranularityTester.java | 24 import com.google.common.math.LongMath; 56 return ShortDuration.of(LongMath.divide(total, TRIALS * 8, CEILING), NANOSECONDS); in testNanoTimeGranularity()
|
/external/guava/guava/src/com/google/common/hash/ |
D | BloomFilterStrategies.java | 19 import com.google.common.math.LongMath; 145 this(new long[Ints.checkedCast(LongMath.divide(bits, 64, RoundingMode.CEILING))]); in BitArray()
|
/external/guava/guava-tests/test/com/google/common/hash/ |
D | BloomFilterTest.java | 23 import com.google.common.math.LongMath; 304 int arraySize = Ints.checkedCast(LongMath.divide(numBits, 64, RoundingMode.CEILING)); in testBitSize()
|
/external/guava/guava/src/com/google/common/collect/ |
D | Collections2.java | 25 import static com.google.common.math.LongMath.binomial;
|