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

An even trickier way to do this is to rotate right by the power of two factor between doing the multiply and the compare.


That wouldn't work, because a number that is bigger than the threshold could become smaller than it after the rotation.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: