This paper describes a test of a computer’s floating-point arithmetic unit. The test has two goals. The first goal deals with the needs of users of computers, and the second goal deals with manufacturers of computers. The first and major goal is to determine if the machine supports a particular mathematical model of computer arithmetic. This model was developed as an aid in the design, analysis, implementation and testing of portable, high-quality numerical software. If a computer supports the arithmetic model, then software written using the model will perform correctly and to specified accuracy on that machine. The second goal of the test is to check that the basic operations perform as the manufacturer intended. For example, if division ( x / y ) is implemented as a composite operation ( x × ( 1/ y ) ), then the test should detect that fact. Also, the accuracy lost in such a division due to the extra arithmetic operations can tell the manufacturer whether it has been implemented with sufficient care. Most computers allow the representation of far too many floating-point numbers to allow exhaustive testing of the floating-point arithmetic unit. A small and well-motivated set of floating-point numbers is presented that can be used to detect a vast number of floating-point arithmetic "problems" in existing machines. In fact, that set can be used to detect at least one instance of every floating-point arithmetic problem known to the author. The test is written in portable FORTRAN and has been run on seven different vendor’s hardware, with results that range from perfection to disaster.
[1]
Barbara G. Ryder,et al.
The pfort verifier
,
1974,
Softw. Pract. Exp..
[2]
Michael A. Malcolm,et al.
Algorithms to reveal properties of floating-point arithmetic
,
1972,
CACM.
[3]
S. Feldman.
The programming language EFL
,
1978,
SIGNUM.
[4]
A. D. Hall,et al.
The PORT Mathematical Subroutine Library
,
1978,
TOMS.
[5]
Stuart I. Feldman,et al.
Make — a program for maintaining computer programs
,
1979,
Softw. Pract. Exp..
[6]
Brian W. Kernighan,et al.
A system for typesetting mathematics
,
1975,
Commun. ACM.
[7]
William M. Waite,et al.
Software manual for the elementary functions
,
1980
.
[8]
James Hardy Wilkinson,et al.
Rounding errors in algebraic processes
,
1964,
IFIP Congress.
[9]
W. Morven Gentleman,et al.
More on algorithms that reveal properties of floating point arithmetic units
,
1974,
CACM.