Add Exercise 2.10
This commit is contained in:
parent
121cad7707
commit
a14449600f
@ -97,3 +97,11 @@ and upper bound."
|
|||||||
(/ (- (upper-bound x) (lower-bound x))
|
(/ (- (upper-bound x) (lower-bound x))
|
||||||
2.0))
|
2.0))
|
||||||
|
|
||||||
|
;; Exercise 2.10
|
||||||
|
(defun div-interval (a b)
|
||||||
|
(if (zerop (width-interval b))
|
||||||
|
(error "Cannot divide by 0 width interval")
|
||||||
|
(mul-interval
|
||||||
|
a
|
||||||
|
(make-interval (/ 1.0 (upper-bound b))
|
||||||
|
(/ 1.0 (lower-bound b))))))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user