{"action":"created","issue":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1452","labels_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1452/labels{/name}","comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1452/comments","events_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1452/events","html_url":"https://github.com/D-Programming-Language/druntime/pull/1452","id":124052366,"number":1452,"title":"Add bsf(ulong), bsr(ulong), and popcnt(ulong).","user":{"login":"tsbockman","id":1332026,"avatar_url":"https://avatars.githubusercontent.com/u/1332026?v=3","gravatar_id":"","url":"https://api.github.com/users/tsbockman","html_url":"https://github.com/tsbockman","followers_url":"https://api.github.com/users/tsbockman/followers","following_url":"https://api.github.com/users/tsbockman/following{/other_user}","gists_url":"https://api.github.com/users/tsbockman/gists{/gist_id}","starred_url":"https://api.github.com/users/tsbockman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsbockman/subscriptions","organizations_url":"https://api.github.com/users/tsbockman/orgs","repos_url":"https://api.github.com/users/tsbockman/repos","events_url":"https://api.github.com/users/tsbockman/events{/privacy}","received_events_url":"https://api.github.com/users/tsbockman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-12-28T11:07:44Z","updated_at":"2016-01-12T13:37:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1452","html_url":"https://github.com/D-Programming-Language/druntime/pull/1452","diff_url":"https://github.com/D-Programming-Language/druntime/pull/1452.diff","patch_url":"https://github.com/D-Programming-Language/druntime/pull/1452.patch"},"body":"This PR adds `ulong` versions of `bsf()`, `bsr()`, and `popcnt()`. (It also fixes a small error in the `_popcnt()` docs.)\r\n\r\nI use these `core.bitop` functions fairly often, and am always annoyed that the maximum bit-ness of the input depends on what architecture I'm compiling for; it makes using these ops from generic code painful.\r\n\r\nThere is no good reason for this, as even on 32-bit systems the 64-bit op can be trivially implemented in terms of a couple of calls to the 32-bit op.\r\n\r\n**EDIT:** I have created a [companion PR for Phobos](https://github.com/D-Programming-Language/phobos/pull/3888). While working on it, I discovered two different private implementations of `bsr()` for `ulong`, one of which is bugged."},"comment":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/comments/170913780","html_url":"https://github.com/D-Programming-Language/druntime/pull/1452#issuecomment-170913780","issue_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1452","id":170913780,"user":{"login":"andralex","id":566679,"avatar_url":"https://avatars.githubusercontent.com/u/566679?v=3","gravatar_id":"","url":"https://api.github.com/users/andralex","html_url":"https://github.com/andralex","followers_url":"https://api.github.com/users/andralex/followers","following_url":"https://api.github.com/users/andralex/following{/other_user}","gists_url":"https://api.github.com/users/andralex/gists{/gist_id}","starred_url":"https://api.github.com/users/andralex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andralex/subscriptions","organizations_url":"https://api.github.com/users/andralex/orgs","repos_url":"https://api.github.com/users/andralex/repos","events_url":"https://api.github.com/users/andralex/events{/privacy}","received_events_url":"https://api.github.com/users/andralex/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T13:37:52Z","updated_at":"2016-01-12T13:37:52Z","body":"OK. Shall we return `uint` when there's no possibility of a negative?"}}