Is this a bug?
On a new sheet type "3.8" in B2, "3.7" in C2 and "=B2-C2" in D2. Does everyone get ".099999" instead of ".1"?
Want to highlight a helpful answer? Upvote!
Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >
Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >
On a new sheet type "3.8" in B2, "3.7" in C2 and "=B2-C2" in D2. Does everyone get ".099999" instead of ".1"?
This topic has been discussed many times. Numeric values on a computer are not stored to infinite precision and therefore have a variety of conditions where the results are close but not exact.
you can format the cell to show three places and the result will be correct. or you can use the function round()
like this:
=round(B2-C2, 3)
Here is some light reading about number formats:
No, it is not bug. It is well-known behaviour of binary floating point arithmetic of finite precision.
Please read the following thread for explanations.
WONKY calculation bug in Numbers 3.0.1
https://discussions.apple.com/thread/5718344?tstart=0
Regards,
H
jr azzarelli wrote:
On a new sheet type "3.8" in B2, "3.7" in C2 and "=B2-C2" in D2. Does everyone get ".099999" instead of ".1"?
Its an un-reported bug in your version of Iwork -- and one of the reasons why - one should never make a business decision by looking at a spread sheet without checking it by using a calculator to check it (as in separate -device not the one on your mac or pc)
Disclaimers were added early on to some spreadsheet software after a company made a decision that turned out to be wrong because there were errors on the spread sheet.
So give bug feedback to apple using either a feedback option in Numbers (if there is one) or go to the feedback site http://www.apple.com/feedback/>Apple - Feedback
It's not a bug, but it is a limitation of the system. The example from MS Excel (for Mac) and LibreOffice provided by Wayne and SG give the same results because they use the same engine to do the calculations.
The results are not 'wrong'. They are correct to the closest precision possible when calculating in binary and expressing the result in base 10.
Wayn has offered you the slution: Use the ROUND function to round the result to a smaller number of decimal places.
Regards,
Barry
OK, well I consider most of the answers here to be nutty. Any 9 year old can do this math problem. Excel on Windows can do it and Excel for Mac 2011 has no problem, so it is not systemic. It seems to me the comments are "excuses" for a ridiculous fail. Yes I know how to use the round function but why should I have to for something so simple?
Try this: Type "+1" into a cell. ( I actually have to import a CSV file that is exported with hundreds of rows of 'signed' numbers). First of all, Numbers thinks it is text. OK, fine. Now use =Value() and refer to the cell. You get an error. Really? Do I have to strip the "+" sign just to convert this into a number??
I guess I will stick with Excel for now.
Question is asked. Answer is given. I don't care who likes it or not as far as the answer is correct.
JR,
you should use the tool that does the task you need to do the best. If Excel works for you, then I suggest you use it. No one in these forums works for Apple (we are fellow users, like you) so we have no ability to affect any change within Numbers except to suggest, if you believe this is a bug, that you use the menu item in Numbers "Numbers > Provide Numbers Feedback"
I did some testing in numbers - if you define the fields as numeric you get the correct answer as long as the decimal places are 15 or less.
between 16 and 30 you get the wrong answer -- so the solution for Apple would be to default the float to decimal places of 15 or less.
Or they could follow my calculator which, when set to float the decimals comes up with the correct answer.
Saying its always been this way is a lame excuse.
I wonder if this error in math engine has been causing some of the engineering problems with CAD software - where the new engineers don't know how to do the math without a computer or calculator.
Think the overseas car manufacturer whose sun-roofs all leaked in the same spot - the ignitions that could be shut off by hitting the keys - or the even the screens for certain devices that keep breaking.
For those interested in how spreadsheets store and calculate floating point numbers see this link, and this one, among many others.
This is not a bug. This not an "error" in the math engine. This is well known to engineers and scientists. It follows the IEEE 754 specification. IEEE stands for the Institute of Electrical and Electronics Engineers,
SG
With all due respect to you and IEEE, the answer is wrong. I would probably accept =SQRT(4) = 1.999999 - but lo and behold, Numbers gets this right (2). Also, Numbers on my iPhone gives the correct answer to the initial question - ".1". If my phone can do it, my mighty Mac should be able to do it as well.
jr azzarelli wrote:
OK, well I consider most of the answers here to be nutty. Any 9 year old can do this math problem. Excel on Windows can do it and Excel for Mac 2011 has no problem,
That is not true, both Excel 2010 and 2011 return a number less than 0.1, just as Numbers does (see my earlier post)
Lets stick with fact please.
Is this a bug?