灯下 登录
计算机科学 / SICP / 2.1.4 Extended Exercise: Interval Arithmetic

Exercise 2.12 · 习题

Exercise 2.12: Define a constructor

make-center-percent that takes a center and a percentage tolerance and

produces the desired interval. You must also define a selector percent

that produces the percentage tolerance for a given interval. The center

selector is the same as the one shown above.

练习 2.12:定义构造函数 make-center-percent,它以中心值和百分比容差为参数,产生所需的区间。你还需要定义选择函数 percent,用于返回给定区间的百分比容差。center 选择函数与上面所示的相同。