Did you know ... Search Documentation:
Pack interval -- prolog/interval.pl
PublicShow source
 interval(+A, ?Res)
Evalutes an expression to an interval. If the first argument is already an interval, no evaluation is performed. Supported operations:
  • Basic arithemtic: addition '+', subtraction '-', division '/', multiplication '*'
  • Square root for positive interval: 'interval(sqrt(X), Res)'
  • Square root for negative or mixed interval: 'interval(sqrt1(X), Res)'
  • Power: 'interval(X^atomic(N), Res)' with N being a natural number
  • Absolute value: 'interval(abs(X), Res)'
  • Comparison: '>', '<', '>=', '=<', '=\=', '=:='
  • Rounding: 'interval(round(1.356...1.634, atomic(2)), Res)'
Arguments:
A- is the expression to be evaluted.
Res- is the result.