8078136: Incorrect figure number in reference to Hacker's Delight book in Long.bitCount() method
Reviewed-by: lancea
This commit is contained in:
parent
f79ca89ac7
commit
9fe30fb118
@ -1708,7 +1708,7 @@ public final class Long extends Number implements Comparable<Long> {
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int bitCount(long i) {
|
||||
// HD, Figure 5-14
|
||||
// HD, Figure 5-2
|
||||
i = i - ((i >>> 1) & 0x5555555555555555L);
|
||||
i = (i & 0x3333333333333333L) + ((i >>> 2) & 0x3333333333333333L);
|
||||
i = (i + (i >>> 4)) & 0x0f0f0f0f0f0f0f0fL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user