Originally posted by Buckaroo:
I'm posting this here, because the Calculator is part of OSX, if I have errered, please forgive me and move to appropriate forum.
A strange thing happened when I tried to add the following two numbers in the calculator:
3721.03 + 1329.75
= 5050.780000000001
What do you get when you add thosee two numbers?
I get the same thing (Mac OS X v10.3.5, Calculator v3.1). It is a floating point error. Not a big deal but it still shouldn't happen.
I also tried setting the Precision to 16 (same problem), 9 (no problem), 11 (no problem)... the default is 12 (problem). The precision is set in View --> Precision. You will get a similar error in any digital electronic calculator if you, say, take the square root of 5, then square the result, and then subtract 5 from that. You should get 0 but in Calculator.app I get 8.881784197e-16 which is a really tiny number but also not 0. This is acceptable for something like a non-integer square root value. I would not consider it acceptable for simple addition to two decimal places. A nine year old child wouldn't make the same mistake.
Incidentally this points up an interesting (to me anyhow) problem in the use of computers and calculators... people tend to think of them as being super accurate when it comes to simple arithmetic. Many people trust them implicitly. It is rare that a computer program makes such mistakes and far more common that it is user error.
For example I was tutoring a student in Physics today and he said the that cosine of 60 degrees was -0.952413, which is clearly wrong. The cosine of any angle greater than or equal to -90 degrees and less than or equal to 90 degrees can never be negative. He had the mode set to radians. Having the incorrect mode set for the units of angles is a common mistake (I make the same mistake often). One should, hopefully, be able to notice when a result is clearly wrong.
Another simple example ut MUCH harder to catch is when solving two equations in two unknowns. If the lines are nearly parallel a small rounding error in one solution can lead to a huge error in another. It becomes really difficult when solving 2+n equations in 2+n unknowns. These types of equations are sometimes called "ill conditioned equations". The trick is to be able spot these types of problems before one makes some fatal mistake in designing a bridge or an aircraft or a financial prediction. Just punching the values in to some calculator or spreadsheet and blindly using the result is not a safe strategy.