Rational Arithmetic in Floating-Point.
CALIFORNIA UNIV BERKELEY CENTER FOR PURE AND APPLIED MATHEMATICS
Pagination or Media Count:
Calculating MN AB or - CD in lowest terms, given the integers A, B, C and D, is a task in Elementary schools and it is an easy exercise in Computer Programming too provided the given integers must be less than half as wide as the widest integers that can be handled conveniently by the computers hardware or by its programming language. But that program because becomes much more complicated and slower if it is naively expected to perform correctly whenever all six of our integers A, B, C, D, M and N are allowed to grow almost as wide as those widest convenient integers. This simple task illustrates why the art of programming entails sometimes a delicate balance between, on the one hand, the simplicity and aesthetic appeal of the specifications and, on the other hand, the complexity and efficiency of the implementation.
- Computer Programming and Software