Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
darkstalker
on June 8, 2012
|
parent
|
context
|
favorite
| on:
(x / 2) or (x >> 1)?
If you're using floating point, x * 0.5 is faster
dtparr
on June 8, 2012
[–]
Given that the question indicates that bit-shifting x would result in a valid answer, I think we can rule out floating point.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: