evalr
evaluate an expression using range arithmetic
shake
compute a bounding interval
Calling Sequence
Parameters
Description
Examples
evalr(expr)
shake(expr, ampl)
expr
-
expression
ampl
(optional) positive integer
The evalr(expr) function evaluates an expression containing ranges written INTERVAL(a..b) with a<=b, sequences of ranges written INTERVAL(a..b, c..d, ...), or bounded variables written INTERVAL(x, a..b). By default a variable x is converted to INTERVAL(x, -infinity ..infinity). The result of evalr in this case can be a sequence of ranges, or an expression if both sides of the resulting range are equal. The imprecise variables INTERVAL(x, -infinity..infinity) are converted back to x if the result is the same for all values of x.
The function evalr can be called with an expression without a range. In this case, the decision functions min, max, abs and Signum are evaluated using range arithmetic. Thus, evalr(Signum(expr)) can return FAIL.
The shake(expr, ampl) function replaces the constants at the leaves of the expression tree by an interval of width Float(10, -ampl), then uses evalr to propagate these intervals bottom-up. If ampl is not specified, the current value of Digits is used.
evalr⁡min⁡2,sqrt⁡3
3
evalr⁡sin⁡INTERVAL⁡2..7
INTERVAL⁡−1..sin⁡2
evalr⁡abs⁡x
INTERVAL⁡INTERVAL⁡x,0..∞,−INTERVAL⁡x,−∞..0
shake⁡π,3
INTERVAL⁡3.1102..3.1730
See Also
abs
Digits
evalrC
max
min
signum
solve
Download Help Document