HN2new | past | comments | ask | show | jobs | submitlogin

Multiplying by the integer reciprocal only works if the dividend is an integer multiple of the divisor.

What's being explained in the article is multiplying by a fraction the value of which is close to the rational reciprocal of the divisor, and where the denominator of the fraction is an integer power of two (so dividing by the denominator can be done with a shift).

The fraction in this case is (2938661835 + 2^32) / 2^37.



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

Search: