Suppose you want to add two large numbers such as 498454011879264 and 806515533049393. You feel lazy to add so many digits numbers like that by hand and you want to use calculator or you will use spreadsheet such as Microsoft Excel.
Try to input two numbers in the spreadsheet or calculator, what is the answer that your computer or calculator give?
Most probably you will get 1.30497E+15. That is only approximation answer. You want to get the exact answer but the computer or calculator has truncated your numbers.
To get exact answer, you suppose to tell the spreadsheet that your inputs are numbers or currency or you can also use accounting format. Then using Microsoft Excel, you will get
498,454,011,879,264.00 + 806,515,533,049,393.00 = 1,304,969,544,928,660.00
Now try to get the result by hand computation and to your surprise, your expensive spreadsheet actually produces incorrect result!
498454011879264 + 806515533049393 = 1304969544928657 and not 1304969544928660 as the computer give you. Even the addition of the last digit 4+3 is supposed to be 7 and not 0.
Why does the computer give you wrong answer and how to check whether the computer give wrong answer or not?
The computer give you wrong answer because of round off error. Computer treats number only up to certain digits and beyond that limit (say 15 digits), the computer will truncate the number and only give you the approximation. That approximation is fine for most cases but of course it is not correct if you want to get the exact answer.
To check whether your arithmetic computation is correct or not, you can use what is called digital root of a number. If you have a number say 65923, you can sum each digit recursively until you get only one digit number. 6+5+9+2+3 = 25, and 2+5 = 7, thus the digital root of 65923 is 7.
Digital root has nice property that digital root of an addition is equal to the digital root of each term.
Digital root of 498454011879264 is 9 and digital root of 806515533049393 is 1, thus the digital root of the summation of those two big numbers suppose to be digital root of (9+1 = 10) = 1+ 0 = 1.
However, what the calculator or spreadsheet gives you, 1304969544928660, has digital root of 4. Since the digital root is not equal, you can easily detect that the summation is not correct.
You can find more interesting tutorial about pattern of digital root in my web page http://people.revoledu.com/kardi/tutorial/DigitSum/. You can freely download the spreadsheet examples and you can also play around with online digital root calculator. Visit the web site today. Many more fascinating free tutorials are waiting for you to learn.
