Next: , Previous: , Up: Preface   [Contents]


Philosophy

Features

Limitations

The interval arithmetic provided by the interval package focuses on easy usage, accuracy and correctness. It is rather slow compared to other arithmetic libraries.

If accurate type checking during compile time—a substantial feature for verified computing—is needed, the user is advised to try third-party interval libraries for strongly typed programming languages like C/C++. The interval package for GNU Octave can nonetheless be used for prototyping of interval algorithms.

Why is the interval package slow? All arithmetic interval operations are simulated in high-level Octave language using C99 or multi-precision floating-point routines, which is a lot slower than a hardware implementation. Building interval arithmetic operations from floating-point routines is easy for simple monotonic functions, e. g., addition and subtraction, but is complex for others, e. g., interval power function, atan2, or reverse functions.

For some interval operations it is not even possible to rely on floating-point routines, since not all required routines are available in C99 or BLAS. For example, accurate multiplication of matrices with many elements becomes unfeasible as it takes a lot of time.

pluslogpowmtimesmtimesinv
Interval
matrix size
tightest
accuracy
tightest
accuracy
tightest
accuracy
valid
accuracy
tightest
accuracy
valid
accuracy
10 × 10< 0.0010.0010.0080.0010.0020.025
100 × 1000.0030.0550.610.0120.530.30
500 × 5000.0601.3150.30634.2

Table 1: Approximate runtime for certain functions (wall clock time in seconds) — Results have been produced with GNU Octave 3.8.2 and Interval package 0.1.4 on an Intel Core i5-4340M CPU (2.9–3.6 GHz)

Why is the interval package accurate? The GNU Octave built-in floating-point routines are not useful for interval arithmetic: Their results depend on hardware, system libraries and compilation options. The interval package handles all arithmetic functions with the help of the GNU MPFR library. With MPFR it is possible to compute system-independent, valid and tight enclosures of the correct results for most functions. However, it should be noted that some reverse operations and matrix operations do not exists in GNU MPFR and therefore cannot be computed with the same accuracy.

It is possible to use faster (BLAS based) routines during computation of the matrix multiplication @infsup/mtimes, because correctly rounded matrix multiplication could be considered too slow for certain applications. However, this is not the default behavior and must be explicitly activated by the user.


Next: , Previous: , Up: Preface   [Contents]