Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
NonEUCitizen
on June 8, 2013
|
parent
|
context
|
favorite
| on:
20 bit operations programmers should know
#14 (calculating 2^n), is usually implemented as:
return 1 << n;
in which case it would also work for n == 0. The method shown in the article has a comment requiring n > 0.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: