sicp 2.9

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.

 

 

设区间i1 = (x1, y1)和i2 = (x2, y2), Wi1, Wi2, W+, W-, W*, W/分别表示width,

Wi1 = (y1 - x1) / 2, Wi2 = (y2 - x2) / 2,

i1 + i2 = (x1 + x2, y1 + y2)

i1 - i2 = (x1 - y2, y1 - x2)

W+ = ((y1 + y2) - (x1 + x2)) / 2 = Wi1 + Wi2

W- = ((y1 - x2) - (x1 - y2)) / 2 = Wi1 + Wi2

 

对于乘除法,为了说明W*和W/不能表示为Wi1和Wi2的函数,可以考虑简单情况,x1,y1,x2,y2均大于1,

W* = (y1 * y2 - x1 * x2) / 2

W/ = (y1 / x2 - x1 / y2) / 2

无法表示为Wi1和Wi2,更复杂的情况就不用考虑了.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值