Changes

Jump to navigation Jump to search

Interval package

330 bytes added, 12:32, 1 March 2017
m
Updated vectorization examples to the current version of the package
** No known bugs. The package is quite new and still has a small user base, so there might be hidden bugs. Also some advanced functions will always need more testing.
* Portability
** Runs in GNU Octave 3.8.2 and 4.0.0
** Known to run under GNU/Linux, Microsoft Windows, Mac OS X and FreeBSD
* Possible TODOs
==== Use of Octave functions ====
Octave functions may be used as long as they don't introduce arithmetic errors. For example, the ceil function can be used safely since it is exact on binary64 numbers.
function result x = ceil (x)
... parameter checking ...
result x.inf = infsup (ceil (x.inf), ; x.sup = ceil (x.sup));
endfunction
 
If Octave functions would introduce arithmetic/rounding errors, there are interfaces to MPFR (<code>mpfr_function_d</code>) and crlibm (<code>crlibm_function</code>), which can produce guaranteed boundaries.
 
==== Vectorization & Indexing ====
All functions should be implemented using vectorization and indexing. This is very important for performance on large data. For example, consider the plus function. It computes lower and upper boundaries of the result (x.inf, y.inf, x.sup, y.sup may be vectors or matrices) and then uses an indexing expression to adjust values where empty intervals would have produces problematic values.
function result x = plus (x, y)
... parameter checking ...
l = mpfr_function_d ('plus', -inf, x.inf, y.inf);
l(emptyresult) = inf;
u(emptyresult) = -inf;
result = infsup (l, u);
endfunction
== VERSOFT ==
The [http://uivtx.cs.cas.cz/~rohn/matlab/ VERSOFT] software package (by Jiří Rohn) has been released under a free software license (Expat license) and algorithms may be migrated into the interval package.
 
The following table is no longer up-to-date, it describes the situation before p-coded files have been disclosed. So, some functions are no longer trapped.
{|
240

edits

Navigation menu