Searched refs:logFloor (Results 1 – 8 of 8) sorted by relevance
/external/guava/android/guava/src/com/google/common/math/ |
D | BigIntegerMath.java | 93 int logFloor = x.bitLength() - 1; in log2() local 99 return logFloor; in log2() 103 return isPowerOfTwo(x) ? logFloor : logFloor + 1; in log2() 108 if (logFloor < SQRT2_PRECOMPUTE_THRESHOLD) { in log2() 110 SQRT2_PRECOMPUTED_BITS.shiftRight(SQRT2_PRECOMPUTE_THRESHOLD - logFloor); in log2() 112 return logFloor; in log2() 114 return logFloor + 1; in log2() 123 return (logX2Floor < 2 * logFloor + 1) ? logFloor : logFloor + 1; in log2()
|
D | IntMath.java | 139 int logFloor = (Integer.SIZE - 1) - leadingZeros; in log2() local 140 return logFloor + lessThanBranchFree(cmp, x); in log2() 161 int logFloor = log10Floor(x); in log10() local 162 int floorPow = powersOf10[logFloor]; in log10() 169 return logFloor; in log10() 172 return logFloor + lessThanBranchFree(floorPow, x); in log10() 177 return logFloor + lessThanBranchFree(halfPowersOf10[logFloor], x); in log10()
|
D | LongMath.java | 142 int logFloor = (Long.SIZE - 1) - leadingZeros; in log2() local 143 return logFloor + lessThanBranchFree(cmp, x); in log2() 165 int logFloor = log10Floor(x); in log10() local 166 long floorPow = powersOf10[logFloor]; in log10() 173 return logFloor; in log10() 176 return logFloor + lessThanBranchFree(floorPow, x); in log10() 181 return logFloor + lessThanBranchFree(halfPowersOf10[logFloor], x); in log10()
|
/external/guava/guava/src/com/google/common/math/ |
D | BigIntegerMath.java | 93 int logFloor = x.bitLength() - 1; in log2() local 99 return logFloor; in log2() 103 return isPowerOfTwo(x) ? logFloor : logFloor + 1; in log2() 108 if (logFloor < SQRT2_PRECOMPUTE_THRESHOLD) { in log2() 110 SQRT2_PRECOMPUTED_BITS.shiftRight(SQRT2_PRECOMPUTE_THRESHOLD - logFloor); in log2() 112 return logFloor; in log2() 114 return logFloor + 1; in log2() 123 return (logX2Floor < 2 * logFloor + 1) ? logFloor : logFloor + 1; in log2()
|
D | IntMath.java | 139 int logFloor = (Integer.SIZE - 1) - leadingZeros; in log2() local 140 return logFloor + lessThanBranchFree(cmp, x); in log2() 161 int logFloor = log10Floor(x); in log10() local 162 int floorPow = powersOf10[logFloor]; in log10() 169 return logFloor; in log10() 172 return logFloor + lessThanBranchFree(floorPow, x); in log10() 177 return logFloor + lessThanBranchFree(halfPowersOf10[logFloor], x); in log10()
|
D | LongMath.java | 142 int logFloor = (Long.SIZE - 1) - leadingZeros; in log2() local 143 return logFloor + lessThanBranchFree(cmp, x); in log2() 165 int logFloor = log10Floor(x); in log10() local 166 long floorPow = powersOf10[logFloor]; in log10() 173 return logFloor; in log10() 176 return logFloor + lessThanBranchFree(floorPow, x); in log10() 181 return logFloor + lessThanBranchFree(halfPowersOf10[logFloor], x); in log10()
|
/external/guava/android/guava-tests/test/com/google/common/math/ |
D | BigIntegerMathTest.java | 264 int logFloor = BigIntegerMath.log10(x, FLOOR); in testLog10Exact() local 265 boolean expectSuccess = TEN.pow(logFloor).equals(x); in testLog10Exact() 267 assertEquals(logFloor, BigIntegerMath.log10(x, UNNECESSARY)); in testLog10Exact()
|
/external/guava/guava-tests/test/com/google/common/math/ |
D | BigIntegerMathTest.java | 264 int logFloor = BigIntegerMath.log10(x, FLOOR); in testLog10Exact() local 265 boolean expectSuccess = TEN.pow(logFloor).equals(x); in testLog10Exact() 267 assertEquals(logFloor, BigIntegerMath.log10(x, UNNECESSARY)); in testLog10Exact()
|