JDK-4736393 : Please promote BigInteger.bitCnt to Integer or Math and make it public
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.4.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2002-08-23
  • Updated: 2002-08-23
  • Resolved: 2002-08-23
Related Reports
Duplicate :  
Description
Counting the number of on bits in an integer is a very common thing to want to
do, and even exists in BigInteger, but it is package private. Sure would be
nice if this was public and moved to Integer, or perhaps Math.

Comments
EVALUATION Yes, that pop count operation would be convenient; Tiger bug 4495754 covers that feature, among others. In the meantime, see Hank Warren's recently published "Hacker's Delight" for crafty codes to make such low-level operations run fast. Closing as a dup. ###@###.### 2002-08-23
23-08-2002