理系学生日記

おまえはいつまで学生気分なのか

問題2-14

(define (par1 r1 r2)
  (div-interval (mul-interval r1 r2)
		(add-interval r1 r2)))

(define (par2 r1 r2)
  (let ((one (make-interval 1 1)))
    (div-interval one
		  (add-interval (div-interval one r1)
				(div-interval one r2)))))

で、

gosh> (define A (make-center-percent 100 0.1))
A
gosh> (define B (make-center-percent 50 0.1))
B
gosh> (par1 A B)
(24.545454545454543 . 44.81481481481483)
gosh> (par2 A B)
(30.0 . 36.66666666666667)

クレーマーのLemは正しい。むかつくけど。


もう一個。

gosh> (div-interval A A)
(0.8181818181818181 . 1.2222222222222223)
gosh> (div-interval A B)
(1.6363636363636362 . 2.4444444444444446)

でっていう。