next up previous contents
Next: Rounding to nearest. Up: Computer Representation of Numbers Previous: Rounding - up or   Contents

Chopping

Suppose . We can represent it as by simply discarding (``chopping'') the digits which do not fit the mantissa format (here the remaining digits are 625). We see that the FP representation is precisely , and we have . Now, if was negative, , the chopped representation would be , but now this is . Note that in this situation . In consequence, with chopping, we choose if and is . In both situations the floating point number is closer to 0 than the real number , so chopping is also called rounding toward 0.

25<25 SetFigFontpt@pt xxxxxxsplain


Chopping has the advantage of being very simple to implement in hardware. The roundoff error for chopping satisfies


For example:


and




Adrian Sandu 2001-08-26