48

edits

Insert Category:Packages

The GNU Octave interval package for real-valued [https://~~sourceforge~~en.~~net~~wikipedia.org/~~p/octave~~wiki/Interval_arithmetic interval~~/ interval package~~arithmetic] ~~provides data types and fundamental operations for ~~.* Intervals are closed, connected subsets of the real ~~valued interval arithmetic based on the common floating-point format “binary64” a. k~~numbers.~~ a. double-precision. It aims to ~~Intervals may be ~~standard compliant with the ~~unbound (~~upcoming~~in either or both directions) ~~[http://standards~~or empty.~~ieee.org~~In special cases <code>+inf</~~develop~~code> and <code>-inf</~~project/1788~~code> are used to denote boundaries of unbound intervals, but any member of the interval is a finite real number.~~html IEEE 1788] and therefore implements the ~~* Classical functions are extended to interval functions as follows: The result of function f evaluated on interval x is an interval '''enclosure of all possible values'~~set-based~~'' of f over x where the function is defined. Most interval arithmetic ~~flavor~~functions in this package manage to produce a very accurate such enclosure. ~~ '''Interval ~~* The result of an interval arithmetic~~''' produces mathematically proven numerical results~~function is an interval in general. It might happen, that the mathematical range of a function consist of several intervals, but their union will be returned, e. g., 1 / [-1, 1] = [Entire].

== ~~Motivation ~~Distribution ==* [https://octave.sourceforge.io/interval/ Latest version at Octave Forge]** <code>pkg install -forge interval</code>** [https://octave.sourceforge.io/interval/overview.html function reference]** [https://octave.sourceforge.io/interval/package_doc/index.html package documentation] (user manual)'''Third-party'''* [https://tracker.debian.org/pkg/octave-interval Debian GNU/Linux], [https://launchpad.net/ubuntu/+source/octave-interval Launchpad Ubuntu]* [https://aur.archlinux.org/packages/octave-interval/ archlinux user repository]* Included in [https://ftp.gnu.org/gnu/octave/windows/ official Windows installer] and installed automatically with Octave (since version 4.0.1)* [https://github.com/macports/macports-ports/tree/master/math/octave-interval/ MacPorts] for Mac OS X* [https://www.freshports.org/math/octave-forge-interval/ FreshPorts] for FreeBSD* [https://cygwin.com/cgi-bin2/package-grep.cgi?grep=octave-interval Cygwin] for Windows* [https://build.opensuse.org/package/show/science/octave-forge-interval openSUSE build service]

=== Octave Forge simp package ===In 2008/2009 there was a Single Interval ~~arithmetic addresses above problems in its very special way and introduces new possibilities ~~Mathematics Package (SIMP) for ~~algorithms. For example~~Octave, ~~the [http://en.wikipedia.org/wiki/Interval_arithmetic#Interval_Newton_method interval newton method] is able to find ''all'' zeros of a particular function~~which has eventually become unmaintained at Octave Forge.

== ~~Quick start introduction ~~=INTLAB ===This interval package is ''not'' meant to be a replacement for INTLAB and any compatibility with it is pure coincidence. Since both are compatible with GNU Octave, they happen to agree on many function names and programs written for INTLAB may possibly run with this interval package as well. Some fundamental differences that I am currently aware of:* INTLAB is non-free software, it grants none of the [http://www.gnu.org/philosophy/free-sw.html four essential freedoms] of free software* INTLAB is not conforming to IEEE Std 1788-2015 and the parsing of intervals from strings uses a different format—especially for the uncertain form* INTLAB supports intervals with complex numbers and sparse interval matrices, but no empty intervals* INTLAB uses inferior accuracy for most arithmetic operations, because it focuses on speed* Basic operations can be found in both packages, but the availability of special functions depends

|-

| ~~com<br/>~~disjoint (~~common~~a, b)| ~~style="text-align: center" | ✓~~~~| style="text-align: center" | ✓~~~~| style="text-align: center" | ✓~~~~| '''''x''''' is ~~emptyintersect (a ~~bounded~~, ~~nonempty subset of Dom(''f''); ''f'' is continuous at each point of '''''x'''''; and the computed interval ''f''('''''x'''''~~b) ~~is bounded~~

|-

| ~~dac<br/>~~hdist (~~defined & continuous~~a, b)|~~| style="text-align: center" | ✓~~~~| style="text-align: center" | ✓~~~~| '''''x''''' is ~~qdist (a ~~nonempty subset of Dom(''f''~~, b)~~; and the restriction of ''f'' to '''''x''''' is continuous~~

|-

| ~~def<br/>~~disp (~~defined~~x)|~~|~~~~| style="text-align: center" | ✓~~~~| '''''~~disp2str (x~~''''' is a nonempty subset of Dom(''f''~~)

|-

| ~~trv<br/>~~infsup (~~trivial~~s)|~~|~~~~|~~~~| always true ~~str2intval (~~so gives no information~~s)

|-

| ~~ill<br/>~~isa (~~ill-formed~~x, "infsup")|~~|~~~~|~~~~| Not an interval, at least one interval constructor failed during the course of computation~~isintval (x)

|}

=== ~~Arithmetic operations ~~Build ===The ~~interval packages comprises many interval arithmetic operations~~repository contains a Makefile which controls the build process. ~~Function names match GNU ~~Some common targets are:* <code>make release</code> Create a release tarball and the HTML documentation for [[Octave ~~standard functions where applicable, and follow recommendations by IEEE 1788 otherwise~~Forge]] (takes a while). ~~It is possible ~~* <code>make check</code> Run the full test-suite to ~~look up all ~~verify that code changes didn't break anything (takes a while).* <code>make run</code> Quickly start Octave with minimal recompilation and functions ~~by their corresponding IEEE 1788 name in ~~loaded from the ~~index {{Citation needed}}~~workspace (for interactive testing of code changes).

if (not (isa (x, "infsupdec"))) x =~~== Numerical operations ===~~infsupdec (x); endif~~Some operations on intervals do ~~ if (not ~~return an interval enclosure~~(isa (y, ~~but a single number. Most important are <code>inf</code> and <code>sup</code>, which return the interval boundaries in double precision.~~"infsupdec"))) y = infsupdec (y); endif

==== 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. ~~octave:1> infsup ~~function x = plus (~~1~~x, ~~3~~y) ~~<~~ ... parameter checking ... l = ~~infsup ~~mpfr_function_d (~~2~~'plus', ~~4~~-inf, x.inf, y.inf); u = mpfr_function_d ('plus', +inf, x.sup, y.sup); ~~ans ~~ emptyresult = isempty (x) | isempty (y); l(emptyresult) = inf; u(emptyresult) = -inf; … ~~1~~endfunction

==~~= Error handling =~~VERSOFT ==~~Due to the nature of set-based interval arithmetic, you should never observe errors during computation~~The [http://uivtx.cs.cas. ~~If you do, there either is ~~cz/~rohn/matlab/ VERSOFT] software package (by Jiří Rohn) has been released under a ~~bug in ~~free software license (Expat license) and algorithms may be migrated into the ~~code or there are unsupported data types~~interval package.

[[Category:Octave~~-~~Forge]][[Category:Packages]]

48

edits

Retrieved from "https://wiki.octave.org/Special:MobileDiff/5171...11760"