Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
btilly
on July 26, 2011
|
parent
|
context
|
favorite
| on:
Ten Ways to Check if an Integer Is a Power Of Two ...
Most of the solutions explicitly assume 32 bit integers. These days most of us have 64 bit integers available.
lambda_cube
on July 26, 2011
[–]
Yes, but the two best solutions don't. The other solutions are mostly for educational purposes, I guess. One of #9 or #10 is the one that should be in some utility library.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: