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

The article isn't very clear but assuming it's a 16-bit numerator and 8-bit denominator, then MSN's answer to [0] lays it out (although for higher bit sizes). If the denominator was 16-bit, then the top-rated answer (by caf) to the same SO question seems like another approach, but that wouldn't be a one line change.

[0] https://stackoverflow.com/questions/2566010/fastest-way-to-c...



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

Search: