- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for numberOfTrailingZeros (0.34 sec)
-
android/guava/src/com/google/common/math/LongMath.java
* >60% faster than the Euclidean algorithm in benchmarks. */ int aTwos = Long.numberOfTrailingZeros(a); a >>= aTwos; // divide out all 2s int bTwos = Long.numberOfTrailingZeros(b); b >>= bTwos; // divide out all 2s while (a != b) { // both a, b are odd // The key to the binary GCD algorithm is as follows:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
int startingNumber = LongMath.factorials.length; long product = LongMath.factorials[startingNumber - 1]; // Strip off 2s from this value. int shift = Long.numberOfTrailingZeros(product); product >>= shift; // Use floor(log2(num)) + 1 to prevent overflow of multiplication. int productBits = LongMath.log2(product, FLOOR) + 1;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 18.8K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* >60% faster than the Euclidean algorithm in benchmarks. */ int aTwos = Long.numberOfTrailingZeros(a); a >>= aTwos; // divide out all 2s int bTwos = Long.numberOfTrailingZeros(b); b >>= bTwos; // divide out all 2s while (a != b) { // both a, b are odd // The key to the binary GCD algorithm is as follows:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedLongs.java
} else { char[] buf = new char[64]; int i = buf.length; if ((radix & (radix - 1)) == 0) { // Radix is a power of two so we can avoid division. int shift = Integer.numberOfTrailingZeros(radix); int mask = radix - 1; do { buf[--i] = Character.forDigit(((int) x) & mask, radix); x >>>= shift; } while (x != 0); } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 12 21:04:48 UTC 2024 - 17.6K bytes - Viewed (0) -
guava/src/com/google/common/io/BaseEncoding.java
// The logic here would be wrong for bitsPerChar > 8, but since we require distinct ASCII // characters that can't happen. int zeroesInBitsPerChar = Integer.numberOfTrailingZeros(bitsPerChar); this.charsPerChunk = 1 << (3 - zeroesInBitsPerChar); this.bytesPerChunk = bitsPerChar >> zeroesInBitsPerChar; this.mask = chars.length - 1; this.decodabet = decodabet;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 41.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
@Override public boolean hasNext() { return remainingSetBits != 0; } @Override public E next() { int index = Integer.numberOfTrailingZeros(remainingSetBits); if (index == 32) { throw new NoSuchElementException(); } remainingSetBits &= ~(1 << index); return elements.get(index); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 78.8K bytes - Viewed (0)