A note on rational arithmetic

  • Authors:
  • Peter Kornerup

  • Affiliations:
  • Aarhus University, Denmark

  • Venue:
  • ACM SIGMICRO Newsletter
  • Year:
  • 1979

Quantified Score

Hi-index 0.00

Visualization

Abstract

A recent paper in SIGMICRO [1] contained a comparison of the accuracy of floating point vs. rational representations, which is very unfair to the latter. The format chosen for rational numbers utilizes 16 bits for numerators and 16 bits for denominators. This implies that the spacing between consecutive numbers in the system is in most cases of the order 2-32. Only around simple rational numbers (e.g. 1/1, 2/3) is the spacing of the order 2-16. However the rounding algorithm presented in [1] will almost certainly introduce a rounding error of the order 2-16, i.e. introduce an error which in most cases is of the order 216 larger than necessary.