Searched refs:BigIntegerMath (Results 1 - 5 of 5) sorted by relevance
/external/guava/guava-tests/test/com/google/common/math/ |
H A D | BigIntegerMathTest.java | 48 * Tests for BigIntegerMath. 54 assertEquals(BigIntegerMath.sqrt( 55 BigInteger.ZERO.setBit(2 * BigIntegerMath.SQRT2_PRECOMPUTE_THRESHOLD + 1), FLOOR), 56 BigIntegerMath.SQRT2_PRECOMPUTED_BITS); 63 assertEquals(expected, BigIntegerMath.isPowerOfTwo(x)); 70 BigIntegerMath.log2(ZERO, mode); 80 BigIntegerMath.log2(x.negate(), mode); 90 int result = BigIntegerMath.log2(x, mode); 100 int result = BigIntegerMath.log2(x, mode); 111 boolean isPowerOf2 = BigIntegerMath [all...] |
H A D | IntMathTest.java | 47 @GwtIncompatible("BigIntegerMath") // TODO(cpovirk): GWT-enable BigIntegerMath 50 BigIntegerMath.sqrt(BigInteger.ZERO.setBit(2 * Integer.SIZE - 1), FLOOR).intValue(), 61 @GwtIncompatible("BigIntegerMath") // TODO(cpovirk): GWT-enable BigIntegerMath 66 BigIntegerMath.sqrt(BigInteger.TEN.pow(2 * i + 1), FLOOR).longValue()); 70 @GwtIncompatible("BigIntegerMath") // TODO(cpovirk): GWT-enable BigIntegerMath 73 assertTrue(fitsInInt(BigIntegerMath.binomial(IntMath.BIGGEST_BINOMIALS[k], k))); 75 || !fitsInInt(BigIntegerMath [all...] |
H A D | LongMathTest.java | 48 assertEquals(BigIntegerMath.sqrt(BigInteger.ZERO.setBit(2 * Long.SIZE - 1), FLOOR).longValue(), 64 assertEquals(BigIntegerMath.sqrt(BigInteger.TEN.pow(2 * i + 1), FLOOR), 68 BigIntegerMath.sqrt(BigInteger.TEN.pow(2 * LongMath.HALF_POWERS_OF_10.length + 1), FLOOR); 90 assertTrue(fitsInLong(BigIntegerMath.binomial(LongMath.BIGGEST_BINOMIALS[k], k))); 92 || !fitsInLong(BigIntegerMath.binomial(LongMath.BIGGEST_BINOMIALS[k] + 1, k))); 97 assertFalse(fitsInLong(BigIntegerMath.binomial(2 * k, k))); 159 /* Relies on the correctness of BigIntegerMath.log2 for all modes except UNNECESSARY. */ 164 assertEquals(BigIntegerMath.log2(valueOf(x), mode), LongMath.log2(x, mode)); 203 // Relies on the correctness of BigIntegerMath.log10 for all modes except UNNECESSARY. 207 assertEquals(BigIntegerMath [all...] |
H A D | DoubleMathTest.java | 60 assertTrue(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL).compareTo(MAX_DOUBLE_VALUE) <= 0); 62 BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL + 1).compareTo(MAX_DOUBLE_VALUE) > 0); 68 BigIntegerMath.factorial(n).doubleValue(), DoubleMath.EVERY_SIXTEENTH_FACTORIAL[i]); 459 double actual = BigIntegerMath.factorial(i).doubleValue();
|
/external/guava/guava/src/com/google/common/math/ |
H A D | BigIntegerMath.java | 50 public final class BigIntegerMath { class 391 private BigIntegerMath() {} method in class:BigIntegerMath
|
Completed in 124 milliseconds