cs0210015/cs0210015
1: \documentclass{llncs}
2: \usepackage{epsfig}
3: 
4: 
5: \newcommand{\red}{\hbox{{\it red}}}
6: \newcommand{\yellow}{\hbox{{\it yellow}}}
7: \newcommand{\blue}{\hbox{{\it blue}}}
8: 
9: \newcommand{\A}{\mathcal{A}}
10: \newcommand{\C}{\mathcal{C}}
11: \newcommand{\E}{\mathcal{E}}
12: \newcommand{\F}{\mathcal{F}}
13: \newcommand{\R}{\mathcal{R}}
14: \newcommand{\N}{\mathcal{N}}
15: \newcommand{\Z}{\mathcal{Z}}
16: \newcommand{\calS}{\mathcal{S}}
17: \newcommand{\pp}{^{\prime\prime}}
18: \newcommand{\T}{\mathcal{T}}
19: \newcommand{\ZA}{\hbox{{\scshape zero1}}}
20: \newcommand{\ZB}{\hbox{{\scshape zero2}}}
21: 
22: \newcommand{\addlo}{{+_{lo}}}
23: \newcommand{\addhi}{{+_{hi}}}
24: \newcommand{\sublo}{{-_{lo}}}
25: \newcommand{\subhi}{{-_{hi}}}
26: \newcommand{\mullo}{{*_{lo}}}
27: \newcommand{\mulhi}{{*_{hi}}}
28: \newcommand{\divlo}{{/_{lo}}}
29: \newcommand{\divhi}{{/_{hi}}}
30: 
31: \newcommand{\ob}{\langle}
32: \newcommand{\cb}{\rangle}
33: 
34: \newcommand{\mn}{\hbox{min}}
35: \newcommand{\mx}{\hbox{max}}
36: 
37: \hyphenation{Data-stream}
38: \hyphenation{Data-pipe}
39: 
40: \begin{document}
41: 
42: \pagestyle{headings}
43: 
44: \title{
45: New Developments in Interval Arithmetic and Their Implications for
46: Floating-Point Standardization\thanks{
47: Technical report DCS-273-IR, Department of Computer Science,
48: University of Victoria, Victoria, BC, Canada.}
49: }
50: 
51: \author{M.H. van Emden}
52: 
53: \institute{Department of Computer Science, \\University of Victoria,
54: Victoria, Canada \\
55: \email{vanemden@cs.uvic.ca}\\
56: \texttt{http://www.cs.uvic.ca/\homedir vanemden/}
57: }
58: 
59: \maketitle
60: 
61: \begin{abstract}
62: We consider the prospect of a processor that can perform interval
63: arithmetic at the same speed as conventional floating-point
64: arithmetic.  This makes it possible for all arithmetic to be performed
65: with the superior security of interval methods without any penalty in
66: speed. In such a situation the IEEE floating-point standard needs to be
67: compared with a version of floating-point arithmetic that is ideal for
68: the purpose of interval arithmetic.  Such a comparison requires a
69: succinct and complete exposition of interval arithmetic according to
70: its recent developments. We present such an exposition in this paper.
71: We conclude that the directed roundings toward the infinities and the
72: definition of division by the signed zeros are valuable features of the
73: standard.  Because the operations of interval arithmetic are
74: always defined, exceptions do not arise. As a result neither Nans nor
75: exceptions are needed. Of the status flags, only the inexact flag may
76: be useful. Denormalized numbers seem to have no use for interval
77: arithmetic; in the use of interval constraints, they are a handicap.
78: 
79: \end{abstract}
80: 
81: {\bf Keywords:} interval arithmetic, IEEE floating-point standard,
82: extended interval arithmetic, exceptions
83: 
84: \section{Introduction}
85: Continuing advances in process technology have caused a tremendous
86: increase in the number of transistors available to the designer of a
87: processor chip. As a result, multiple parallel floating-point units
88: become feasible. The time will soon come when interval arithmetic can
89: be done as fast as conventional arithmetic.
90: 
91: However, to properly utilize the newly available number of transistors,
92: chip designers need to spend ever more time iterating through cycles of
93: synthesis, place-and-route, and physical verification than current
94: design methodology allows. This design bottleneck makes it desirable
95: to simplify floating-point units. Recent developments in the
96: theory of interval arithmetic suggest possibilities for simplification.
97: As far as interval arithmetic is concerned, certain parts the 1985
98: standard are essential, whereas other parts are superfluous or even a
99: liability.
100: 
101: In this paper we present a consolidated, self-contained account of the new
102: developments in interval arithmetic not available elsewhere. In the
103: conclusions we give a sketch of what would be an ideal standard from
104: the point of view of interval arithmetic when arranged in this way.
105: 
106: \section{Why interval arithmetic?}
107: 
108: Conventional, non-interval, numerical analysis is marvelously cheap and
109: it works most of the time.  This was exactly what was needed in the
110: 1950s when computers needed a demonstration of feasibility. A lot has
111: changed since that time.  Numerical computation no longer needs to be
112: cheap. It has become more important that it always works. As a result
113: interval arithmetic is becoming an increasingly compelling
114: alternative.  For example, civil, mechanical, and chemical engineers are
115: liable for damage due to unsound design. So far, they have been able to
116: get away with the use conventional numerical analysis, appealing to
117: what appears to be best practice. As interval methods mature, it is
118: becoming harder to ignore them when defining ``best practice''.
119: 
120: %Add back in later versions. Hold back in version to be refereed.
121: %One reason for not accepting interval methods in the past was its lack
122: %of a uniquely compelling theoretical foundation.  Typical of the
123: %situation in interval arithmetic between the sixties until recently is,
124: %to choose an otherwise excellent example, Hansen's book \cite{hnsn92}
125: %where an ``official'' interval arithmetic is defined where division by
126: %intervals containing zero is not defined. In recognition of the
127: %impracticality of this, an ''extended interval arithmetic'' is defined,
128: %presumably to be used in emergencies.
129: 
130: Recent developments, which we call ``modern interval arithmetic''
131: provide a practical and mathematically compelling basis. In
132: conjunction with this it has become clear that some aspects of IEEE
133: standard 754 are not needed or are detrimental, whereas other aspects
134: are marvelously suited to interval arithmetic. If these latter are
135: preserved in future development of the standard, then interval
136: arithmetic can help bridge the design gap and lead to the situation
137: where all arithmetic can be faster due to interval methods.
138: 
139: \section{A theory of approximation}
140: 
141: Conventional numerical analysis approximates each real by a single
142: floating-point number. It approximates each of the elementary
143: operations on reals by the floating-point operation that has the same
144: name, but not the same effect. Let us call this approach ``point
145: approximation''. It has been amply documented that this approach,
146: though often satisfactory, can lead to catastrophical errors. This can
147: happen because it is not known to what degree a floating-point variable
148: approximates its real-valued counterpart.
149: 
150: Interval arithmetic is based on a theory of approximation, {\em
151: set approximation}, that ensures that for every real-valued variable
152: $x$ in the mathematical model, there is a machine-representable set $X$
153: of reals that contains $x$. Such arithmetic is exact in the
154: sense that $x \in X$ is and remains a true statement in the sense of
155: mathematics. It is of course not exact in the sense that $X$ typically
156: contains many reals.
157: %It is useful because fast algorithms are known for
158: %which the elements of $X$ vary by at most, say, one part in $10^{6}$ to
159: %$10^{15}$, whatever is required by the application and justified by the
160: %initial data.
161: 
162: Conversely, in case of numerical difficulties, it will turn out that
163: continued iteration does not reduce the size of $X$, in which case we
164: have a notification that there is a problem with the algorithm or with
165: the model. Because of this property, we call this {\em manifest}
166: approximation: there is always a known lower bound to the quality of
167: the approximation.
168: 
169: In this way the operations can be interpreted as
170: inference rules of logic; for example, $x \in X$ and $y \in Y$ imply
171: that $x+y \in Z$, where $Z$ is computed from $X$ and $Y$.
172: 
173: \section{Approximation structures}
174: 
175: We address the situation where we need to solve a mathematical model in
176: which a variable takes on values that are not representable in a
177: computer, but where it is possible to so represent {\em sets} of
178: values. We then approximate a variable by a representable set that
179: contains all the values that are possible according to the model.
180: Models with real-valued variables are but one example of such a
181: situation.
182: 
183: As the theory of set approximation applies to sets in general, we
184: first present it this way.
185: 
186: \begin{definition}
187: \label{approxStruct}
188: Let $\T$ be the type of a variable $x$, that is, the set of the
189: possible values for $x$.  A finite set $\A$ of subsets of $\T$ that contains
190: $\T$ and that is closed under intersection is called an {\em
191: approximation structure in $\T$}.
192: \end{definition}
193: 
194: In a typical practical application of this theory, $\A$ is
195: a set of computer-representable subsets of $\T$.
196: 
197: \begin{theorem}
198: \label{approxTh}
199: If $\A$ is an approximation structure for $\T$, then
200: for every $S \subset \T$ there exists a unique least
201: (in the sense of the set-inclusion partial order) element
202: $S'$ of $\A$ such that $S \subset S'$.
203: \end{theorem}
204: 
205: \begin{definition}
206: \label{phi}
207: For every $S \subset \T$, $\phi(S)$ is the unique least element of $\A$
208: that exists according to theorem~\ref{approxTh}.
209: \end{definition}
210: We regard $\phi(S)$ as the approximation of $S$.
211: As $S$ can be a singleton set, this theory
212: provides approximations both of elements and subsets of $\T$.
213: 
214: \section{An approximation structure for the reals}
215: 
216: We seek a set of subsets of the reals that can serve as approximation
217: structure. A first step, not yet computer-representable, is that of
218: the closed, connected sets of reals.
219: 
220: \begin{theorem}
221: \label{cloConn}
222: The closed, connected subsets of $R$ are an approximation
223: structure for $R$.
224: \end{theorem}
225: 
226: {\em Proof}
227: According to a well-known result in topology,
228: all closed connected subsets of $R$ have one of the following
229: four forms:
230: $\{x \in \R \mid a \leq x \leq b \}$,
231: $\{x \in \R \mid x \leq b \}$,
232: $\{x \in \R \mid a \leq x \}$, and
233: $\R$
234: where $a$ and $b$ are reals.
235: Here we do not exclude $a > b$, because the empty set is also
236: included among the closed connected sets.
237: Clearly the conditions for an approximation structure are satisfied:
238: $\R$ is included and the intersection of any two sets of this form is
239: again closed and connected.
240: This completes the proof.
241: 
242: The significance of the closed connected sets of reals as approximation
243: structure is that they can be represented as a pair of extended reals.
244: 
245: \begin{definition}
246: \label{extReals}
247: The {\em extended reals} are the set obtained by adding to the reals
248: the two infinities. As with the reals, the extended reals are totally
249: ordered. When two extended reals are finite, then they are ordered
250: within the extended reals as they are in the reals. Furthermore,
251: $-\infty$ is less than any real and $+\infty$ is greater than any
252: real.
253: \end{definition}
254: 
255: Theorem~\ref{cloConn} together with definition~\ref{extReals}
256: suggest the following notation for the four forms of the closed
257: connected sets of reals. In this notation we do not include the empty
258: interval. The reason is that if it is found in an interval computation
259: that an interval is empty, any further operations involving the
260: corresponding variable yield the same result, so that the computation
261: can be halted.
262: 
263: \begin{definition} \label{brackets}
264: Let $a$ and $b$ be reals such that $a \leq b$.
265: \begin{eqnarray*}
266: \ob a,b \cb & \stackrel{\rm def}{=} &
267:      \{x \in \R \mid a \leq x \leq b \} \\
268: \ob -\infty,b \cb & \stackrel{\rm def}{=} &
269:      \{x \in \R \mid x \leq b \}        \\
270: \ob a,+ \infty \cb & \stackrel{\rm def}{=} &
271: \{x \in \R \mid a \leq x \}             \\
272: \ob -\infty, +\infty \cb & \stackrel{\rm def}{=} & \R
273: \end{eqnarray*}
274: \end{definition}
275: 
276: 
277: Note that each of these pairs denote sets of reals, even though in
278: their notation the infinities are used. These are not reals.
279: 
280: \section{Floating-point intervals: a finite approximation structure for
281: the reals}
282: 
283: Let $F$ be a finite set of reals.
284: 
285: \begin{theorem}
286: \label{finApprox}
287: The sets of the form
288: $\emptyset$,
289: $\ob -\infty,b \cb$,
290: $\ob a,b \cb$,
291: $\ob a,+\infty \cb$, and
292: $\ob -\infty,+\infty \cb$
293: are an approximation structure when $a$ and
294: $b$ are restricted to elements of $F$ such that $a \leq b$.
295: \end{theorem}
296: 
297: \begin{definition}
298: \label{flptOrReal}
299: The {\em real intervals} are sets of the form described in
300: theorem~\ref{cloConn}.
301: The {\em floating-point intervals} are sets of the form described in
302: theorem~\ref{finApprox}, where $a$ and $b$ are finite IEEE754 floating
303: point numbers (according to a choice of format:  single-length,
304: double-length, extended) such that $a \not= -0$, $b \not= +0$, and $a
305: \leq b$.
306: \end{definition}
307: 
308: From definitions \ref{brackets}
309: and \ref{flptOrReal} and theorem \ref{finApprox} we conclude:
310: 
311: \begin{itemize}
312: \item
313: The restriction on the sign of zero bounds
314: in definition~\ref{flptOrReal} is there to make
315: the notation unambiguous. We will see that disambiguating the notation
316: in this way has an advantage for interval division.
317: 
318: \item
319: $\{0\}$ is written as $\ob+0,-0\cb$.
320: 
321: \item
322: When $\ob a,b \cb$ is a floating-point interval, then $a \not= +\infty$
323: and $b \not= -\infty$.
324: \end{itemize}
325: 
326: Let us take care to distinguish ``real intervals'' from
327: ``floating-point intervals''. Both are sets of reals. The latter are a
328: subset of the former.
329: 
330: 
331: From now on we assume
332: the floating-point intervals
333: as approximation structure when we rely on
334: the fact that for any set $S$ of reals there is a unique least
335: floating-point interval $\phi(S)$ containing it.
336: 
337: \begin{definition}
338: For any real $x$, $x^-$ ($x^+$) is the left (right) bound
339: of $\phi(\{x\})$.
340: \end{definition}
341: 
342: This operation is implemented by performing a floating-point
343: operation that yields $x$ in rounding mode toward $-\infty$
344: ($+\infty$).
345: 
346: \section{Interval Arithmetic}
347: Much of the standard is concerned with defining, signaling, and
348: trapping exceptions caused by overflow, underflow, and undefined
349: operations. What distinguishes modern interval arithmetic from the old
350: is that {\em no exceptions occur}.  As we will see, no operation can
351: result in Nan.  Every operation is defined on all operands. Moreover,
352: it is defined in such a way that the floating-point endpoints bound the
353: set of the real numbers that are the possible values of the associated
354: variable in the mathematical model.
355: 
356: This property is based on the use of {\em set extensions} of the
357: arithmetical operations. It is helped by the use of {\em relational
358: definition} rather than functional ones of these operations. We
359: discuss these in turn.
360: 
361: \paragraph{Set extensions of functions}
362: Whenever a function $f$ is defined on a set $S$ and has values in a set
363: $T$, there exists the {\em canonical set extension} $\widehat f$, which
364: is a function defined on the subsets of $S$ and has as values subsets
365: of $T$ according to $\widehat f(X) = \{ f(x) \mid x \in X\}$ for any $X
366: \subset S$. This definition is of interest because it also carries over
367: to partial functions and to multivalued functions.
368: 
369: Though $X$ may be an approximation of $x$, $\widehat f(X)$ may not be an
370: element of an approximation structure of $T$, so is not necessarily
371: an approximation of $f(x)$. But $\phi(\widehat f(X))$ does approximate $f(x)$.
372: Thus $\phi$ induces a transformation among functions.
373: It changes $f$ to
374: the function that maps $x$ to $\phi(\widehat f(\{x\}))$.
375: 
376: The {\em inverse canonical set extension} of $f$ is defined as
377: $f^{-1}(Y) = \{ x \mid f(x) \in Y \}$. This definition is of interest
378: because such an inverse is defined even when $f$ itself has no
379: inverse.
380: 
381: By using the canonical set extensions of a function, one ensures that
382: undefined cases never arise. By considering instead of the
383: arithmetical operations on the reals their canonical set extensions
384: to suitably selected sets of reals (namely, floating-point intervals),
385: undefined cases are eliminated.
386: 
387: An example of a set extension for arithmetical operations is
388: $X+Y = \{x + y \mid x \in X \wedge y \in Y\}$. Though $X$ and $Y$ may be
389: floating-point intervals, that is typically not the case for
390: $\{x + y \mid x \in X \wedge y \in Y\}$. So
391: to ensure that addition is closed in the set of floating-point
392: intervals, we need to apply $\phi$, as shown below in the formulas for
393: interval operations that go back to R.E. Moore \cite{moore66}.
394: 
395: \begin{eqnarray}
396: X+Y & = &
397:  \phi(\{x + y \mid x \in X \wedge y \in Y\}) \nonumber\\
398: X-Y & = &
399:  \phi(\{x - y \mid x \in X \wedge y \in Y\}) \nonumber\\
400: X*Y & = &
401:  \phi(\{x * y \mid x \in X \wedge y \in Y\}) \nonumber\\
402: X/Y & = &
403:  \phi(\{x / y \mid x \in X \wedge y \in Y\}) \nonumber
404: \end{eqnarray}        
405: 
406: Regarded as a set extension, the above definition of $X/Y$ is correct
407: and unambiguous: set extensions are defined just as well for partial
408: functions, functions that are not everywhere defined.  Yet many authors
409: have subjected it to the condition $0 \not\in Y$, making it useless in
410: practice.  Others have taken a less restrictive stance by changing the
411: definition to:
412: $$
413: X/Y = 
414: \phi(\{x / y \mid x \in X \wedge y \in Y \wedge y \not= 0\}).
415: $$
416: 
417: \paragraph{Relational definitions}
418: 
419: Ratz \cite{ratz96} has avoided such difficulties by using a relational form
420: of the above definitions. Although not necessary, this relational form
421: also makes it possible to define both addition and subtraction with the
422: same ternary relation $x+y=z$. This leads to an attractive
423: uniformity in the definition of the interval arithmetic operations.
424: 
425: \begin{definition}
426: \label{intArithm}
427: Let $X$ and $Y$ be non-empty floating-point intervals. Then interval
428: addition, subtraction, multiplication, and division are defined as
429: follows.
430: \begin{eqnarray}
431: X+Y & \stackrel{\rm def}{=} &
432:  \phi(\{z \mid \exists x \in X \wedge
433:                 \exists y \in Y.\; x+y=z\}) \nonumber\\
434: X-Y & \stackrel{\rm def}{=} &
435:   \phi(\{z \mid \exists x \in X \wedge
436:                  \exists y \in Y.\; z+y=x\}) \nonumber\\
437: X*Y & \stackrel{\rm def}{=} &
438:   \phi(\{z \mid \exists x \in X \wedge
439:                  \exists y \in Y.\; x*y=z\}) \nonumber\\
440: X \oslash Y & \stackrel{\rm def}{=} &
441:   \phi(\{z \mid \exists x \in X \wedge
442:                  \exists y \in Y.\; z*y=x\}) \nonumber
443: \end{eqnarray}
444: \end{definition}
445: 
446: We use the symbol $\oslash$ in $X \oslash Y$ here for interval division
447: rather than the $X/Y$ defined earlier. There is only a difference
448: between the two definitions when $\ob 0,0 \cb$ occurs as an operand.
449: For details, see \cite{hckvnmdn01}.  The difference is immaterial, as
450: intuition fails in these cases, anyway.
451: 
452: The operations thus defined form an interval arithmetic that is {\em
453: sound} in the sense that the resulting sets contain all the real
454: values they should contain according the set extension definition.
455: They are {\em closed} in the sense that they are defined for all
456: interval arguments and yield only interval results. Such an interval
457: arithmetic never yields an exception.
458: 
459: It remains to show that these definitions can be efficiently computed
460: by IEEE standard floating-point arithmetic while avoiding the undefined
461: floating-point operations
462: $\infty - \infty$, $\pm \infty / \pm \infty$, $0 * \pm
463: \infty$, and $0/0$.  This we do in the next sections.
464: 
465: \subsection{The algorithm for interval addition and subtraction}
466: 
467: \begin{theorem}
468: If $X=\ob a,b\cb $ and $Y=\ob c,d\cb $ are non-empty
469: floating-point intervals, then
470: $X+Y$ and $X-Y$ according to definition~\ref{intArithm} are equal to
471: $\ob (a+c)^-, (b+d)^+ \cb$ and
472: $\ob (a-d)^-, (b-c)^+\cb$, respectively. 
473: \end{theorem}
474: 
475: See \cite{hckvnmdn01}.
476: The interesting part of the proof takes into account that
477: adding $a$ and $c$ is undefined if they are infinities with opposite
478: signs. As, according to definition~\ref{brackets},
479: $a$ and $c$ are not $+\infty$, this cannot
480: happen. Similar reasoning shows that $b+d$ is always defined and that
481: the formula for subtraction cannot give an undefined result.
482: Thus, in interval addition and subtraction         
483: we achieve the ideal:
484: {\em Never a Nan}, and this without the need to test.
485: 
486: \subsection{The algorithm for interval multiplication}
487: If $\ob a,b\cb $ and $\ob c,d\cb $ are bounded, real
488: intervals, then
489: $$ \ob a,b\cb  * \ob c,d\cb  = \ob \min(S),\max(S)\cb,$$
490: where $S = \{a*c, a*d, b*c, b*d\}$.
491: 
492: This formula holds for real rather than floating-point intervals.  It
493: is several steps away from interval arithmetic.  When we allow the
494: bounds to be any floating-point number, we introduce the possibility
495: that they are infinite. In that case we need to be assured that all
496: four products in $S$ are defined.  Moreover, we want, as much as
497: possible, to perform only two multiplications, one for each bound.  The
498: above formula always requires four.
499: 
500: To attain these goals, we classify the intervals $\ob a,b\cb$ and $\ob
501: c,d\cb$ according to the signs of their elements, as shown in the table
502: in Figure~\ref{fig:class}.  This classification creates many cases in
503: which intervals can be multiplied with only one multiplication for each
504: bound.
505: 
506: \begin{figure}
507: \begin{tabular}{c||c|c|c|}
508: Class     & at least one & at least one & Signs of                 \\
509: 
510: of $\ob u,v\cb$   & negative     & positive     & endpoints
511:         \\
512: \hline \hline
513: $M$       &   yes   &   yes     &  $u<0 \wedge v>0$
514: \\
515: \hline
516: $Z$       &   no    &   no      &  $u = 0 \wedge v=0$        \\
517: \hline
518: $P$       &   no    &   yes     &  $u \geq 0 \wedge v > 0$        \\
519: \hline
520: $P_0$     &   no    &   yes     &  $u = 0 \wedge v > 0$        \\
521: \hline
522: $P_1$     &   no    &   yes     &  $u > 0 \wedge v > 0$        \\
523: \hline
524: $N$       &   yes   &   no     &    $u < 0 \wedge v \leq 0$      \\
525: \hline
526: $N_0$     &   yes   &   no     &    $u < 0 \wedge v = 0$      \\
527: \hline
528: $N_1$     &   yes   &   no     &    $u < 0 \wedge v < 0$      \\
529: \hline
530: \end{tabular}
531: \caption{Classification of nonempty intervals according to whether
532: they contain at least one real of the sign indicated at the top of the
533: second and third columns. Classes $P$ and $N$ are further decomposed
534: according to whether they have a zero bound.
535: As only non-empty intervals are classified, we have $u \leq v$.
536: }
537: \label{fig:class}
538: \end{figure}
539: 
540: The classification yields four cases (for multiplication the
541: subdivision of $P$ and $N$ do not matter) for each of the operands,
542: giving at first sight 16 cases. However, when at least one of the
543: operands classifies as $Z$, several cases collapse. As a result, we are
544: left with 11 cases.
545: 
546: \begin{theorem}
547: \label{multTheorem}
548: If $\ob a,b\cb $ and $\ob c,d\cb $ are real intervals, then
549: $ \ob a,b\cb  * \ob c,d\cb $
550: is a real interval whose endpoints are given by the expressions, to
551: be evaluated as extended reals, in Figure~\ref{multTable1}.
552: \end{theorem}
553: 
554: \begin{figure*}
555: \begin{center}
556: \begin{tabular}{|c|c|c|c|c|}
557: \hline
558: Class       & Class      & Left Endpoint     & Right Endpoint & Symmetry\\
559: of $\ob a,b\cb $  & of $\ob c,d\cb $ & of $\ob
560: a,b\cb
561: *\ob c,d\cb $ & of $\ob a,b\cb *\ob c,d\cb $ &
562: \\
563: \hline
564:    P        & P     & $a*c$       & $b*d$          & proved directly \\
565:    P        & M     & $b*c$       & $b*d$          & proved directly \\
566:    P        & N     & $b*c$       & $a*d$          & $x*y=-(x*-y)$\\
567: 
568:    M        & P     & $a*d$       & $b*d$          & $x*y=y*x$\\
569:    M        & M  & $\mn(a*d,b*c)$ & $\mx(a*c,b*d)$ & proved directly \\
570:    M        & N     & $b*c$       & $a*c$          & $x*y=-(x*-y)$\\
571: 
572:    N        & P     & $a*d$       & $b*c$          & $x*y=-(-x*y)$\\
573:    N        & M     & $a*d$       & $a*c$          & $x*y=-(-x*y)$\\
574:    N        & N     & $b*d$       & $a*c$          & $x*y=-(x*-y)$\\
575: 
576:    Z        & P,M,N,Z &   0         &   0          & proved directly\\
577:   P,M,N       & Z     &   0         &   0          & proved directly \\
578: \hline
579: \end{tabular}
580: \caption{Case analysis for multiplication of real intervals,
581: $\ob a,b\cb *\ob c,d\cb $.}
582: Results for floating-point intervals are obtained by performing the
583: lower-bound (upper-bound) computations rounded toward $-\infty$
584: ($+\infty$).
585: \label{multTable1}
586: \end{center}
587: \end{figure*}
588: 
589: In  \cite{hckvnmdn01} the cases indicated as such in the table in
590: Figure~\ref{multTable1} are proved directly. The other cases can be
591: proved by symmetry from the case proved already. The symmetries
592: applied are based on the identities $x*y=-(x*-y)$ or 
593: similar ones shown in the last column in the table.
594: 
595: The proofs first show the correctness of the scalar products for
596: bounded real intervals. To allow for floating-point intervals, which
597: can be unbounded, we have to consider whether the products are
598: defined.  Let us consider as example the top line according to which
599: $\ob a,b \cb * \ob c,d \cb = \ob a*c, b*d \cb$.  The undefined cases
600: occur when one operand is 0 and the other $\infty$. It is possible for
601: $a$ or $c$ to equal 0, but neither can be infinite: because of the
602: classification $P$, they cannot be $-\infty$; because of their being
603: lower bounds, they cannot be $+\infty$.
604: 
605: Let us now consider $b*d$. It is possible for $b$ or $d$ to equal
606: $+\infty$, but neither can be 0 because of the classification $P$.  One
607: may verify that in every case of the table in Figure~\ref{multTable1}
608: undefined values are avoided by a combination of definitions
609: \ref{brackets} and \ref{flptOrReal} and the classification of the case
610: concerned.
611: 
612: We need tests to identify the right case in the table anyway to
613: minimize the number of multiplications. We obtain as a bonus the
614: saving of tests to avoid undefined values.
615: Thus, in interval multiplication
616: we achieve the ideal:
617: {\em Never a Nan}, and this without the need to test.
618: 
619: \subsection{Division}
620: 
621: For interval multiplication the classification of the interval
622: operands in the classes $P$, $M$, $N$, and $Z$ is sufficient. For
623: interval division it turns out that the further subdivision of $P$
624: into $P_0$ and $P_1$ and of $N$
625: into $N_0$ and $N_1$ (see the table in figure~\ref{fig:class})
626: is relevant for the dividend.
627: 
628: \begin{theorem}
629: \label{divTheorem}
630: If $\ob a,b\cb $ and $\ob c,d\cb $ are real intervals, then $ \ob
631: a,b\cb  \oslash \ob c,d\cb $ is the least floating-point interval
632: containing the real interval whose endpoints are given as the ``general
633: formula'' column in Figure~\ref{divTable1} unless the specified
634: condition in the next column holds, in which case the result is given
635: by the exception case in column 5.
636: 
637: \end{theorem}
638: 
639: \begin{figure*}
640: \begin{center}
641: \begin{tabular}{|c|c|l|c|l|c|}
642: \hline
643: Class    & Class    & $\ob a,b\cb \oslash \ob c,d\cb $     &        & $\ob a,b\cb /\ob c,d\cb $  &  \\
644: of $\ob a,b\cb $ & of $\ob c,d\cb $ & general formula   &unless  & exception case &  \\
645: \hline
646:   $P_1$     & $P$   & $\ob a/d,b/c\cb  \setminus \{0\}$  & $c=0$   & $\ob a/d,\infty\cb \setminus\{0\}  $ &$D$ \\
647:   $P_0$     & $P$   & $\ob 0,b/c\cb $                    & $c=0$   & $\ob -\infty,\infty\cb                   $ &$D$ \\
648:   $M$       & $P$   & $\ob a/c,b/c\cb $                  & $c=0$   & $\ob -\infty,\infty\cb             $ &$D$ \\
649:   $N_0$     & $P$   & $\ob a/c,0\cb $                    & $c=0$   & $\ob -\infty,\infty\cb                  $ &$S_2$\\
650:   $N_1$     & $P$   & $\ob a/c,b/d\cb  \setminus \{0\}$  & $c=0$   & $\ob -\infty,b/d\cb \setminus \{0\}$ &$S_2$\\
651: 
652: 
653:   $P_1$     & $M$   & $(\ob -\infty,a/c\cb \cup\ob a/d,\infty\cb )\setminus \{0\}$  &         &           &$D$ \\
654:   $P_0$     & $M$   & $\ob -\infty,+\infty\cb $          &         &                                &$D$ \\
655:   $M$       & $M$   & $\ob -\infty,+\infty\cb $          &         &                                &$D$ \\
656:   $N_0$     & $M$   & $\ob -\infty,+\infty\cb $          &         &                                &$S_2$\\
657:   $N_1$     & $M$   & $(\ob -\infty,b/d\cb \cup\ob b/c,\infty\cb ) \setminus \{0\}$  &         &                                &$S_2$\\
658: 
659:   $P_1$     & $N$   & $\ob b/d,a/c\cb  \setminus \{0\}$  & $d=0$   & $\ob -\infty,a/c\cb \setminus\{0\} $ &$S_1$\\
660:   $P_0$     & $N$   & $\ob b/d,0\cb $                    & $d=0$   & $\ob -\infty,\infty\cb                  $ &$S_1$\\
661:   $M$       & $N$   & $\ob b/d,a/d\cb $                  & $d=0$   & $\ob -\infty,\infty\cb             $ &$S_1$\\
662:   $N_0$     & $N$   & $\ob 0,a/d\cb $                    & $d=0$   & $\ob -\infty,\infty\cb                   $ &$S_2$\\
663:   $N_1$     & $N$   & $\ob b/c,a/d\cb  \setminus \{0\}$  & $d=0$   & $\ob b/c,\infty\cb \setminus\{0\}  $ &$S_2$\\
664:   $Z$     & $P_1,N_1$ & $\ob 0,0 \cb$                       &      & 
665:                             &     \\
666:   $Z$ & $P_0,M,N_0,Z$ & $\ob -\infty,+\infty \cb$           &      & 
667:                             &     \\
668:   $P_1,N_1$ & $Z$     & $\emptyset$                         &      &
669:                             &     \\
670:   $P_0,M,N_0,Z$ & $Z$ & $\ob -\infty,+\infty \cb$           &      &
671:                             &     \\
672: \hline
673: \end{tabular}
674: \caption{Case analysis for relational division of real intervals, $\ob
675: a,b\cb /\ob c,d\cb $ when $a \leq b$, $c \leq d$.
676: The last column refers to how the formula has been
677: proved (``$D$'' for a direct proof, ``$S_1$'' and ``$S_2$'' refer to a
678: symmetry used to reduce it to an earlier case.) The ``class'' labels,
679: $N,N_1,N_0,M,P_0,P_1,P$ are as in Figure \ref{fig:class}.
680: }
681: \label{divTable1}
682: \end{center}
683: \end{figure*}
684: 
685: In  \cite{hckvnmdn01} the cases indicated as such in the table in
686: Figure~\ref{divTable1} are proved directly. The other cases can be
687: proved by symmetry from the case proved already. The symmetries
688: used are based on the identities $x/y = -(x/-y)$ (indicated as $S_1$)
689: and $x/y = -(-x/y)$ (indicated by $S_2$).
690: 
691: The proofs first show the correctness of the scalar products for
692: bounded real intervals. To allow for floating-point intervals, which
693: can be unbounded, we have to consider whether the products are defined.
694: In the column labelled ``unless'' we find the values for which an
695: undefined value occurs. In the ``exception case'' column we find the
696: correct value for the exception case.
697: {\em In every case, evaluating the formula in the third column in IEEE
698: standard floating-point arithmetic in the exception case is defined
699: and gives the infinity of the right sign,} as shown in column 5.
700: This property depends on a zero
701: lower bound being $+0$ and a zero upper bound being $-0$, as required by
702: definition~\ref{flptOrReal}.
703: 
704: Let us now consider potentially undefined cases. In case of division
705: these are $\infty/\infty$ and $0/0$. Consider for example the top 
706: line according to which
707: $\ob a,b \cb \oslash \ob c,d \cb = \ob a/d, b/c \cb \setminus \{0\}$.
708: Because of the classification $P_1$, $a$ can be neither infinite nor
709: zero. This ensures that $a/d$ is defined.
710: Because of the $P_1$ classification, $b$ cannot be zero.
711: It is possible for $b$ to be infinite, but not for $c$ because of the
712: $P$ classification.
713: This ensures that $b/c$ is defined.
714: 
715: One may verify that in every case of the table in
716: Figure~\ref{divTable1} undefined values are avoided by a combination
717: of definition~\ref{flptOrReal} and the classification of the case concerned.
718: Thus, in relational interval division
719: we achieve the ideal:
720: {\em Never a Nan}, and this without the need to test.
721: 
722: \section{Related work}
723: For most of the time since the beginning of interval arithmetic, two
724: systems have coexisted.
725: One was the official one, where intervals were bounded, and division
726: by an interval containing zero was undefined.
727: Recognizing the unpracticality of this approach, there was also a
728: definition of ``extended'' interval arithmetic
729: \cite{khn68}
730: where these limitations
731: were lifted. Representative of this state of affairs are the
732: monographs by Hansen \cite{hnsn92} and Kearfott \cite{krftt96}.
733: However, here the specification of interval division is quite far from an
734: efficient implementation that takes advantage of the IEEE floating-point
735: standard. The specification is indirect via multiplication by
736: the interval inverse. There is no consideration of the possibility of
737: undefined operations: presumably one is to perform a test before each
738: operation.
739: 
740: Steps beyond this were taken by Older \cite{ldr89ias} in connection
741: with the development of BNR Prolog. A different approach has been taken
742: by Walster \cite{walster98}, who pioneered the idea that intervals are
743: sets of values rather than abstract elements of an interval algebra.
744: In Walster shares our objective to obtain a closed system of arithmetic
745: without exceptions. He attains this objective in a different way: by
746: including the infinities among the possible values of the variables. In
747: our approach, the variables can only take reals as values; the
748: infinities are only used for the representation of unbounded sets of
749: reals. In this way, the conventional framework of calculus, where
750: variables are restricted to the reals, needs no modification.
751: 
752: \section{Conclusions}
753: 
754: We have presented the result of some recent developments in interval
755: arithmetic that lead to a system with the following properties.
756: 
757: \begin{itemize}
758: \item
759: {\em Correctness}
760: The interval operations are such that their result includes
761: all real numbers that are
762: possible as values of the variables according to the mathematical
763: model.
764: 
765: \item
766: {\em Freedom of exceptions}
767: No floating-point operation needs raise an exception.
768: All divisions by zero are
769: defined and give the correct result: an infinity of the correct
770: sign. This is achieved by a  zero lower (upper) bound being $+0$
771: ($-0$). Mathematically speaking, the system is a closed interval
772: algebra. We do not emphasize the algebra aspect, because it is not
773: important whether it has any interesting properties.
774: Other approaches have limited the applicability of interval arithmetic
775: in their pursuit of a presentable algebra.
776: 
777: \item
778: {\em Efficiency}
779: The system is efficient in that tests are only needed to determine the
780: right case in the tables in Figures \ref{multTable1} and
781: \ref{divTable1}.  Tests are not necessary to avoid exceptions.
782: 
783: \end{itemize}
784: 
785: \noindent
786: These properties lead to several observations about the
787: floating-point standard from the point of view of interval arithmetic:
788: 
789: \begin{itemize}
790: \item
791: {\em Exceptions}
792: Freedom from exceptions has interesting implications for the standard.
793: A considerable part of the definition effort, and presumably also of
794: the implementation effort, is concerned with defining, signaling, and
795: trapping exceptions caused by overflow, underflow and undefined
796: operations.  A processor where the floating-point arithmetic is
797: interval arithmetic can omit this as unnecessary ballast.
798: 
799: Let us review the five exceptions. {\em Invalid Operation} is
800: prevented by the design of the algorithms.
801: {\em Division by Zero} does occur in our interval arithmetic and is
802: designed to yield the correct result. So it should not be an
803: exception.
804: {\em Overflow} occurs in the sense that a real $x$ can result in real
805: arithmetic such that $\phi(x)$ is the interval between the greatest
806: finite floating-point number and $+\infty$. This result is
807: mathematically correct and therefore the desired one.
808: There is no reason to terminate computation: it should
809: not be an exception.
810: {\em Underflow} means that a lower bound zero is substituted for a
811: nonzero bound with very small absolute value. This is correct and no
812: reason to terminate computation.
813: {\em Inexact} result: this might be of some use, but is certainly not
814: essential for interval arithmetic.
815: 
816: \item
817: {\em Signed zeros}
818: Often signed zeros are regarded as an unavoidable, but regrettable
819: artifact of the sign-magnitude format of floating-point numbers. 
820: It is fortunate that the drafters of the standard have nonetheless
821: taken them seriously and defined sensible conventions for operations
822: involving zeros. Especially having the right sign of a zero bound
823: turns out to be useful in interval division.
824: 
825: \item
826: {\em Denormalized numbers}
827: %There has been a considerable amount of debate on the utility of
828: %denormalized numbers. They require a considerable amount of
829: %implementation effort, or are relegated to microcode.  From the point
830: of view of interval arithmetic, denormalized numbers seem to be neither
831: useful nor harmful.  It is different from the point of view of interval
832: constraints.  This a method \cite{bnldr97,vhlmyd97} for using interval
833: arithmetic to solve systems of constraints with real-valued variables.
834: Interval arithmetic is used for the basic operations in constraint
835: propagation. This is an iteration that can be slowed down by
836: denormalized numbers when the limit is zero, even when operations on
837: denormalized numbers are performed at normal speed. Thus the presence
838: of denormalized numbers only plays a role as a performance bug that occurs
839: gratuitously, and fortunately rarely, in this special case.
840: 
841: An argument that is advanced in favour of denormalized numbers is that
842: it justifies compiler optimizations that rely on
843: certain mathematical equivalences that hold only in the presence of
844: denormalized numbers.
845: This is of no interest from the point of view of interval constraints.
846: Any mathematically correct transformation can be performed on
847: the set of constraints without changing the set of solutions obtained
848: by a correctly implemented interval constraint system.
849: This correctness is not dependent on the presence of denormalized
850: numbers. In fact, it only depends on the finite floating-point numbers
851: being {\em some} subset $F$ of the reals, as described in this paper. 
852: Because of this independence, elaborate symbolic processing far beyond
853: currently contemplated compiler optimizations is taken for granted in
854: interval constraints.
855: \end{itemize}
856: 
857: \section{Acknowledgments}
858: Many thanks to Belaid Moa for pointing out errors.
859: We acknowledge generous support from the Natural Science and
860: Engineering Research Council NSERC.
861: 
862: \begin{thebibliography}{10}
863: 
864: \bibitem{bnldr97}
865: Fr\'ed\'eric Benhamou and William~J. Older.
866: \newblock Applying interval arithmetic to real, integer, and {B}oolean
867:   constraints.
868: \newblock {\em Journal of Logic Programming}, 32:1--24, 1997.
869: 
870: \bibitem{hnsn92}
871: Eldon Hansen.
872: \newblock {\em Global Optimization Using Interval Analysis}.
873: \newblock Marcel Dekker, 1992.
874: 
875: \bibitem{vhlmyd97}
876: Pascal~Van Hentenryck, Laurent Michel, and Yves Deville.
877: \newblock {\em Numerica: A Modeling Language for Global Optimization}.
878: \newblock MIT Press, 1997.
879: 
880: \bibitem{hckvnmdn01}
881: T.~Hickey, Q.~Ju, and M.H. van Emden.
882: \newblock Interval arithmetic: from principles to implementation.
883: \newblock {\em Journal of the ACM}, 48(5).
884: \newblock Sept. 2001.
885: 
886: \bibitem{khn68}
887: W.M. Kahan.
888: \newblock A more complete interval arithmetic.
889: \newblock Technical report, University of Toronto, Canada, 1968.
890: 
891: \bibitem{krftt96}
892: R.~Baker Kearfott.
893: \newblock {\em Rigorous Global Search: Continuous Problems}.
894: \newblock Kluwer Academic Publishers, 1996.
895: \newblock Nonconvex Optimization and Its Applications.
896: 
897: \bibitem{moore66}
898: Ramon~E. Moore.
899: \newblock {\em Interval Analysis}.
900: \newblock Prentice-Hall, 1966.
901: 
902: \bibitem{ldr89ias}
903: W.J. Older.
904: \newblock Interval arithmetic specification.
905: \newblock Technical report, Bell-Northern Research Computing Research
906:   Laboratory, 1989.
907: 
908: \bibitem{ratz96}
909: D.~Ratz.
910: \newblock On extended interval arithmetic and inclusion isotonicity.
911: \newblock Technical report, Institut f\"ur Angewandte Mathematik, Universit\"at
912:   Karlsruhe, 1996.
913: 
914: \bibitem{walster98}
915: G.~William Walster.
916: \newblock The extended real interval system.
917: \newblock available on the internet, 1998.
918: \newblock http://www.mscs.mu.edu/~globsol/readings.html.
919: 
920: \end{thebibliography}
921: 
922: \end{document}
923: