Demonstration of The Problem
The effect can be demonstrated with decimal numbers. The following example demonstrates loss of significance for a decimal floating-point data type with 10 significant digits:
Consider the decimal number
0.1234567891234567890A floating-point representation of this number on a machine that keeps 10 floating-point digits would be
0.1234567891which is fairly close – the difference is very small in comparison with either of the two numbers.
Now perform the calculation
0.1234567891234567890 − 0.1234567890The answer, accurate to 10 digits, is
0.0000000001234567890However, on the 10-digit floating-point machine, the calculation yields
0.1234567891 − 0.1234567890 = 0.0000000001Whereas the original numbers are accurate in all of the first (most significant) 10 digits, their floating-point difference is only accurate in its first nonzero digit. This amounts to loss of significance.
Read more about this topic: Loss Of Significance
Famous quotes containing the word problem:
“I dont have any problem with a reporter or a news person who says the President is uninformed on this issue or that issue. I dont think any of us would challenge that. I do have a problem with the singular focus on this, as if thats the only standard by which we ought to judge a president. What we learned in the last administration was how little having an encyclopedic grasp of all the facts has to do with governing.”
—David R. Gergen (b. 1942)