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

Awesome. I'm always amazed by bitmagic like this. Today I saw one on stackoverflow and spent a good deal of time failing to understand it:

https://stackoverflow.com/questions/33532045/how-to-swap-fir...

And of course I'm reminded of the fast inverse square root:

https://en.wikipedia.org/wiki/Fast_inverse_square_root



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

Search: