This document discusses sources of errors in computational methods and numerical algorithms. It covers topics like problem formulation and input data errors, algorithm design and implementation errors, and errors from numeric limitations like rounding. It also discusses concepts like stability, conditioning, and accuracy in analyzing numerical solutions and algorithms.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
42 views26 pages
Errors
This document discusses sources of errors in computational methods and numerical algorithms. It covers topics like problem formulation and input data errors, algorithm design and implementation errors, and errors from numeric limitations like rounding. It also discusses concepts like stability, conditioning, and accuracy in analyzing numerical solutions and algorithms.
Numerical Analysis / Scientific Computing Many problems in Science and Engineering can not be solved analytically on a computer Numeric solutions are often required Numeric solutions provide only approximate solutions Numeric solutions are not unique Different numeric algorithms might yield different approximations
Absolute and Relative Error Absolute error: yˆ − y yˆ − y Relative error: y The true value, y, is generally unknown Relative error is often computed relative to the approximate value Error has to be approximated or calculated as a bound
Forward and Backward Error Error can be analyzed in the output space or in the input space of the algorithm ˆ − y = fˆ (x) − f (x) Forward error : Δy = y
error in the output of the algorithm for the same input
Backward error: Δx = xˆ − x ; yˆ = f ( xˆ ) error in the correct input corresponding to the output
Backward Error Backward error can be a useful analysis tool Backward error captures sensitivity Measures how much the original problem has to change to result in exactly the approximate solution How much data error would explain the total error Approximate solution is good if it has a small backward error Backward error is often easier to estimate than forward error
Sensitivity and Conditioning A problem is sensitive (ill-conditioned) if a change in the input data can cause a much larger change in the output data Condition number captures sensitivity: relative output error ( f ( xˆ ) − f (x)) / f (x) Δy / y cond = = = relative data error ( xˆ − x ) / x Δx / x A problem is sensitive if cond >> 1 Condition number represents an amplification factor between relative backward and relative forward error
Stability An algorithm is stable if the result is relatively insensitive to perturbations caused by the computation Similar to conditioning for problems An algorithm is stable if it results in a small backward error (i.e. if its result is the exact solution to a similar problem) If an algorithm is stable, the computational error is no worse than a small input error
Floating Point Arithmetic Floating point operations introduce rounding errors Addition and subtraction For addition and subtraction the mantissa has to be shifted until the exponents of the numbers are equal Potential loss of significant bits in the smaller number Multiplication Mantissas have to be multiplied, yielding theoretically a new mantissa with 2p digits which has to be rounded Division Quotient of mantissas can theoretically have an infinite number of digits which have to be rounded
Floating Point Arithmetic Besides rounding errors, floating point operations can result in unrepresentable numbers Overflow Results of an overflow (a number too large to be represented) possess no good approximation and can be catastrophic. On most computer systems overflow produces an error message Underflow Results of an underflow are usually approximated as 0. On many computer systems underflow is handled silently
Floating Point Arithmetic Many general arithmetic laws do not strictly hold in floating point arithmetic Addition and multiplication are commutative but not associative Underflow, overflow, and rounding can lead to incorrect results. 1 ∑n=1 n ∞ Infinite sum
While this sum diverges in reality (and thus has no result)