\section{C-XSC Interval Arithmetics}
This module includes the C-XSC Interval Arithmetics into Rascal.
You can find more information about C-XSC at 
{\tt http://www.xsc.de }.

Intervals can be constructed out of integers and doubles using the 
constructor {\tt Interval} or the bracket-notation:

\begin{lyxcode}
>a=Interval(1,2)

~[  1.000000,  2.000000]

>b=[3,4]

~[  3.000000,  4.000000]

>c=Interval(.1)

~[  0.099999,  0.100001]
\end{lyxcode}

Note that {\tt [12] } would denote a $1\times 1$ matrix, not a point
interval. It seems to be confusing that {\tt c} is not a point interval, but
the actual value 0.1 cannot be represented using the binary floating point
representation, thus it is correct to represent this value as an actual
interval. This module overrides the parsing of floating point numbers to
achieve this. For compatibility reasons you can still also use the string
constructor:

\begin{lyxcode}
>alternativeC=Interval(".1,.1")

~[  0.099999,  0.100001]
\end{lyxcode}

You can compute the intersection of two intervals using the \&-operator, the
convex hull using the |-operator. The relational operators <,<=,>,>= can be
used to compute the relations $\subset,\subseteq,\supset,\supseteq$.

You can access the upper and lower boundary of an interval using the
functions {\tt sup, inf}, the middle point using {\tt mid} and the diameter
with the help of the function {\tt diam}.

\begin{lyxcode}
>sup(a)

~2.000000

>mid(a)

~1.500000
\end{lyxcode}

The following standard functions are defined for intervals: {\tt abs, exp, log,
pow, sqrt, sqr, sin, cos, tan, cot, asin, acos, atan, acot, sinh, cosh, tanh, coth,
asinh, acoth, atanh, acoth}. 

The output format can be configured using the {\tt Precision(width,digits)}
command:
\begin{lyxcode}
>Precision(15);pi=atan([1,1])*4

~[3.141592653589787,3.141592653589801]

>diam(pi)

~1.287858708565182E-014
\end{lyxcode}
As you can see doubles are formatted accordingly.
