Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is an amazing explanation, and immediately makes the formula `(val<<1) ^ (val>>31)` intuitive, compared to trying to interpret it as mapping x -> 2|x| - 1.


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

Search: