MHB Question about errors in Numerical Analysis

Click For 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
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
16
Views
775
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
1K
  • · Replies 31 ·
2
Replies
31
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 28 ·
Replies
28
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K