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.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Sep 01, 1986
Accession Number
ADA175190

Entities

People

  • W. Kahan

Organizations

  • University of California, Berkeley

Tags

Communities of Interest

  • Materials and Manufacturing Processes

DTIC Thesaurus Topics

  • Accuracy
  • Air Force
  • Algorithms
  • Applied Mathematics
  • Arithmetic
  • Calculators
  • Complex Variables
  • Computer Programming
  • Computers
  • Floating Point Operations
  • Language
  • Mathematics
  • Numbers
  • Programming Languages
  • Rational Numbers
  • Specifications
  • Standards

Readers

  • Applied Combinatorial Optimization and Logic Circuit Design.
  • Computer Science.
  • Systems Analysis and Design