; ======================================================================
;
; Structure and Interpretation of Computer Programs
; (trial answer to excercises)
;
; 计算机程序的构造和解释(习题试解)
;
; created: code17 07/14/05
; modified:
; (保持内容完整不变前提下,可以任意转载)
; ======================================================================
;; SICP No.2.14
;; 测试
;; 若R1=2 R2=6, 则并联电阻R应该大概在1.5左右
;; 利用前面定义的函数
;; Welcome to MzScheme version 209, Copyright (c) 2004 PLT Scheme, Inc.
;; > (define r1 (make-center-percent 2 0.05))
;; > (define r2 (make-center-percent 6 0.05))
;; > (par1 r1 r2)
;; (1.289285714285714 . 1.7407894736842107)
;; > (par2 r1 r2)
;; (1.425 . 1.5750000000000002)
;; 由此可见Lem报告的问题是存在的,而且par1(r1*r2/(r1+r2))所产生的误差要比
;; par2(1/(1/r1+1/r2))大。
;; 另外,测试
;; > (div-interval r1 r1)
;; (0.9047619047619047 . 1.1052631578947367)
;; > (div-interval r1 r2)
;; (0.30158730158730157 . 0.368421052631579)
;; 原因在下一题中分析。