2.8 Exercise 2.8
Alyssa reasoned that adding two intervals made a new interval where the lower
bound was the sum of the arguments’ lower bounds and the upper bound was the
sum of the arguments’ upper bounds. We can define a similar procedure
sub-interval by supposing that subtracting two intervals creates an interval
where the lower bound is the difference between the two lower bounds (and similarly
for the upper bound).
(define (sub-interval x y) | (make-interval (- (lower-bound x) (lower-bound y)) | (- (lower-bound x) (lower-bound y)))) |
|