commit c82ea4c476631ffe8bd482dc14ad43c2e161f967 parent e6a24f57fa8a1900f25bfb92529751ea31cf9170 Author: Yuval Langer <yuval.langer@gmail.com> Date: Tue, 14 Nov 2023 01:26:19 +0200 Commenting out non-tests. Diffstat:
M | sicp/tests/chapter-2/exercise-7.scm | | | 52 | +++++++++++++++++++++++++++------------------------- |
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/sicp/tests/chapter-2/exercise-7.scm b/sicp/tests/chapter-2/exercise-7.scm @@ -4,34 +4,36 @@ (sicp solutions chapter-2 exercise-7)) (begin - ; XXX Break these down to specific solutions and tests. + ; XXX Break these down to specific solutions and tests. (test-begin "chapter-2-exercise-7") - (width-interval (add-interval x y)) - (width-interval (make-interval (+ (lower-bound x) - (lower-bound y)) - (+ (upper-bound x) - (upper-bound y)))) - (/ (- (upper-bound (make-interval (+ (lower-bound x) - (lower-bound y)) - (+ (upper-bound x) - (upper-bound y)))) - (lower-bound (make-interval (+ (lower-bound x) - (lower-bound y)) - (+ (upper-bound x) - (upper-bound y))))) - 2) - (/ (- (+ (upper-bound x) - (upper-bound y)) - (+ (lower-bound x) - (lower-bound y))) - 2) + ;; TODO: WHERE ARE THE TESTS?! + #; + ((width-interval (add-interval x y)) + (width-interval (make-interval (+ (lower-bound x) + (lower-bound y)) + (+ (upper-bound x) + (upper-bound y)))) + (/ (- (upper-bound (make-interval (+ (lower-bound x) + (lower-bound y)) + (+ (upper-bound x) + (upper-bound y)))) + (lower-bound (make-interval (+ (lower-bound x) + (lower-bound y)) + (+ (upper-bound x) + (upper-bound y))))) + 2) + (/ (- (+ (upper-bound x) + (upper-bound y)) + (+ (lower-bound x) + (lower-bound y))) + 2) - (add-interval (width-interval x) - (width-interval y)) - (add-interval (/ (- (upper-bound x) (lower-bound x)) 2) - (/ (- (upper-bound y) (lower-bound y)) 2)) - (make-interval ((/ (- (upper-bound x) (lower-bound x)) 2)) + (add-interval (width-interval x) + (width-interval y)) + (add-interval (/ (- (upper-bound x) (lower-bound x)) 2) (/ (- (upper-bound y) (lower-bound y)) 2)) + (make-interval ((/ (- (upper-bound x) (lower-bound x)) 2)) + (/ (- (upper-bound y) (lower-bound y)) 2))) (test-end "chapter-2-exercise-7")))