### 6.5.3 Ranges of values defined by their center

The center2interval command finds ranges of values determined by their centers.

- center2interval takes one mandatory argument and one optional argument:
  - L, a list of real numbers.
  - Optionally, c, a real number (by default L[0]−(L[1]−L[0])/2).
- center2interval(L ⟨,c⟩) returns a list of ranges of values; the midpoints of the elements of the lists are endpoints of the ranges; so, for example, the second range will go from (L[0]+L[1])/2 to (L[1]+L[2])/2, etc. By default the first and last range are centered on L[0] and L[−1]. With an argument of c, however, the first range will begin at c.

#### Examples

center2interval([3,5,8])

2.0 .. 4.0,4.0 .. 6.5,6.5 .. 9.5 |  |  |  |  |  |  |  |  |  |

center2interval([3,5,8],2.5)

2.5 .. 4.0,4.0 .. 6.5,6.5 .. 9.5 |  |  |  |  |  |  |  |  |  |