1:- module(interval, [interval/2, interval/3, op(150, xfx, ...)]).

Perform arithmetic operations with intervals.

An interval is represented as L...U, where L stands for the lower bound and U for the upper bound. If the upper bound is a negative number, it has to be written with an additional space, e.g., -3... -2, or in the infix notation, ...(-3, -2). The choice of using consult and not the module system is motivated by need for more flexibility. */

 interval(+A, ?Res) is nondet
True if A evalutes to Res. Atoms, numbers, and strings are not evaluated. Supported operations:
Arguments:
A- is the expression to be evaluted.
Res- is the result. This should always be unbound. For checking results, use 'interval(1...2 + 1, Res), Res = 2...3' instead of 'interval(1...2 + 1, 2...3)'
   32:- set_prolog_flag(float_overflow, infinity).   33:- set_prolog_flag(float_undefined, nan).   34:- set_prolog_flag(float_zero_div, infinity).   35
   36:- nb_setval(digits, 2).   37
   38:- consult(['../inst/prolog/lib/interface', 
   39            '../inst/prolog/lib/op', 
   40            '../inst/prolog/lib/eval',
   41            '../inst/prolog/lib/utility']).