Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1035862 // popCount - get number of bits set in int or long

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (37L/1K).

static int popCount(int i) {
  ret Int.bitCount(i);
}

static int popCount(long l) {
  ret Long.bitCount(l);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035862
Snippet name: popCount - get number of bits set in int or long
Eternal ID of this version: #1035862/4
Text MD5: 1290fda04889f2de491260ca808d8807
Transpilation MD5: 5632665f4574c2c891ba11220e127ca7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-03 01:32:34
Source code size: 116 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 133 / 188
Version history: 3 change(s)
Referenced in: [show references]