GATE / CS ARCHIVE

GATE CSE 2004 / QUESTION 28

Three-significant-digit floating-point addition

Engineering Mathematics & Other Topics · Numerical Methods · Full GATE CSE 2004 paper

GATE 2004, Q28 1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Numerical Methods

Question 28, GATE 2004: Evaluate (113+(−111))+7.51 and 113+((−111)+7.51), rounding to three significant decimal digits after each floating-point operation.
Options:
(A) 9.51 and 10.0
(B) 10.0 and 9.51
(C) 9.51 and 9.51
(D) 10.0 and 10.0
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. For the first association,113+(−111)=2 exactly, then 2+7.51=9.51. For the second,−111+7.51=−103.49 rounds to−103 with three significant digits;113+(−103)=10.0.

2. Thus9.51 and 10.0, A. Rounding is applied after each operation, not merely at the end.

3. Teaching check: Three digits means three significant digits, not three decimal places. The intermediate −103.49 becomes −103, losing 0.49 before the final addition. Floating-point addition is therefore not associative even though exact real-number addition is.

Original paper, page 4