| |||||||||
In the mathematical subfield of numerical analysis numerical stability is a property of numerical algorithms. It describes how errors in the input data propagate through the algorithm. In a stable method, the errors due to the approximations get damped out as the computation proceeds. In an unstable method, any errors in processing get magnified as the calculation proceed. Unstable methods quickly generate garbage and are useless for numerical processing.
The numerical stability of a method together with the condition number defines how good a result we can get when using approximated methods to calculate a certain mathematical problem.
Sometimes a single calculation can be achieved in several ways, all of which are algebraically identically in terms of ideal real or complex numbers, but in practice yield different results as they have different levels of numerical stability. One of the common tasks of numerical analysis is to try to select algorthms which are robust -- that is to say, have good numerical stability in a wide range of situations. These methods are often made available to users of programming languages as mathematical computing libraries. The approprate use of mathematical computing libraries is usually far superior to "roll you own" numerical algorithms.
Given an algorithm f(x) with x the input data ε the error in the input data we say the algorithm is numerically stable for the relative error if
and numerically stable for the absolute error if
We say an algorithm is numerically unstable if
and numerically unstable for the absolute error if
In calculating numerical solutions to certain partial differential equations, stability is sometimes achieved by including Taylor expansion, integrating using a sum of finite rectangles.