Consistency tests for elementary functions

  • Authors:
  • A. C. R. Newbery;Anne P. Leigh

  • Affiliations:
  • University of Kentucky, Lexington, Kentucky;University of Kentucky, Lexington, Kentucky

  • Venue:
  • AFIPS '71 (Fall) Proceedings of the November 16-18, 1971, fall joint computer conference
  • Year:
  • 1972

Quantified Score

Hi-index 0.00

Visualization

Abstract

The possibility of using consistency tests to determine the quality of an elementary function subroutine has been considered by several authors. Although none of the authors thought highly of the idea, our investigations have led us to conclude that consistency tests do have a definite provable value in some situations. The error in a subroutine has two possible sources: (a) range-reduction and (b) the reduced-range approximation. For instance, in approximating the sine of a large angle one reduces the problem to that of approximating the sine or cosine of an angle in a reduced-range---perhaps [0, π/4]. Since the range-reduction process will then involve subtracting a large integer-multiple of an inaccurately represented π/2, it is clear that the reduced-range argument will be in error by a quantity which varies linearly with the original argument. Since these range-reduction errors are unavoidable and well understood, we have concentrated our efforts on consistency tests which will help to evaluate the quality of a subroutine in the reduced-range approximation. We give three examples. In each case the variable x is supposed to be within the reduced range; the tests are still valid without this condition, but there is a diminished likelihood of our bounds being realistic when x is outside the reduced range.