| ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
|
IntervalsMathematica arbitrary precision arithmetic follows essentially an interval approach. Each number has an associated uncertainty that can be interpreted as the size of an interval. The result of an arithmetic operation or function evaluation is another number with its uncertainty adjusted so that the image of the source interval lies entirely in the result interval. These methods are used most often for high-precision calculations, that is, small intervals. (For information on the details of Mathematica's arithmetic, see Mark Sofroniou's numerics report [4]. This article can also be found in the Version 3.0 Help Browser, hidden in the Notebook Demos section of the Getting Started/Demos category.) Intervals also can be used for low-precision calculations. From the application of a larger interval to a function, we can obtain global information about the function.
An interval
Interval arithmetic guarantees inclusion of results. Let
In the case of the addition function
Here are the internal representations of the numbers BaseForm[{0.3333333333333333, 0.6666666666666666, 0.1111111111111111,
Machine arithmetic rounds the results to the nearest representable machine numbers. BaseForm[{0.4444444444444444, 0.8888888888888888}, 8]
Interval arithmetic, on the other hand, rounds down the left end of the interval and rounds up the right end. Compare the values of BaseForm[Interval[{0.4444444444444443, 0.8888888888888891}], 8]
If the argument of Interval[{-2.2250738585072014*^-308, 2.2250738585072014*^-308}]
The reciprocal of the interval
Inverting it again gives an interval that is larger than the original
For elementary functions · Knowledge of the singularities and discontinuities of · Taylor-series approximations are used to bound the values of · Knowledge of properties of
For example, the tangent has a singularity at
The sine is monotonically increasing between 0 and
While a Taylor series could not bound the values of the sine in the interval
In a calculation of
Both sine and cosine lie between
The equivalent formula Converted by Mathematica October 15, 1999 [Next Page] |