Interval package: Difference between revisions

385 bytes removed ,  5 February 2015
m
→‎Arithmetic operations: Added link and removed highlight for fma
m (→‎IEEE 1788 Index: fixed case)
m (→‎Arithmetic operations: Added link and removed highlight for fma)
Line 252: Line 252:


=== Arithmetic operations ===
=== Arithmetic operations ===
The interval packages comprises many interval arithmetic operations. Function names match GNU Octave standard functions where applicable, and follow recommendations by IEEE 1788 otherwise. It is possible to look up all functions by their corresponding IEEE 1788 name in the [http://sourceforge.net/p/octave/interval/ci/default/tree/INDEX index].
The interval packages comprises many interval arithmetic operations. Function names match GNU Octave standard functions where applicable, and follow recommendations by IEEE 1788 otherwise, cf. [[#IEEE_1788_index|IEEE 1788 index]].


Arithmetic functions in a set-based interval arithmetic follow these rules: Intervals are sets. They are subsets of the set of real numbers. The interval version of an elementary function such as sin(''x'') is essentially the natural extension to sets of the corresponding point-wise function on real numbers. That is, the function is evaluated for each number in the interval where the function is defined and the result must be an enclosure of all possible values that may occur.
Arithmetic functions in a set-based interval arithmetic follow these rules: Intervals are sets. They are subsets of the set of real numbers. The interval version of an elementary function such as sin(''x'') is essentially the natural extension to sets of the corresponding point-wise function on real numbers. That is, the function is evaluated for each number in the interval where the function is defined and the result must be an enclosure of all possible values that may occur.
One operation that should be noted is the <code>fma</code> function (fused multiply and add). It computes '''''x''''' × '''''y''''' + '''''z''''' in a single step and is more accurate (because of no intermediate result) and therefore preferred in some situations.


  octave:1> sin (infsup (0.5))
  octave:1> sin (infsup (0.5))
240

edits