Hacker News new | past | comments | ask | show | jobs | submit login

Significand * 2^exponent so yes. Another way to think of it more naturally is just remember it's a floating point in a fixed number of bits. Since base doesn't really matter for theory you can just think of a decimal point instead of binary. If you move it over to put more digits/information on the left side then you have to take digits/information from the right side.

If you were going to do this though I'd just do 2 ints acting as a single fixed point. Less glue logic and likely more precision. A float using all of the bits would likely be better than int + float as well depending how you configured it.




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

Search: