Interval package: Difference between revisions

1,367 bytes added ,  14 October 2014
Line 82: Line 82:


=== Decorations ===
=== Decorations ===
With the subclass <code>infsupdec</code> it is possible to extend interval arithmetic with a decoration system. Every interval and intermediate result will additionally carry a decoration, which may provide additional information about the final result. The following decorations are available:
{| class="wikitable" style="margin: auto"
!Decoration
!Bounded
!Continuous
!Defined
!Definition
|-
| com<br/>(common)
| ✓
| ✓
| ✓
| '''''x''''' is a bounded, nonempty subset of Dom(''f''); ''f'' is continuous at each point of '''''x'''''; and the computed interval ''f''('''''x''''') is bounded
|-
| dac<br/>(defined &amp; continuous)
|
| ✓
| ✓
| '''''x''''' is a nonempty subset of Dom(''f''); and the restriction of ''f'' to '''''x''''' is continuous
|-
| def<br/>(defined)
|
|
| ✓
| '''''x''''' is a nonempty subset of Dom(''f'')
|-
| trv<br/>(trivial)
|
|
|
| always true (so gives no information)
|-
| ill<br/>(ill-formed)
|
|
|
| Not an interval, at least one interval constructor failed during the course of computation
|}
In the following example, all decoration information is lost when the interval is possibly divided by zero, i. e., the overall function is not guaranteed to be defined for all possible inputs.
octave:1> infsupdec(3, 4)
ans = [3, 4]_com
octave:2> ans + 12
ans = [15, 16]_com
octave:3> ans / "[0, 2]"
ans = [7.5, Inf]_trv


=== Arithmetic operations ===
=== Arithmetic operations ===
240

edits