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

The problem with fixed point is in its, well, fixed point. You assign a fixed number of bits to the fractional part of the number. This gives you the same absolute precision everywhere, but the relative precision (distance to the next highest or lowest number) is worse for small numbers - which is a problem, because those tend to be pretty important. It's just overall a less efficient use of the bit encoding space (not just performance-wise, but also in the accuracy of the results you get back). Remember that fixed point does not mean absence of rounding errors, and if you use binary fixed point, you still cannot represent many decimal fractions such as 0.1.


With fixed point you either scale it up or use rationals.




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

Search: