Computer Arithmetic
Rounding to integers with round half to even, what do 2.5 and 3.5 become?
- A3 and 4
- B2 and 4
- C2 and 3
Show answer and explanation
Answer: B. 2 and 4
Both are exact ties, so each rounds to the even neighbor: 2.5, halfway between 2 and 3, goes to 2; 3.5, halfway between 3 and 4, goes to 4. Always rounding ties up would give 3 and 4, summing to 7, one more than the original sum of 6, whereas rounding to even gives 2 + 4 = 6, preserving the sum. 2 and 3 result from always rounding ties down. Avoiding biased rounding error is the method's strength.
- A. 3 and 4 result from always rounding ties up.
- B. Correct. Both ties round to the even values 2 and 4.
- C. 2 and 3 result from always rounding ties down.