Algorithm 908: Online Exact Summation of Floating-Point Streams

被引:21
|
作者
Zhu, Yong-Kang [1 ]
Hayes, Wayne B. [1 ]
机构
[1] Univ Calif Irvine, Dept Comp Sci, Irvine, CA 92697 USA
来源
关键词
Algorithms; Reliability; Floating-point summation; rounding error; TREE CODE; ACCURATE; FAITHFUL;
D O I
10.1145/1824801.1824815
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a novel, online algorithm for exact summation of a stream of floating-point numbers. By "online" we mean that the algorithm needs to see only one input at a time, and can take an arbitrary length input stream of such inputs while requiring only constant memory. By "exact" we mean that the sum of the internal array of our algorithm is exactly equal to the sum of all the inputs, and the returned result is the correctly-rounded sum. The proof of correctness is valid for all inputs (including nonnormalized numbers but modulo intermediate overflow), and is independent of the number of summands or the condition number of the sum. The algorithm asymptotically needs only 5 FLOPs per summand, and due to instruction-level parallelism runs only about 2-3 times slower than the obvious, fast-but-dumb "ordinary recursive summation" loop when the number of summands is greater than 10,000. Thus, to our knowledge, it is the fastest, most accurate, and most memory efficient among known algorithms. Indeed, it is difficult to see how a faster algorithm or one requiring significantly fewer FLOPs could exist without hardware improvements. An application for a large number of summands is provided.
引用
收藏
页数:13
相关论文
共 50 条
  • [1] A circuit for exact summation of floating-point numbers
    Muller, M
    Rub, C
    Rulling, W
    [J]. INFORMATION PROCESSING LETTERS, 1996, 57 (03) : 159 - 163
  • [2] Distillation algorithm for floating-point summation
    Anderson, I.J.
    [J]. SIAM Journal on Scientific Computing, 20 (05): : 1797 - 1806
  • [3] A distillation algorithm for floating-point summation
    Anderson, IJ
    [J]. SIAM JOURNAL ON SCIENTIFIC COMPUTING, 1999, 20 (05): : 1797 - 1806
  • [4] A new distillation algorithm for floating-point summation
    Zhu, YK
    Yong, JH
    Zheng, GQ
    [J]. SIAM JOURNAL ON SCIENTIFIC COMPUTING, 2005, 26 (06): : 2066 - 2078
  • [5] On floating-point summation
    Espelid, TO
    [J]. SIAM REVIEW, 1995, 37 (04) : 603 - 607
  • [6] CORRECT ROUNDING AND A HYBRID APPROACH TO EXACT FLOATING-POINT SUMMATION
    Zhu, Yong-Kang
    Hayes, Wayne B.
    [J]. SIAM JOURNAL ON SCIENTIFIC COMPUTING, 2009, 31 (04): : 2981 - 3001
  • [7] ACCURATE FLOATING-POINT SUMMATION
    MALCOLM, MA
    [J]. COMMUNICATIONS OF THE ACM, 1971, 14 (11) : 731 - &
  • [8] ACCURATE FLOATING-POINT SUMMATION
    LINZ, P
    [J]. COMMUNICATIONS OF THE ACM, 1970, 13 (06) : 361 - &
  • [9] THE ACCURACY OF FLOATING-POINT SUMMATION
    HIGHAM, NJ
    [J]. SIAM JOURNAL ON SCIENTIFIC COMPUTING, 1993, 14 (04): : 783 - 799
  • [10] A new error-free floating-point summation algorithm
    Pan, V. Y.
    Murphy, B.
    Qian, G.
    Rosholt, R. E.
    [J]. COMPUTERS & MATHEMATICS WITH APPLICATIONS, 2009, 57 (04) : 560 - 564