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

You should multiply by 255.0, optionally add a dither (triangular is okay), and then let the FPU round using its default IEEE 754 round-to-nearest-ties-to-nearest-even mode. None of this crazy 0.5 stuff. :-)
 help



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

Search: