Interval package: Difference between revisions

Jump to navigation Jump to search
257 bytes removed ,  11 January 2015
Added library dependency for GNU MPFR
(→‎What to expect: added notes on speed and accuracy)
(Added library dependency for GNU MPFR)
Line 1: Line 1:
The [https://sourceforge.net/p/octave/interval/ interval package] provides data types and fundamental operations for real valued interval arithmetic based on the common floating-point format “binary64” a. k. a. double-precision.  It aims to be standard compliant with the (upcoming) [http://standards.ieee.org/develop/project/1788.html IEEE 1788] and therefore implements the ''set-based'' interval arithmetic flavor.  '''Interval arithmetic''' produces mathematically proven numerical results.
The [https://sourceforge.net/p/octave/interval/ interval package] provides data types and fundamental operations for real valued interval arithmetic based on the common floating-point format “binary64” a. k. a. double-precision.  It aims to be standard compliant with the (upcoming) [http://standards.ieee.org/develop/project/1788.html IEEE 1788] and therefore implements the ''set-based'' interval arithmetic flavor.  '''Interval arithmetic''' produces mathematically proven numerical results.


Warning: The package has not yet been released. If you want to experience the development version, you may (1) install the (currently deprecated) [http://octave.sourceforge.net/fenv/ fenv package], (2) download a [https://sourceforge.net/p/octave/interval/ci/default/tarball snapshot version of the interval package], (3) navigate to the <code>inst/</code> subfolder and run octave.
Warning: The package has not yet been released. If you want to experience the development version, you may (1) install the (currently deprecated) [http://octave.sourceforge.net/fenv/ fenv package], (2) download a [https://sourceforge.net/p/octave/interval/ci/default/tarball snapshot version of the interval package], (3) install the [http://www.mpfr.org/mpfr-current/#download development library of MPFR] for your system, (4) execute <code>make install</code> in the <code>src/</code> subfolder, (5) navigate to the <code>inst/</code> subfolder and run octave.


== Motivation ==
== Motivation ==
Line 43: Line 43:


== What to expect ==
== What to expect ==
The interval arithmetic provided by this interval package is '''slow''' and several functions compute valid enclosures of exact results, but are '''not accurate'''.
The interval arithmetic provided by this interval package is '''slow''', but '''accurate'''.


''Why is the interval package slow?''
''Why is the interval package slow?''
Line 52: Line 52:
Great algorithms and optimizations exist for matrix arithmetic in GNU octave. Good interval versions of these still have to be found and implemented.
Great algorithms and optimizations exist for matrix arithmetic in GNU octave. Good interval versions of these still have to be found and implemented.


''Why is the interval package not accurate?''
''Why is the interval package accurate?''
Some basic operations are provided with best possible accuracy, i. e., tightest results. Some arithmetic functions are not. Again, this is because interval operations are based on C99 floating-point routines. The latter are not guaranteed to be accurate and their results can depend on hardware, system libraries and compilation options. [http://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html#Errors-in-Math-Functions]
Some basic operations are provided by the C library with directed rounding and correctly rounded result: plus, minus, division, multiplication and square root. These are used to build the most basic interval functions.


The most complete and conservative information on worst-case error boundaries of floating-point routines has been found in a [http://www.lehman.cuny.edu/cgi-bin/man-cgi?libm+3 man page for a C99 implementation on SunOS] and is assumed to hold for all systems where the interval package is used. Worst-case error estimations are added to the results of several interval arithmetic operations, which decreases their accuracy but tries to make the results contain the correct answer.
All other GNU Octave arithmetic functions are not guaranteed to produce accurate results, because they are based on C99 floating-point routines [http://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html#Errors-in-Math-Functions]. Their results depend on hardware, system libraries and compilation options. The interval package handles these functions with the help of the [http://www.mpfr.org/ GNU MPFR library]. With MPFR it is possible to compute valid and tight enclosure of the correct results.
 
Possibly, the accuracy is going to be improved in a future release with the [http://sourceforge.net/p/octave/multi-precision/ multi-precision package] or a similar approach.


== Quick start introduction ==
== Quick start introduction ==
240

edits

Navigation menu