What is the result of evaluating the following two expressions using three-digit floating point arithmetic with rounding?
GATE CSE 2004Digital Logic › Number Systems & RepresentationVerified
9.51 and 10.0 respectively
10.0 and 9.51 respectively
9.51 and 9.51 respectively
10.0 and 10.0 respectively
(A) 9.51 9.51 9.51 and 10.0 10.0 10.0 respectively
Use 3-significant-digit decimal floating-point arithmetic; perform each addition and round to three significant digits after each operation, especially after the inner parentheses.
With only three significant digits, the intermediate sum in the second expression must be rounded. The inner sum -111 + 7.51 equals -103.49, which rounds to -103; then 113 + (-103) = 10.0. The first expression has no such loss: 113 + (-111) = 2.0, then 2.0 + 7.51 = 9.51. Hence Option A is correct.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.