Hacker News new | past | comments | ask | show | jobs | submit login

> I know the bitwise trick

Only if you make certain assumptions about how the integer is represented, I reckon.




Indeed, a ones-complement negative number would not have this bit property.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: