point formats: binary32, binary64, binary128, decimal64, and decimal128;
or (ii) it is functionally indistinguishable from case (i).
(3) The relation between a floating point format and its interval format
shall be as defined in 7 and 8 below.
(4) There shall be conversions between any two supported interval
formats, as defined in 9a below.
(5) An implementation shall specify a set of "interval-supported
elementary functions" (Definition D7). For any such function and any
supported format F there shall be an interval version of that function
in that format, which shall enclose the sharp interval F-extension of
that function as defined in 9b below, but is otherwise not specified by
this motion.
This motion also leaves it open whether every point elementary function
(Definition D3) is interval-supported.
(6) A 754-conforming implementation may provide other interval formats
beside the basic five, and appropriate conversions and operations: for
instance, in variable-precision arithmetic.
(7) An implementation may provide more than one interval elementary
function in a given format: for instance, to offer different trade-offs
between speed and tightness.
Constraint: Items (3,4,5) above ensure that the Basic Theorem of
Interval Arithmetic (BTIA) holds for mixed-format calculation in any
conforming implementation, as outlined in 10, 11 below. The BTIA is
fundamental to interval computation; therefore, an amendment to this
motion is only acceptable if it preserves the BTIA.
This motion does not cover:
- What elementary functions shall be, or are recommended to be, provided by
an implementation.
- Issues of the construction of intervals, from real numbers, text
strings, etc.
- Issues of definition of real-valued functions of intervals, such as
whether
finding the midpoint of the whole line should return NaN, or generate an
exception, etc.
- Issues of tightness of enclosure, as in the 'accuracy modes' of
Vienna§3.2.
- Flags, exceptions or other means of signalling that an elementary
function
has been evaluated outside its domain.
===Rationale===
===============
This divides into Foundations; Terminology; Definitions; Introduction;
Level 1 description; and Level 2 description.
Foundations.
------------
Motion 2 and the associated position paper, defining a levels structure
as a guideline for the standard.
Motion 3, which defines P1788's number system and set of intervals.
Terminology.
------------
754§X denotes section X in the standard IEEE754-2008. Vienna§X stands
for section X in the final version of the Vienna proposal, 19 December
2008.
Definitions.
------------
[Note. These are intended to be part of a standard set of definitions,
abbreviations and acronyms of this standard, similar to 754§2. I have
not yet put them in any systematic order.]
We believe the concepts given here, though general, are easily grasped
and easily taught. They show that the theoretical difficulties of
mixed-format interval computation are none, and the practical
difficulties -- illustrated by the example in 10 below -- are minor.
The notation used is similar to that of the Vienna proposal, which is
suitable for a plain-text document such as this. I believe the
functionality defined below is essentially what the Vienna proposal
defines, or rather what it would define if it supported mixed-format
computation explicitly: see the end of Vienna§1.1.
I have avoided the Vienna terms "L-numeral" and "B-numeral", which are
valuable notions but place an emphasis on representations that I think
is unnecessary in this context.
I believe there is nothing in this motion and the theory below that
hinders the implementation of various forms of non-standard intervals --
Kahan, modal, etc. -- as discussed at the end of Vienna§1.2.
Level 1 description.
--------------------
This section recapitulates what has already been decided.
1. R is the set of reals. R* is the set of extended reals
R* = R union {-oo, +oo},
where we use -oo and +oo to denote negative and positive infinity.
Following 754, any member of R* is called a number: it is a "finite
number"
if it is in R, else an "infinite number".
2. Following Motion 3, the set of "textbook" intervals (Vienna§1.2) in R,
denoted IR, comprises the empty set together with all intervals
x = { x in R | xlo <= x <= xhi } (*)
where xlo <= xhi, -oo <= xlo < +oo, -oo < xhi <= +oo.
Following standard mathematical notation, the interval (*) is denoted
[xlo, xhi] if xlo and xhi are finite, but denoted (-oo, xhi] or [xlo,
+oo)
or (-oo, +oo) in the case of infinite endpoints, to indicate that -oo
and/or +oo is not a member of the set.
The empty set is denoted by Empty. The whole of R is denoted by Entire.
3. The (interval) hull of an arbitrary subset ss of R, written hull(ss),
is the
smallest member of IR that contains ss.
4. A "point function" is a (possibly partial) multivariate real
function: that is,
a mapping f from a subset D of R^n to R^m for some integers n,m >= 0.
(When n=0
and m=1, we have a "named real constant".)
When not otherwise specified, a scalar function is assumed, i.e. m=1.
If m>1,
the function is called a vector function.
D = D_f is the domain of f.
To specify n, call f an "n-variable point function", or denote f as
f(x_1, ..., x_n).
The "range" (or "exact range") of f over an arbitrary subset ss of R^n
is the
set
range(f, ss) = {f(x) | x in ss and x in D_f}.
Note. Here, f is a mapping, not an expression. Expressions are dealt
with in
11 below.
5. Unless otherwise specified, an "interval function" is a mapping ff from
(IR)^n to (IR)^m for some n >= 0. To specify n, call ff an "n-variable
interval function", or denote ff as
ff(xx_1, ..., xx_n).
As with point functions, m=1 is assumed unless specified otherwise.
An interval function is "algebraic" if it is an interval extension of
some
point function, as defined next. Examples of non-algebraic functions are
the interval hull and intersection functions.
Given an n-variable point function f, an "interval extension" of f is any
interval function ff such that
ff(ss) contains range(f,ss) for any subset ss of R^n.
The "sharp interval extension" of f is defined by
ff(ss) = hull(range(f,ss)) for any subset ss of R^n.
Equivalently, for the case where ff has separate arguments ss_1, ...,
ss_n,
each being a subset of R, an interval extension satisfies
ff(ss) contains range(f,ss_1, ..., ss_n),
and the sharp interval extension satisfies
ff(ss_1, ..., ss_n) = hull(range(f,ss_1, ..., ss_n)),
for any ss_1, ..., ss_n.
This is an alternative notation for the case where ss is the cartesian
product of the ss_i.
In particular, when f is a binary operator "op" written in infix
notation,
this gives the familiar definition of its (sharp) interval extension as
xx op yy = hull({x op y | x in xx, y in yy, and x op y is defined}).
Notes.
- Example. With these definitions
xx*{0} = {0} and xx/{0} = Empty for any nonempty interval xx.
- All interval functions used here are automatically defined for all
arguments (e.g. sqrt([-1,4]) = [0,2], sqrt([-2,-1]) = Empty). It is
left
open what exceptional action may be taken by an implementation on
evaluating ff(ss), when ff is an extension of a point function f, and
ss is not a subset of D_f.
Level 2 description.
--------------------
6. A floating point "abstract format" ("aformat") F is a finite subset
of R*
such that at least -oo and +oo are elements of F.