Add exercise 2.9
This commit is contained in:
parent
d7bcd52fd0
commit
121cad7707
@ -90,3 +90,10 @@
|
|||||||
(make-interval (- (lower-bound b) (lower-bound a))
|
(make-interval (- (lower-bound b) (lower-bound a))
|
||||||
(- (upper-bound b) (upper-bound a))))
|
(- (upper-bound b) (upper-bound a))))
|
||||||
|
|
||||||
|
;; Exercise 2.9
|
||||||
|
(defun width-interval (x)
|
||||||
|
"Calculate width of an interval as half of the distance between lower
|
||||||
|
and upper bound."
|
||||||
|
(/ (- (upper-bound x) (lower-bound x))
|
||||||
|
2.0))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user