Accurate and Efficient Floating Point Summation
Accurate and Efficient Floating Point Summation
复制标题
DOI:
10.1137/s1064827502407627
复制
发表时间:
2003-04
期刊:
影响因子:
--
通讯作者:
J. Demmel;Yozo Hida
中科院分区:
文献类型:
--
作者:
J. Demmel;Yozo Hida
We present and analyze several simple algorithms for accurately computing the sum of n floating point numbers using a wider accumulator. Let f and F be the number of significant bits in the summands and the accumulator, respectively. Then assuming gradual underflow, no overflow, and round-to-nearest arithmetic, up to approximately 2F-f numbers can be added accurately by simply summing the terms in decreasing order of exponents, yielding a sum correct to within about 1.5 units in the last place (ulps). We apply this result to the floating point formats in the IEEE floating point standard. For example, a dot product of single precision vectors of length at most 33 computed using double precision and sorting is guaranteed correct to nearly 1.5 ulps. If double-extended precision is used, the vector length can be as large as 65,537. We also investigate how the cost of sorting can be reduced or eliminated while retaining accuracy.