Rational Arithmetic in Floating-Point.
Abstract
Calculating M/N := A/B + or - C/D 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 computer's 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.
Document Details
- Document Type
- Technical Report
- Publication Date
- Sep 01, 1986
- Accession Number
- ADA175190
Entities
People
- W. Kahan
Organizations
- University of California, Berkeley