56 56 votes What is the result of evaluating the following two expressions using three-digit floating point arithmetic with rounding? $(113. + -111.) + 7.51$ $113. + (-111. + 7.51)$ $9.51$ and $10.0$ respectively $10.0$ and $9.51$ respectively $9.51$ and $9.51$ respectively $10.0$ and $10.0$ respectively Digital Logic gatecse-2004 digital-logic number-representation normal + – Kathleen 25.9k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply amarVashishth commented Nov 16, 2015 i edited by amarVashishth Nov 17, 2015 reply Follow flag Rewrite the smaller number such that its exponent matches with the exponent of the larger number. 20 20 replyShare Mayank0343 commented Feb 2, 2020 reply Follow flag @amarVashishth Do you mean smaller number in terms of magnitude without the sign ? As in the accepted answer −1.11×10^2+7.51×10^0 , -1.11 (also -111 < 7.51) is smaller than 7.51, but we are rewriting 7.51 's exponent to match with 1.11' s exponent 1 1 replyShare Sudo_404_Div commented Jun 13, 2025 reply Follow flag Comment, just see this comment and then attempt this question.. 0 0 replyShare js__ commented Sep 24, 2025 reply Follow flag using three-digit floating point arithmetic with roundingso we cannot exceed 3 digits in any step , it needs to be rounded 0 0 replyShare Please log in or register to add a comment.
Best answer 114 114 votes $(113. + -111.) = 1.13 \times 10^2 + -1.11 \times 10^2 = 0.02 \times 10^2 = 2.0 \times 10^0$ $2.0 \times 10^0 + 7.51 \times 10^0 = 9.51 \times 10^0 $ $(-111. + 7.51) = -1.11 \times 10^2 + 7.51 \times 10^0 = -1.11\times 10^2 + 0.08 \times 10^2 = -1.03 \times 10^2 $ $113. + -1.03 \times 10^2 = 1.13 \times 10^2 + -1.03 \times 10^2 = 0.1 \times 10^2 = 10.0$ Reference: https://www.doc.ic.ac.uk/~eedwards/compsys/float/ Correct Answer: $A$ Arjun answered Nov 16, 2015 • edited May 21, 2019 by Naveen Kumar 3 Arjun comment Share Follow See all 24 Comments 24 24 Comments reply Digvijay Pandey commented Nov 16, 2015 reply Follow flag sir Is it not same thing as i had posted ? 1 1 replyShare Arjun commented Nov 17, 2015 reply Follow flag yes, I just gave an intermediate step :) 6 6 replyShare Mithlesh Upadhyay commented Nov 18, 2015 i reshown by Arjun Nov 25, 2017 reply Follow flag Sir, your first explanation is nice , but for second ? http://math.stackexchange.com/questions/1531692/two-expressions-using-three-digit-floating-point-arithmetic-with-rounding 1 1 replyShare Arjun commented Nov 18, 2015 reply Follow flag @Mithilesh I had told you not to edit others answer. Everyone won't be thinking like you. 0 0 replyShare Arjun commented Nov 18, 2015 reply Follow flag there is difference in the answers rt? 0 0 replyShare mcjoshi commented Sep 25, 2016 reply Follow flag @Arjun sir Your ref. link is as always amazing. 11 11 replyShare Nit9 commented Dec 10, 2016 reply Follow flag +7.51∗10^0 why 7.51 is not rounded of to 8.00 in first part addition? 0 0 replyShare Arjun commented Dec 10, 2016 reply Follow flag Why it should be rounded? Rounding happens only when it is really required (as we loose precision) or when explicitly told. Also, this question is regarding fixed point arithmetic which is in GATE syllabus but not well covered in most books. 8 8 replyShare monanshi commented Nov 25, 2017 reply Follow flag @Arjun Sir, Here in the following step: (−111.+7.51) = −1.11∗102+7.51∗100 = −1.1∗102+0.08∗102 The rule is to convert the exponent of smaller number as same as of the larger. But, here lager number is 7.51, whose exponent is zero. But, here you have converted the exponent of larger number to that of smaller's (i.e., exponent of 7.51 (larger) to that of -1.11 (smaller))? Can you please explain it? 0 0 replyShare GateAspirant999 commented Jan 8, 2018 reply Follow flag So floating point additions are not associative right? 0 0 replyShare suyashj commented Jan 11, 2018 reply Follow flag Thanks for the link @Arjun sir thanks a lot ...really it was life saving ... 0 0 replyShare talha hashim commented Sep 8, 2018 reply Follow flag @Arjun sir link is wonderful 0 0 replyShare logan1x commented Sep 20, 2018 reply Follow flag Thank you for explaination. 0 0 replyShare chandra sai commented May 13, 2019 reply Follow flag In 3rd line of Arjun sir answer he wrote, −1.1×10^2+0.08×10^2=−1.03×10^2, but The actual result of this calculation is -1.02*10^2 ... Which makes the answer as 11.0 Kindly explain If I am wrong here? 0 0 replyShare Arjun commented May 14, 2019 reply Follow flag The 1 missing was a typo. Fixed now. 0 0 replyShare commenter commenter commented Oct 18, 2019 reply Follow flag What is the significance of "three digit" floating point arithmetic? The floating point representation must have 3 digits in its mantissa? or floating point representation must have 2 digits in its mantissa with implicit digit just before decimal point? 0 0 replyShare mrinmoyh commented Dec 24, 2019 reply Follow flag $7.51 * 10^{0}$ = $0.0751 * 10^{-2}$ will be rounded like $0.07 * 10^{-2}$ why 0.08 ?? [ rounding means tuncating to fit into the space] 0 0 replyShare Manjyot Singh Nanra commented Jan 4, 2020 reply Follow flag Reference link is not working! 0 0 replyShare jatinmittal199510 commented Apr 11, 2021 reply Follow flag @arjun sir, link says that first add the mantissa then at last do the round off but in your steps you have taken round off first and then later done the addition of mantissa. Though, the result won't change for this problem and I was crafting few other examples for which the answer was not changing. Not sure whether both will result the same ALWAYS. 1 1 replyShare neel19 commented Jun 17, 2021 reply Follow flag three-digit floating point arithmetic – means in total three digit before and after the decimal point? 0 0 replyShare neel19 commented Jun 17, 2021 reply Follow flag @Arjun sir, In the link given it is said that the hidden bit is for binary floating-point numbers, but here the numbers are in decimal format. So why mantissa has only 2 digit? 0 0 replyShare Abhrajyoti00 commented Jan 6, 2023 i edited by Abhrajyoti00 Jan 6, 2023 reply Follow flag @Arjun Sir, @Kabir5454, I have the same question as @jatinmittal199510. EDIT: Ok, Got it. The next examples on that page shows that we first need to normalize the numbers and then start doing the operations. 0 0 replyShare thansen commented Jan 11, 2024 reply Follow flag three-digit floating point arithmetic with rounding what does this mean ? we have to take total three digit before and after the decimal ? 0 0 replyShare halfcodeblood commented Jul 13, 2024 reply Follow flag @Arjun sir reference link is awesome. Thanks 0 0 replyShare Please log in or register to add a comment.
38 38 votes 3 digit floating point arithmetic is used.. (113.+-111.)+7.51 = 2.00 + 7.51 = 9.51 113.+(-111.+7.51) = 113. + (-111. + 8.00) //rounding off to make compatible 7.51 and 111. with respect 3 digit floating point arithmetic 113. - 103. = 10.0 Digvijay Pandey answered Apr 23, 2015 Digvijay Pandey comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments Digvijay Pandey commented Nov 16, 2015 reply Follow flag to apply operation ur operand should be THREE FLOATING POINT ARITHMATIC .. 3 3 replyShare Ram Sharma1 commented Jul 19, 2016 reply Follow flag Please explain the meaning "three-digit floating point arithmetic with rounding" 3 3 replyShare amitqy commented Feb 13, 2019 reply Follow flag In n-digit floating-point arithmetic, numbers are represented by a signed n-digit integer and an exponent 113. in floating point is represented as 1.11 x 10^2 0 0 replyShare Please log in or register to add a comment.
9 9 votes much better explanation http://math.stackexchange.com/questions/1531692/two-expressions-using-three-digit-floating-point-arithmetic-with-rounding ANKIT CHAUHAN 1 answered Nov 23, 2016 ANKIT CHAUHAN 1 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes 2nd part: 113. + (-111. + 7.51) (-111. + 7.51) = - .111 x 103 + .751 x 10 = 10( - .111 x 102 + .751) = 10(-11.1 + .751) = 10(- 10.349) = - 103.49 now, 113. + (- 103.49) = .113 x 103 - .10349 x 103 = 103(.113 - .103) // ignor 49 bcz three-digit floating point arithmetic with rounding = 103 x .010 = 10 mint answered Feb 5, 2017 mint comment Share Follow See all 2 Comments 2 2 Comments reply Kimimp commented Aug 27, 2019 i moved by Hira Thakur Jan 7 reply Follow flag I have a doubt why .10349 is rounded off to .103 its should be .104 please help 1 1 replyShare nitin-787 commented Nov 20, 2023 reply Follow flag because 0.103 is close to 0.10349… if it would have been 0.10351 then it would be 0.104 0 0 replyShare Please log in or register to add a comment.