Source
Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree
Numerical methods use a computer to produce approximate answers to a required precision, where an exact closed form (like the quadratic formula) is not available. Every such answer carries some error, so we need words and bounds for it.
Sources of error
Two kinds:
- truncation error: an infinite process is cut off early, for example , or a Taylor series . It shrinks as the step size shrinks
- round-off error: the machine stores only a limited number of digits. Smaller means more operations, so more round-off builds up
Absolute and relative error
Let approximate the exact value :
Accuracy rules:
- correct to decimal places means
- correct to significant digits means
The decimal place rule is the one used most, since it gives the stopping test in Root Bracketing and Error Estimate.
Worked example
, .
Solution:
- , so correct to 2 decimal places (not 3, since )
- , so correct to 4 significant digits
Error propagation
How errors grow through arithmetic:
- adding or subtracting: absolute errors add,
- multiplying or dividing: relative errors add (approximately), and