###### 练习 2.14 2.7 2.8 ~ 2.16 未完...
#lang racket

;: 区间加法
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))

;: 区间乘法
(define (mul-interval x y)
(let (
(p1 (* (lower-bound x) (lower-bound y)))
(p2 (* (lower-bound x) (upper-bound y)))
(p3 (* (upper-bound x) (lower-bound y)))
(p4 (* (upper-bound x) (upper-bound y))))
(make-interval (min p1 p2 p3 p4)
(max p1 p2 p3 p4))))
;: 区间除法
(define (div-interval x y)
(mul-interval x
(make-interval (/ 1.0 (upper-bound y))
(/ 1.0 (lower-bound y)))))

;: 练习  2.7
(define (make-interval a b) (cons a b))

;: 答安
(define (upper-bound x)
(let ((a (car x))
(b (cdr x)))
(if (> a b)
a
b)))

(define (lower-bound x)
(let ((a (car x))
(b (cdr x)))
(if (> a b)
b
a)))
;: 测试
(define x (make-interval 3 5))
(upper-bound x)
(lower-bound x)

;:练习2.8 两个区间的差
;: 差的最小值 = 小-小?
;: 差的最大值 = 大-大?
(define (sub-interval x y)
(make-interval (- (lower-bound x) (lower-bound y))
(- (upper-bound x) (upper-bound y))))

;: 练习 2.9 区间的宽带 =上界下界之差的一半
;: 宽度
(define (width-interval x)
(/ 2 ( + (upper-bound x)
(lower-bound x))))

;: 对于+法
;  (make-interval (+ (lower-bound x) (lower-bound y))
;                 (+ (upper-bound x) (upper-bound y))))

(define a (make-interval '1 '2))
(define b (make-interval '3 '4))

;  (make-interval (+ (lower-bound a) (lower-bound b))
;                 (+ (upper-bound a) (upper-bound b))))
;=>(make-interval (+ '1 '3) (+ '2 '4))
;=> 宽度= (/ 2
;          (- (+ '2 4)
;             (+ '1 '3)))
;: '2 - '1 + '4 - '3 / 2                   =>
;: (('2 - '1) + ('4 - '3)) / 2             =>
;: (/ 2 (+ (- '2 '1)
;:         (- '4 '3)))                     =>


#### SICP 习题 （2.16）解题总结：避免误差的区间计算系统

2014-12-24 22:05:54

#### SICP 习题 （2.15）解题总结：区间误差的深入思考

2014-12-23 22:23:36

2016-06-05 09:42:48

#### SICP 习题 （2.14）解题总结:区间误差导致的问题

2014-12-16 16:33:43

2018-01-05 16:49:22

#### c++ primer 练习 2.13、2.14

2017-02-28 12:57:33

#### 20180308：git2.16 + git gui汉化

2018年03月08日 37.33MB 下载

#### C F爆发者2.7 2.8

2008年12月19日 795KB 下载

2017-11-22 11:25:56

#### [帧服务器搭桥]FrameServer_V2.14_草蜢汉化第3版

2015年09月15日 591KB 下载