SICP 全笔记

Exercise 2.9. The width of an interval is half of the difference between its upper and lower bounds. The width is a measure of the uncertainty of the number specified by the interval. For some arithmetic operations the width of the result of combining two intervals is a function only of the widths of the argument intervals, whereas for others the width of the combination is not a function of the widths of the argument intervals. Show that the width of the sum (or difference) of two intervals is a function only of the widths of the intervals being added (or subtracted). Give examples to show that this is not true for multiplication or division.

练习 2.9

假设

- interval1 是 [l1, u1],宽度为

$$ w1 = \frac{(l1 + u1)}{2} $$ - interval2 是 [l2, u2],宽度为

$$ w2 = \frac{(l2 + u2)}{2} $$

加法

对于 + 而言,求和的结果为 [l1 + l2, u1 + u2],宽度为

$$ \frac{l1 + l2 + u1 + u2}{2} = w1 + w2 $$

减法

求差的结果为 [l1 - u2, u1 - l2],宽度为

$$ \frac{l1 + u1 - l2 - u2, 2} = w1 - w2 $$

乘法和除法

无法列出式子