Код Ревью

Сравни свои решения

    #| BEGIN (Write your solution here) |#
(define (div-interval x y)
  (let ((uy (upper-bound y))
        (ly (lower-bound y)))
    (if (or (= uy 0) (= ly 0))
        (error "division by zero")
        (mul-interval x 
                      (make-interval (/ 1.0 (upper-bound y))
                                     (/ 1.0 (lower-bound y)))))))
#| END |#
    #| BEGIN (Write your solution here) |#
(define (div-interval x y)
  (let ((uy (upper-bound y))
        (ly (lower-bound y)))
    (if (and (>= uy 0) (<= ly 0))
        (error "division by zero")
        (mul-interval x 
                      (make-interval (/ 1.0 (upper-bound y))
                                     (/ 1.0 (lower-bound y)))))))
#| END |#
    #| BEGIN (Write your solution here) |#
(define (div-interval x y)
  (let ((uy (upper-bound y))
        (ly (lower-bound y)))
    (if (or (= uy 0) (= ly 0))
        (error "division by zero")
        (mul-interval x 
                      (make-interval (/ 1.0 (upper-bound y))
                                     (/ 1.0 (lower-bound y)))))))
#| END |#
    #| BEGIN (Write your solution here) |#
(define (div-interval x y)
  (let ((uy (upper-bound y))
        (ly (lower-bound y)))
    (if (and (>= uy 0) (<= ly 0))
        (error "division by zero")
        (mul-interval x 
                      (make-interval (/ 1.0 (upper-bound y))
                                     (/ 1.0 (lower-bound y)))))))
#| END |#