Computer Arithmetic
Which rounding method does IEEE 754 specify as the default?
- ARound to the nearest value, and on a tie round to the even side
- BAlways truncate toward zero
- CAlways round up toward the larger value
Show answer and explanation
Answer: A. Round to the nearest value, and on a tie round to the even side
The IEEE 754 default is round half to even: round to the nearest representable value, and on an exact tie choose the one whose last bit is 0 (even). Always rounding ties up biases errors in one direction, accumulating drift over many operations, whereas rounding to even splits ties evenly so they cancel. Rounding toward zero or toward positive infinity are also in the standard but are selected for special purposes such as interval arithmetic, not the default.
- A. Correct. Round half to even is the default.
- B. Rounding toward zero is in the standard but is not the default.
- C. Rounding toward positive infinity is not the default either.