knowing when to do round error correction

I'm working with floating point binary numbers with my C++ library called Heap Variable, which can be found on sourceforge.net

My problem is I don't know how to detect the round error in the matissa. The documents say if it evenly divides by 2 then round it up. The problem I have with that is a division by 2 is a bit shift to the right by 1. That means if the last bit is set then I should round up by 1. I find this untrue with the floating point values found in VC++ 2010.

Is this a valid way of doing round error detection? The matissa can be of any size but is always evenly divided by 8 bits.
You should probably read a bit about how floating point numbers are represented. You're describing an integer operation.

http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
http://stereopsis.com/FPU.html
Topic archived. No new replies allowed.