Remote web server - 238 ARITHMETIC 4.2.4 EMPIRICAL DATA FOR OPERATable 1
Friday, November 23rd, 2007238 ARITHMETIC 4.2.4 EMPIRICAL DATA FOR OPERATable 1 ND ALIGNMENTS BEFORE ADDITION leu -evl b=2 b= 10 b= 16 b = 64 0 1 2 3 4 5 over 5 0.33 0.12 0.09 0.07 0.07 0.04 0.28 0.47 0.23 0.11 0.03 0.01 0.01 0.13 0.47 0.26 0.10 0.02 0.01 0.02 0.11 0.56 0.27 0.04 0.02 0.02 0.00 0.09 average 3.1 0.9 0.8 0.5 4.2.4. Distribution of Floating Point Numbers In order to analyze the average behavior of floating point arithmetic algorithms (and in particular to determine their average running time), we need some statistical information that allows us to determine how often various cases arise. The purpose of this section is to discuss the empirical and theoretical properties of the distribution of floating point numbers. A. Addition and subtraction routines. The execution time for a floating point addition or subtraction depends largely on the initial difference of exponents, and also on the number of normalization steps required (to the left or to the right). No way is known to give a good theoretical model that tells what characteristics to expect, but extensive empirical investigations have been made by D. W. Sweeney [EM Systems J. 4 (1965), 31-421. By means of a special tracing routine, Sweeney ran six typical large-scale numerical programs, selected from several different computing laboratories, and examined each floating addition or subtraction operation very carefully. Over 250,000 floating point addition-subtractions were involved in gathering this data. About one out of every ten instructions executed by the tested programs was either FADD or FSUB. Let us consider subtraction to be addition preceded by negating the second operand; therefore we may give all the statistics as if we were merely doing addition. Sweeney s results can be summarized as follows: One of the two operands to be added was found to be equal to zero about 9 percent of the time, and this was usually the accumulator (ACC). The other 91 percent of the cases split about equally between operands of the same or of opposite signs, and about equally between cases where ]u] 5 ]w] or ]v] 5 ]u]. The computed answer was zero about 1.4 percent of the time. The difference between exponents had a behavior approximately given by the probabilities shown in Table 1, for various radices b. (The over 5 line of that table includes essentially all of the cases when one operand was zero, but the average line does not include these cases.)