## Exercise 2.8 of SICP

Exercise 2.8: Using reasoning analogous to Alyssa’s, describe how the difference of two intervals may be computed. Define a corresponding subtraction procedure, called sub-interval.

In the resistor example, the resistor is measured at 6.8 ohm with a tolerance of 10%. This means the actual value is $6.8 \pm 0.68$, which makes the interval [6.12 , 7.48]. The other resistor is $4.7 \pm 0.235$ with the interval of [4.465 , 4.935]. Naively subtracting the two intervals would give, [1.655 , 2.545]. Which doesn’t seem wrong but it is. It is wrong because we are biasing the tolerance in one direction for both measurements. We assume that the first value is $6.8-0.68$ and second $4.7-0.235$. There is no basis to assume that the following case isn’t just as valid: $6.8-0.68$ and $4.7+0.235$.
It’s even clearer with the interval of $3 \pm 1$ [2 , 4] and $2 \pm 1$ [1 , 3]. Naively subtracting these terms yields an interval of 0 length, [1,1] or $1 \pm 0$ which is nonsense.
In order to make sure no tolerance bias exists that makes calculations seem more accurate than is possible, the worst case measurement error must be assumed. The intervals will become as wide as possible to not give a false sense of accuracy.

> (print (sub-interval (make-interval 6.12 7.48) (make-interval 4.465 4.935)))
[1.1850000000000005,3.0150000000000006]