Defining intervals: i[]

### 6.38.1 Defining intervals: i[]

An interval is a range of real numbers, whose end points will be floats with at least 15 significant digits. The i command creates intervals, with the arguments in square brackets.

- i takes two arguments:
  a and b, two real numbers.
- i[a,b] returns the interval between a and b.
  If a > b, then i[a,b] returns i[evalf(b,15)-epsilon,evalf(a,15)+epsilon] (see Section 3.5.7, item 9).

Examples.

- Input:
  i[1,13/11]
  Output:

  [1.00000000000000..1.18181818181819]

- Input:
  i[pi,sqrt(3)]
  Output:

  [1.73205080756886..3.14159265358980]

Intervals can also be created by following a decimal number with a question mark. If the decimal number contains n digits, the interval will be centered at a and have width 2· 10−n.

Examples.

- Input:
  0.123?
  Output:

  ⎡ ⎣ | 0.121999999999999..0.124000000000000 | ⎤ ⎦

  Input:
  789.123456?
  Output:

  | ⎡ ⎣ | 0.789123454999990e3..0.789123456999998e3 | ⎤ ⎦