Question about errors in Numerical Analysis

Click For Summary
SUMMARY

The discussion focuses on the significant errors encountered in Numerical Analysis when subtracting two nearly equal floating-point numbers. Specifically, the example of calculating $1.000001 - 1$ illustrates that due to the limitations of floating-point representation, which retains only 7 significant digits, the accuracy of the result is compromised. The relative error is calculated to be 50%, highlighting the substantial impact of precision loss in such operations.

PREREQUISITES
  • Understanding of floating-point arithmetic
  • Familiarity with significant digits in numerical computations
  • Basic knowledge of error analysis in Numerical Analysis
  • Concept of relative and absolute error
NEXT STEPS
  • Study floating-point representation in programming languages
  • Learn about error propagation in Numerical Analysis
  • Explore techniques for minimizing numerical errors
  • Investigate the implications of precision loss in scientific computing
USEFUL FOR

Students and professionals in mathematics, computer science, and engineering who are involved in Numerical Analysis and require a deeper understanding of error management in computational methods.

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?
 
Physics 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 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • Poll Poll
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K