A little late, but had no time :/
-
Exercise 1.1
10
12
8
3
6
a (No output)
b (No output)
19
false
4
16
6
16
-
Exercise 1.4
It checks the value of b, so if it's positive, the '+' operator is used. If it's negative, the '-' operator is used. So the procedure adds the absolute value of b to a.
-
Exercise 1.5
With normal-order evaluation, the interpreter will not try to evaluate (p) until it is needed, so it will check if 'x' equals zero and then print the 0 value. As (p) is never needed, it won't be evaluated.
With applicative-order evaluation, the interpreter will try to evaluate (p). As (p) is defined as itself, the substitution will occur over and over again, leading to an infinite loop.
-
Exercise 1.6
The applicative-order evaluation will try to evaluate the sqrt-iter recursive call that comes in the "else-clause", leading to an infinite llop.
-
Exercise 1.7
With small numbers the good-enough? test will give a positive when the number is lower than the precision limit. With big numbers will occur in similar ways, being the number too big, the precision check may not be reached, so the computation will never stop. Code in the Code field.