
Interval arithmetic

Interval arithmetic (also known as interval mathematics, interval analysis, or interval computation) is a mathematical technique used to put bounds on rounding errors and measurement errors in mathematical computation. Numerical methods using interval arithmetic can guarantee reliable, mathematically correct results. Instead of representing a value as a single number, interval arithmetic represents each value as a range of possibilities. For example, instead of estimating the height of someone as exactly 2.0 metres, using interval arithmetic one might be certain that that person is somewhere between 1.97 and 2.03 metres.
Mathematically, instead of working with an uncertain real formula_1, one works with the ends of an interval formula_2 that contains formula_1. In interval arithmetic, any variable formula_1 lies in the closed interval between formula_5 and formula_6. A function formula_7, when applied to formula_1, yields an uncertain result; formula_7 produces an interval formula_10 which includes all the possible values for formula_11 for all formula_12.
Interval arithmetic is suitable for a variety of purposes. The most common use is in software, to keep track of rounding errors in calculations and of uncertainties in the knowledge of the exact values of physical and technical parameters. The latter often arise from measurement errors and tolerances for components or due to limits on computational accuracy. Interval arithmetic also helps find guaranteed solutions to equations (such as differential equations) and optimization problems.
Introduction.
The main objective of interval arithmetic is a simple way to calculate upper and lower bounds for the range of a function in one or more variables. These endpoints are not necessarily the true supremum or infimum, since the precise calculation of those values can be difficult or impossible; the bounds need only contain the function's range as a subset.
This treatment is typically limited to real intervals, so quantities of form
where formula_14 and formula_15 are allowed. With one of formula_16, formula_17 infinite, the interval would be an unbounded interval; with both infinite, the interval would be the extended real number line. Since a real number formula_18 can be interpreted as the interval formula_19 intervals and real numbers can be freely combined.
As with traditional calculations with real numbers, simple arithmetic operations and functions on elementary intervals must first be defined. More complicated functions can be calculated from these basic elements.
Example.
As an example, consider the calculation of body mass index (BMI) and assessing whether a person is overweight. BMI is calculated as a person's body weight in kilograms divided by the square of their height in metres. A bathroom scale may have a resolution of one kilogram. Intermediate values cannot be discerned—79.6 kg and 80.3 kg are indistinguishable, for example—but the true weight is rounded to the nearest whole number. It is unlikely that when the scale reads 80 kg, the person weighs "exactly" 80.0 kg. In normal rounding to the nearest value, the scale's showing 80 kg indicates a weight between 79.5 kg and 80.5 kg. This corresponds with the interval formula_20.
For a man who weighs 80 kg and is 1.80 m tall, the BMI is approximately 24.7. A weight of 79.5 kg and the same height yields approx. 24.537, while a weight of 80.5 kg yields approx. 24.846. Since the function is monotonically increasing, we conclude that the true BMI is in the range formula_21. Since the entire range is less than 25, which is the cutoff between normal and excessive weight, we conclude that the man is of normal weight.
The error in this case does not affect the conclusion (normal weight), but this is not always the case. If the man was slightly heavier, the BMI's range may include the cutoff value of 25. In that case, the scale's precision was insufficient to make a definitive conclusion.
Also, note that the range of BMI examples could be reported as formula_22, since this interval is a superset of the calculated interval. The range could not, however, be reported as formula_23, as now the interval does not contain possible BMI values.
Interval arithmetic states the range of possible outcomes explicitly. Results are no longer stated as numbers, but as intervals that represent imprecise values. The size of the intervals are similar to error bars in expressing the extent of uncertainty.
Multiple intervals.
Height and body weight both affect the value of the BMI. We have already treated weight as an uncertain measurement, but height is also subject to uncertainty. Height measurements in metres are usually rounded to the nearest centimeter: a recorded measurement of 1.79 metres actually means a height in the interval formula_24. Now, all four combinations of possible height/weight values must be considered. Using the interval methods described below, the BMI lies in the interval
In this case, the man may have a normal weight or be overweight; the weight and height measurements were insufficiently precise to make a definitive conclusion. This demonstrates interval arithmetic's ability to correctly track and propagate error.
Interval operators.
A binary operation formula_26 on two intervals, such as addition or multiplication, is defined by
In other words, it is the set of all possible values of formula_28, where formula_1 and formula_30 are in their corresponding intervals. If formula_26 is monotone in each operand on the intervals, which is the case for the four basic arithmetic operations (except division when the denominator contains formula_32), the extreme values occur at the endpoints of the operand intervals. Writing out all combinations, one way of stating this is
provided that formula_28 is defined for all formula_35 and formula_36.
For practical applications this can be simplified further:
The last case loses useful information about the exclusion of formula_42. Thus, it is common to work with formula_43 and formula_44 as separate intervals. More generally, when working with discontinuous functions, it is sometimes useful to do the calculation with so-called "multi-intervals" of the form formula_45 The corresponding "multi-interval arithmetic" maintains a set of (usually disjoint) intervals and also provides for overlapping intervals to unite.
Interval multiplication often only requires two multiplications. If formula_46, formula_47 are nonnegative,
The multiplication can be interpreted as the area of a rectangle with varying edges. The result interval covers all possible areas, from smallest to the largest.
With the help of these definitions, it is already possible to calculate the range of simple functions, such as formula_49 For example, if formula_50, formula_51 and formula_52:
Notation.
To make the notation of intervals smaller in formulae, brackets can be used.
formula_54 can be used to represent an interval. Note that in such a compact notation, formula_55 should not be confused between a single-point interval formula_56 and a general interval. For the set of all intervals, we can use
as an abbreviation. For a vector of intervals formula_58 we can use a bold font: formula_59.
Elementary functions.
Interval functions beyond the four basic operators may also be defined.
For monotonic functions in one variable, the range of values is simple to compute. If formula_60 is monotonically increasing (resp. decreasing) in the interval formula_61 then for all formula_62 such that formula_63 formula_64 (resp. formula_65).
The range corresponding to the interval formula_66 can be therefore calculated by applying the function to its endpoints:
From this, the following basic features for interval functions can easily be defined:
For even powers, the range of values being considered is important, and needs to be dealt with before doing any multiplication. For example, formula_75 for formula_76 should produce the interval formula_77 when formula_78 But if formula_79 is taken by repeating interval multiplication of form formula_80 then the result is formula_81 wider than necessary.
More generally one can say that, for piecewise monotonic functions, it is sufficient to consider the endpoints formula_46, formula_83of an interval, together with the so-called "critical points" within the interval, being those points where the monotonicity of the function changes direction. For the sine and cosine functions, the critical points are at formula_84 or formula_85 for formula_86, respectively. Thus, only up to five points within an interval need to be considered, as the resulting interval is formula_87 if the interval includes at least two extrema. For sine and cosine, only the endpoints need full evaluation, as the critical points lead to easily pre-calculated values—namely -1, 0, and 1.
Interval extensions of general functions.
In general, it may not be easy to find such a simple description of the output interval for many functions. But it may still be possible to extend functions to interval arithmetic.
If formula_88 is a function from a real vector to a real number, then  formula_89 is called an "interval extension" of formula_7 if
This definition of the interval extension does not give a precise result. For example, both formula_92 and formula_93 are allowable extensions of the exponential function. Tighter extensions are desirable, though the relative costs of calculation and imprecision should be considered; in this case, formula_94 should be chosen as it gives the tightest possible result.
Given a real expression, its "natural interval extension" is achieved by using the interval extensions of each of its subexpressions, functions and operators.
The "Taylor interval extension" (of degree formula_95 ) is a formula_96 times differentiable function formula_7 defined by
for some formula_99,
where formula_100 is the formula_101th order differential of formula_7 at the point formula_103 and formula_104 is an interval extension of the "Taylor remainder"
The vector formula_106 lies between formula_107
and formula_103 with formula_109, formula_106 is protected by formula_59.
Usually one chooses formula_103 to be the midpoint of the interval and uses the natural interval extension to assess the remainder.
The special case of the Taylor interval extension of degree formula_113 is also referred to as the "mean value form".
Complex interval arithmetic.
An interval can also be defined as a locus of points at a given distance from the centre, and this definition can be extended from real numbers to complex numbers. As it is the case with computing with real numbers, computing with complex numbers involves uncertain data. So, given the fact that an interval number is a real closed interval and a complex number is an ordered pair of real numbers, there is no reason to limit the application of interval arithmetic to the measure of uncertainties in computations with real numbers. Interval arithmetic can thus be extended, via complex interval numbers, to determine regions of uncertainty in computing with complex numbers.
The basic algebraic operations for real interval numbers (real closed intervals) can be extended to complex numbers. It is therefore not surprising that complex interval arithmetic is similar to, but not the same as, ordinary complex arithmetic. It can be shown that, as it is the case with real interval arithmetic, there is no distributivity between addition and multiplication of complex interval numbers except for certain special cases, and inverse elements do not always exist for complex interval numbers. Two other useful properties of ordinary complex arithmetic fail to hold in complex interval arithmetic: the additive and multiplicative properties, of ordinary complex conjugates, do not hold for complex interval conjugates.
Interval arithmetic can be extended, in an analogous manner, to other multidimensional number systems such as quaternions and octonions, but with the expense that we have to sacrifice other useful properties of ordinary arithmetic.
Interval methods.
The methods of classical numerical analysis can not be transferred one-to-one into interval-valued algorithms, as dependencies between numerical values are usually not taken into account.
Rounded interval arithmetic.
To work effectively in a real-life implementation, intervals must be compatible with floating point computing. The earlier operations were based on exact arithmetic, but in general fast numerical solution methods may not be available. The range of values of the function formula_114
for formula_115 and formula_116 are for example formula_117. Where the same calculation is done with single digit precision, the result would normally be formula_118. But formula_119,
so this approach would contradict the basic principles of interval arithmetic, as a part of the domain of formula_120 would be lost.
Instead, the outward rounded solution formula_121 is used.
The standard IEEE 754 for binary floating-point arithmetic also sets out procedures for the implementation of rounding. An IEEE 754 compliant system allows programmers to round to the nearest floating point number; alternatives are rounding towards 0 (truncating), rounding toward positive infinity (i.e. up), or rounding towards negative infinity (i.e. down).
The required "external rounding" for interval arithmetic can thus be achieved by changing the rounding settings of the processor in the calculation of the upper limit (up) and lower limit (down). Alternatively, an appropriate small interval formula_122 can be added.
Dependency problem.
The so-called "dependency problem" is a major obstacle to the application of interval arithmetic. Although interval methods can determine the range of elementary arithmetic operations and functions very accurately, this is not always true with more complicated functions. If an interval occurs several times in a calculation using parameters, and each occurrence is taken independently then this can lead to an unwanted expansion of the resulting intervals.
As an illustration, take the function formula_7 defined by formula_124 The values of this function over the interval formula_125 are formula_126 As the natural interval extension, it is calculated as:
which is slightly larger; we have instead calculated the infimum and supremum of the function formula_128 over formula_129 There is a better expression of formula_7 in which the variable formula_1 only appears once, namely by rewriting formula_132 as addition and squaring in the quadratic
So the suitable interval calculation is
and gives the correct values.
In general, it can be shown that the exact range of values can be achieved, if each variable appears only once and if formula_7 is continuous inside the box. However, not every function can be rewritten this way.
The dependency of the problem causing over-estimation of the value range can go as far as covering a large range, preventing more meaningful conclusions.
An additional increase in the range stems from the solution of areas that do not take the form of an interval vector. The solution set of the linear system
is precisely the line between the points formula_137 and formula_138 Using interval methods results in the unit square, formula_139 This is known as the "wrapping effect".
Linear interval systems.
A linear interval system consists of a matrix interval extension formula_140 and an interval vector formula_141. We want the smallest cuboid formula_142, for all vectors
formula_143 which there is a pair formula_144 with formula_145 and formula_146 satisfying
For quadratic systems – in other words, for formula_148 – there can be such an interval vector formula_59, which covers all possible solutions, found simply with the interval Gauss method. This replaces the numerical operations, in that the linear algebra method known as Gaussian elimination becomes its interval version. However, since this method uses the interval entitiesformula_150 and formula_151 repeatedly in the calculation, it can produce poor results for some problems. Hence using the result of the interval-valued Gauss only provides first rough estimates, since although it contains the entire solution set, it also has a large area outside it.
A rough solution formula_59 can often be improved by an interval version of the Gauss–Seidel method.
The motivation for this is that the formula_101-th row of the interval extension of the linear equation
can be determined by the variable formula_155 if the division formula_156 is allowed. It is therefore simultaneously
So we can now replace formula_159 by
and so the vector formula_59 by each element.
Since the procedure is more efficient for a diagonally dominant matrix, instead of the system formula_162 one can often try multiplying it by an appropriate rational matrix formula_163 with the resulting matrix equation
left to solve. If one chooses, for example, formula_165 for the central matrix formula_145, then formula_167 is outer extension of the identity matrix.
These methods only work well if the widths of the intervals occurring are sufficiently small. For wider intervals it can be useful to use an interval-linear system on finite (albeit large) real number equivalent linear systems. If all the matrices formula_145 are invertible, it is sufficient to consider all possible combinations (upper and lower) of the endpoints occurring in the intervals. The resulting problems can be resolved using conventional numerical methods. Interval arithmetic is still used to determine rounding errors.
This is only suitable for systems of smaller dimension, since with a fully occupied formula_169 matrix, formula_170 real matrices need to be inverted, with formula_171 vectors for the right hand side. This approach was developed by Jiri Rohn and is still being developed.
Interval Newton method.
An interval variant of Newton's method for finding the zeros in an interval vector formula_59 can be derived from the average value extension. For an unknown vector formula_173 applied to formula_174, gives
For a zero formula_176, that is formula_177, and thus must satisfy
This is equivalent to
formula_179.
An outer estimate of formula_180 can be determined using linear methods.
In each step of the interval Newton method, an approximate starting value formula_181 is replaced by formula_182 and so the result can be improved iteratively. In contrast to traditional methods, the interval method approaches the result by containing the zeros. This guarantees that the result produces all zeros in the initial range. Conversely, it proves that no zeros of formula_7 were in the initial range formula_59 if a Newton step produces the empty set.
The method converges on all zeros in the starting region. Division by zero can lead to separation of distinct zeros, though the separation may not be complete; it can be complemented by the bisection method.
As an example, consider the function formula_185, the starting range formula_186, and the point formula_187. We then have formula_188 and the first Newton step gives
More Newton steps are used separately on formula_190 and formula_191. These converge to arbitrarily small intervals around formula_192 and formula_193.
The Interval Newton method can also be used with "thick functions" such as formula_194, which would in any case have interval results. The result then produces intervals containing formula_195.
Bisection and covers.
The various interval methods deliver conservative results as dependencies between the sizes of different intervals extensions are not taken into account. However the dependency problem becomes less significant for narrower intervals.
Covering an interval vector formula_59 by smaller boxes formula_197 so that
is then valid for the range of values
So for the interval extensions described above the following holds:
Since formula_201 is often a genuine superset of the right-hand side, this usually leads to an improved estimate.
Such a cover can be generated by the bisection method such as thick elements formula_202 of the interval vector formula_203 by splitting in the centre into the two intervals formula_204 and formula_205 If the result is still not suitable then further gradual subdivision is possible. A cover of formula_206 intervals results from formula_18 divisions of vector elements, substantially increasing the computation costs.
With very wide intervals, it can be helpful to split all intervals into several subintervals with a constant (and smaller) width, a method known as "mincing". This then avoids the calculations for intermediate bisection steps. Both methods are only suitable for problems of low dimension.
Application.
Interval arithmetic can be used in various areas (such as set inversion, motion planning, set estimation or stability analysis) to treat estimates with no exact numerical value.
Rounding error analysis.
Interval arithmetic is used with error analysis, to control rounding errors arising from each calculation.
The advantage of interval arithmetic is that after each operation there is an interval that reliably includes the true result. The distance between the interval boundaries gives the current calculation of rounding errors directly:
Interval analysis adds to rather than substituting for traditional methods for error reduction, such as pivoting.
Tolerance analysis.
Parameters for which no exact figures can be allocated often arise during the simulation of technical and physical processes.
The production process of technical components allows certain tolerances, so some parameters fluctuate within intervals.
In addition, many fundamental constants are not known precisely.
If the behavior of such a system affected by tolerances satisfies, for example, formula_210, for formula_211 and unknown formula_107 then the set of possible solutions
can be found by interval methods. This provides an alternative to traditional propagation of error analysis.
Unlike point methods, such as Monte Carlo simulation, interval arithmetic methodology ensures that no part of the solution area can be overlooked.
However, the result is always a worst-case analysis for the distribution of error, as other probability-based distributions are not considered.
Fuzzy interval arithmetic.
Interval arithmetic can also be used with affiliation functions for fuzzy quantities as they are used in fuzzy logic. Apart from the strict statements formula_214 and formula_215, intermediate values are also possible, to which real numbers formula_216 are assigned. formula_217 corresponds to definite membership while formula_218 is non-membership. A distribution function assigns uncertainty, which can be understood as a further interval.
For "fuzzy arithmetic" only a finite number of discrete affiliation stages formula_219 are considered. The form of such a distribution for an indistinct value can then represented by a sequence of intervals
The interval formula_221 corresponds exactly to the fluctuation range for the stage formula_222
The appropriate distribution for a function formula_223 concerning indistinct values formula_224 and the corresponding sequences
can be approximated by the sequence
where
and can be calculated by interval methods. The value formula_228 corresponds to the result of an interval calculation.
Computer-assisted proof.
Warwick Tucker used interval arithmetic in order to solve the 14th of Smale's problems, that is, to show that the Lorenz attractor is a strange attractor. Thomas Hales used interval arithmetic in order to solve the Kepler conjecture.
History.
Interval arithmetic is not a completely new phenomenon in mathematics; it has appeared several times under different names in the course of history. For example, Archimedes calculated lower and upper bounds 223/71 < π < 22/7 in the 3rd century BC. Actual calculation with intervals has neither been as popular as other numerical techniques nor been completely forgotten.
Rules for calculating with intervals and other subsets of the real numbers were published in a 1931 work by Rosalind Cicely Young. Arithmetic work on range numbers to improve the reliability of digital systems were then published in a 1951 textbook on linear algebra by ; intervals were used to measure rounding errors associated with floating-point numbers. A comprehensive paper on interval algebra in numerical analysis was published by Teruo Sunaga (1958).
The birth of modern interval arithmetic was marked by the appearance of the book "Interval Analysis" by Ramon E. Moore in 1966. He had the idea in spring 1958, and a year later he published an article about computer interval arithmetic. Its merit was that starting with a simple principle, it provided a general method for automated error analysis, not just errors resulting from rounding.
Independently in 1956, Mieczyslaw Warmus suggested formulae for calculations with intervals, though Moore found the first non-trivial applications.
In the following twenty years, German groups of researchers carried out pioneering work around Ulrich W. Kulisch and at the University of Karlsruhe and later also at the Bergische University of Wuppertal.
For example, explored more effective implementations, while improved containment procedures for the solution set of systems of equations were due to Arnold Neumaier among others. In the 1960s, Eldon R. Hansen dealt with interval extensions for linear equations and then provided crucial contributions to global optimisation, including what is now known as Hansen's method, perhaps the most widely used interval algorithm. Classical methods in this often have the problem of determining the largest (or smallest) global value, but could only find a local optimum and could not find better values; Helmut Ratschek and Jon George Rokne developed branch and bound methods, which until then had only applied to integer values, by using intervals to provide applications for continuous values.
In 1988, Rudolf Lohner developed Fortran-based software for reliable solutions for initial value problems using ordinary differential equations.
The journal "Reliable Computing" (originally "Interval Computations") has been published since the 1990s, dedicated to the reliability of computer-aided computations. As lead editor, R. Baker Kearfott, in addition to his work on global optimisation, has contributed significantly to the unification of notation and terminology used in interval arithmetic.
In recent years work has concentrated in particular on the estimation of preimages of parameterised functions and to robust control theory by the COPRIN working group of INRIA in Sophia Antipolis in France.
Implementations.
There are many software packages that permit the development of numerical applications using interval arithmetic. These are usually provided in the form of program libraries. There are also C++ and Fortran compilers that handle interval data types and suitable operations as a language extension, so interval arithmetic is supported directly.
Since 1967, "Extensions for Scientific Computation" (XSC) have been developed in the University of Karlsruhe for various programming languages, such as C++, Fortran and Pascal. The first platform was a Zuse Z23, for which a new interval data type with appropriate elementary operators was made available. There followed in 1976, Pascal-SC, a Pascal variant on a Zilog Z80 that it made possible to create fast, complicated routines for automated result verification. Then came the Fortran 77-based ACRITH-XSC for the System/370 architecture (FORTRAN-SC), which was later delivered by IBM. Starting from 1991 one could produce code for C compilers with Pascal-XSC; a year later the C++ class library supported C-XSC on many different computer systems. In 1997, all XSC variants were made available under the GNU General Public License. At the beginning of 2000 C-XSC 2.0 was released under the leadership of the working group for scientific computation at the Bergische University of Wuppertal to correspond to the improved C++ standard.
Another C++-class library was created in 1993 at the Hamburg University of Technology called "Profil/BIAS" (Programmer's Runtime Optimized Fast Interval Library, Basic Interval Arithmetic), which made the usual interval operations more user friendly. It emphasized the efficient use of hardware, portability and independence of a particular presentation of intervals.
The Boost collection of C++ libraries contains a template class for intervals. Its authors are aiming to have interval arithmetic in the standard C++ language.
The Frink programming language has an implementation of interval arithmetic that handles arbitrary-precision numbers. Programs written in Frink can use intervals without rewriting or recompilation.
Gaol is another C++ interval arithmetic library that is unique in that it offers the relational interval operators used in interval constraint programming.
The Moore library is an efficient implementation of interval arithmetic in C++. It provides intervals with endpoints of arbitrary precision and is based on the ``concepts´´ feature of C++.
The Julia programming language has an implementation of interval arithmetics along with high-level features, such as root-finding (for both real and complex-valued functions) and interval constraint programming, via the ValidatedNumerics.jl package.
In addition computer algebra systems, such as FriCAS, Mathematica, Maple, Maxima (software) and MuPAD, can handle intervals. A Matlab extension "Intlab" builds on BLAS routines, and the Toolbox b4m makes a Profil/BIAS interface. Moreover, the Software Euler Math Toolbox includes an interval arithmetic.
A library for the functional language OCaml was written in assembly language and C.
IEEE 1788 standard.
A standard for interval arithmetic, IEEE Std 1788-2015, has been approved in June 2015. Two reference implementations are freely available. These have been developed by members of the standard's working group: The libieeep1788 library for C++, and the interval package for GNU Octave.
A minimal subset of the standard, IEEE Std 1788.1-2017, has been approved in December 2017 and published in February 2018. It should be easier to implement and may speed production of implementations.
Conferences and workshops.
Several international conferences or workshop take place every year in the world. The main conference is probably SCAN (International Symposium on Scientific Computing, Computer Arithmetic, and Verified Numerical Computation), but there is also SWIM (Small Workshop on Interval Methods), PPAM (International Conference on Parallel Processing and Applied Mathematics), REC (International Workshop on Reliable Engineering Computing).