provide bit-count method for int/long

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: core-libs
    • x86
    • windows_2000



      Name: rmT116609 Date: 12/12/2003


      A DESCRIPTION OF THE REQUEST :
      There is a nice bit-count method in BigInteger.bitCnt(). It seems to be influenced by 'Hackers delight'. An average programmer would just code a simple loop for this. The classes (Short?), Integer, Long (maybe Math) should be extended to provide a public static method like bitCnt.


      JUSTIFICATION :
      Make nifty, rare known algorithms available for general use - it's already there - but package-local in BigInteger. The current implementation calls for (avoidable) cut-and-paste - if someone finds it...
      (Incident Review ID: 230602)
      ======================================================================

            Assignee:
            Unassigned
            Reporter:
            Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: