hi @qiao ,
Inspired by your work I was trying to solve exercises in SICP & found a small issue in the solution of 2.09.scm.
FIX: if y is an interval [c d], (- y) will be an interval [-d, -c] (upper & lower bounds will flip when sign is changed). This will result in the width of (sub-interval x y) as (w1 + w2).
https://github.com/vthukral94/sicp/blob/main/chapter-2/2.8.scm#L21
hi @qiao ,
Inspired by your work I was trying to solve exercises in SICP & found a small issue in the solution of 2.09.scm.
sicp-solutions/chapter2/2.09.scm
Line 12 in a2fe069
FIX: if y is an interval [c d], (- y) will be an interval [-d, -c] (upper & lower bounds will flip when sign is changed). This will result in the width of (sub-interval x y) as (w1 + w2).
https://github.com/vthukral94/sicp/blob/main/chapter-2/2.8.scm#L21