|
It's not too hard to write a general procedure for all operations that are monotonic in all arguments (addition, subtraction, multiplication, division, and odd powers) that just reduces the widths of the approximations to the arguments in some standard way until they are sufficiently small. You have to take all four combinations of endpoints for the binary operations. Even powers require a different approach, since they are well defined at 0 but switch from decreasing to increasing. The most interesting thing about the different implementations of It's real easy to compute the required precision of arguments for addition and subtraction. The iterative approach is much less efficient. For powers, for multiplication, and for division once you've bounded the divisor away from 0, I have a pretty good hunch that you can do it in two steps. You definitely must iterate the precision of a divisor until you can determine whether it is positive or negative (computing infinitely if it is exactly 0). Mike O'D. |
Iteration is simpler than I indicated, but still inefficient by Mike O'Donnell, 2002, Nov 14
to: