Next: Advanced Topics, Previous: Introduction to Interval Arithmetic, Up: Top [Contents]
This chapter presents some more or less exotic use cases for the interval package.
• Floating-point Numbers | ||
• Root Finding | ||
• Parameter Estimation | ||
• Path Planning |
According to IEEE Std 754 only the most basic floating-point operations must be provided with high accuracy. This is also true for the arithmetic functions in Octave. It is no surprise that many arithmetic functions fail to provide perfect results and their output may be system dependent.
We compute the cosecant for 100 different values.
x = vec (1 ./ magic (10)); sum (subset (csc (x), csc (infsupdec (x)))) ⇒ ans = 98
Due to the general containment rule of interval arithmetic x ∈ X ⇒ f (x) ∈ f (X)
one would expect the csc (x)
to always be contained in the interval version of the cosecant for the same input. However, the classic cosecant is not very accurate whereas the interval version is. In 2 out 100 cases the built-in cosecant is less accurate than 1 ULP.
A weaker formulation of Brower’s fixed-point theorem goes: If x is a bounded interval and function f is continuous and f (x) ⊂ x, then there exists a point x₀ ∈ x such that f (x₀) = x₀.
These properties can be tested automatically. Decorated intervals can even prove that the function is continuous.
x = infsupdec ("[-1, +1]"); f = @cos; subset (f (x), x) ⇒ ans = 1 iscommoninterval (x) ⇒ ans = 1 continuous = strcmp (decorationpart (f (x)), "com") ⇒ continuous = 1
Furthermore it is sometimes possible to approximate the fixed-point by repetitive evaluation of the function, although there are better methods to do so in general.
for i = 1 : 20 x = f (x); endfor display (x) ⇒ x ⊂ [0.73893, 0.73919]_com
Further Examples | ||
---|---|---|
• Floating-point Numbers | Analyze properties of binary64 numbers with intervals | |
• Root Finding | Find guaranteed enclosures for roots of a function | |
• Parameter Estimation | Examples of set inversion via interval analysis | |
• Path Planning | Find a feasible path between two points |
Next: Advanced Topics, Previous: Introduction to Interval Arithmetic, Up: Top [Contents]