Next: Distribution and Development, Previous: Acknowledgments, Up: Preface [Contents]
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.
plus | log | pow | mtimes | mtimes | inv | |
---|---|---|---|---|---|---|
Interval matrix size | tightest accuracy | tightest accuracy | tightest accuracy | valid accuracy | tightest accuracy | valid accuracy |
10 × 10 | < 0.001 | 0.001 | 0.008 | 0.001 | 0.002 | 0.025 |
100 × 100 | 0.003 | 0.055 | 0.61 | 0.012 | 0.53 | 0.30 |
500 × 500 | 0.060 | 1.3 | 15 | 0.30 | 63 | 4.2 |
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: Distribution and Development, Previous: Acknowledgments, Up: Preface [Contents]