|
On the assignment, it says that we may compute the precision required for the arguments of add_xreal and sub_xreal from the precision required from the returned results, but that for mult_xreal and div_xreal we have to use iteration or recursion to home in on the argument and result together. It seems to me that if we allow the add_ and sub_xreal procedures to do this "homing" iteration as well, then we can create a general operate_xreal procedure that will either add, subtract, multiply, or divide to get the right answer, so we can (define (add_xreal xr1 xr2) (operate_xreal xr1 xr2 add_ratintvl)), or something to that effect.
Is there anything wrong with this / is there a fundamental problem with the way I am looking at this assignment?
|