585 views
2 votes
2 votes
What is the result of evaluating the following two expressions using three digit floating point arithmetic using three digit floating point arithmetic with rounding

(113. + -111. ) + 7.51

113. + (-111. + 7.51)

a) 9.51 and 10.0 respectively

b)10.0 and 9.51 respectively

c) 9.51 and 9.51 respectively

d) 10.0 and 10.0 respectively

1 Answer

Best answer
2 votes
2 votes

here ans should be A.

(113. + -111. ) + 7.51 = (2.00) + 7.51 =9.51

113. + (-111. + 7.51)=113. + (-111. + 008.) = 113 + (-103) = +10

Note:Floating point having only 3 digits so in second expressing round off has been done.

selected by

Related questions

0 votes
0 votes
0 answers
2
eyeamgj asked Nov 6, 2018
244 views
https://gateoverflow.in/80201/gate1987-1-viiNOT GETTING ITS ANSWER .......
0 votes
0 votes
1 answer
4