Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
caf
on May 31, 2018
|
parent
|
context
|
favorite
| on:
Signed Integers Are Two’s Complement
((x & (INT_MAX / 2)) * 2) / 2 ?
cornholio
on May 31, 2018
[–]
My version works up to x = INT_MAX and your version still fails for negative ints, so I don't see the benefit of restricting the range. Getting closer :)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: