MHB Question about errors in Numerical Analysis

AI Thread Summary
In Numerical Analysis, subtracting two nearly equal numbers can lead to significant errors due to limitations in floating-point representation. For example, calculating 1.000001 - 1 results in a small value of 0.000001, but the accuracy of this result is affected by the precision of the original numbers. The inherent accuracy of each number is approximately ±0.0000005, which translates to a relative error of 50% for the result. This illustrates how small differences can lead to disproportionately large errors in numerical computations. Understanding these concepts is crucial for effective numerical analysis.
evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hey! I am looking at an exercise in Numerical Analysis and I got stuck.
Why do we have a huge error when we substact two almost equal numbers?
 
Mathematics news on Phys.org
evinda said:
Hey! I am looking at an exercise in Numerical Analysis and I got stuck.
Why do we have a huge error when we substact two almost equal numbers?

Hey evinda!

Suppose we calculate $1.000001 - 1$.
In a "float" you can only keep 7 significant digits, so the first number cannot have more reliable digits than it already has.
The accuracy of both numbers is $\pm 0.0000005$.
Or as a percentage: $$\frac{0.0000005}{1} \times 100\% = 0.00005 \%$$, which is a pretty small error.The result of the subtraction is $0.000001$, but its accuracy is still about $0.0000005$.
Or as a percentage $$\frac{0.0000005}{0.000001} \times 100\% = 50 \%$$I'd say that is quite a large error relatively speaking. Don't you?
 
Great...I got it...Thank you very much! :o
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Is it possible to arrange six pencils such that each one touches the other five? If so, how? This is an adaption of a Martin Gardner puzzle only I changed it from cigarettes to pencils and left out the clues because PF folks don’t need clues. From the book “My Best Mathematical and Logic Puzzles”. Dover, 1994.
Back
Top