[1,2]
(-inf,-2) (-1,1) (2,inf)
(-inf,2] [1.1,2.2) [4,inf)
{-1,0,1}
{0,1,[2,3),(3,4], (5,6), (7,inf)}
Operations
- Arithmetic operations on intervals:
+,-,*,/,sq,unary -
These all return an interval that contains all results, that is, if I and J are sets of
reals as above, then
I+J contains {x+y: x in X and y in Y}
I*J contains {x*y: x in X and y in Y}
I-J contains {x-y: x in X and y in Y and y<>0}
I/J contains {x/y: x in X and y in Y}
sq(I) contains {x*x: x in X}
-I contains {-x: x in X}
- Assignment statements separated by semicolons:
Each assignment must have the form
VARIABLE := EXPRESSION
- Function definitions
FUNNAME(V1,...,Vn) := EXPRESSION
- Piecewise function definitions
FUNNAME(V) :=
{
EXPR1 if V in I1 ,
EXPR2 if V in I2 ,
...
EXPRN if V in In
}
This definition intersects the interval argument V with each I_j to get V_j.
If V_j is not empty, then it uses it to evaluate EXPRj to get a result interval
R_j. The union of all R_j is returned. Note that one can use this to define
functions recursively, but must take care to avoid infinite loops. The interpreter
should probably memoize recursive calls to catch infinite loops, but it does not.
Options
The user can modify the internal state by selecting options from the control panel on the GUI, including:
- the scale choice determines the maximum number of decimal digits to maintain when computing interval bounds
- the reset button removes all variable definitions
- the clear button clears the two textareas
- the fontsize choice ... self-evident
- the detach/attach buttons pop the applet off/on the webpage
- the help button pops up a window with a little bit of online help
including a list of the operators that can be used in arithmetic expressions