Algorithm 908: Online Exact Summation of Floating-Point Streams

被引:22
|
作者
Zhu, Yong-Kang [1 ]
Hayes, Wayne B. [1 ]
机构
[1] Univ Calif Irvine, Dept Comp Sci, Irvine, CA 92697 USA
来源
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE | 2010年 / 37卷 / 03期
关键词
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 条
  • [41] An exact leading non-zero detector for a floating-point unit
    Arakawa, F
    Hayashi, T
    Nishibori, M
    IEICE TRANSACTIONS ON ELECTRONICS, 2005, E88C (04): : 570 - 575
  • [42] Make it Real: Effective Floating-Point Reasoning via Exact Arithmetic
    Leeser, Miriam
    Mukherjee, Saoni
    Ramachandran, Jaideep
    Wahl, Thomas
    2014 DESIGN, AUTOMATION AND TEST IN EUROPE CONFERENCE AND EXHIBITION (DATE), 2014,
  • [43] Exact 2D Convex Hull for Floating-point Data
    Ozaki, Katsuhisa
    Ogita, Takeshi
    Oishi, Shin'ichi
    REC 2010: PROCEEDINGS OF THE 4TH INTERNATIONAL WORKSHOP ON RELIABLE ENGINEERING COMPUTING: ROBUST DESIGN - COPING WITH HAZARDS, RISK AND UNCERTAINTY, 2010, : 282 - 292
  • [44] Floating-point verification
    Harrison, J
    FM 2005: FORMAL METHODS, PROCEEDINGS, 2005, 3582 : 529 - 532
  • [45] Floating-point verification
    Harrison, John
    JOURNAL OF UNIVERSAL COMPUTER SCIENCE, 2007, 13 (05) : 629 - 638
  • [46] FLOATING-POINT COUNTERS
    KALUGIN, VV
    INSTRUMENTS AND EXPERIMENTAL TECHNIQUES, 1982, 25 (05) : 1131 - 1133
  • [47] TAPERED FLOATING POINT - NEW FLOATING-POINT REPRESENTATION
    MORRIS, R
    IEEE TRANSACTIONS ON COMPUTERS, 1971, C 20 (12) : 1578 - &
  • [48] A floating-point genetic algorithm for solving the unit commitment problem
    Dang, Chuangyin
    Li, Minqiang
    EUROPEAN JOURNAL OF OPERATIONAL RESEARCH, 2007, 181 (03) : 1370 - 1395
  • [49] Improving FDTD Algorithm Performance using Block Floating-Point
    Pijetlovic, Stefan
    Subotic, Milos
    Pjevalica, Nebojsa
    2017 25TH TELECOMMUNICATION FORUM (TELFOR), 2017, : 518 - 521
  • [50] Optimized UD filtering algorithm for floating-point hardware execution
    Gonzalez, Rodrigo
    Sutter, Gustavo
    Daniel Patino, Hector
    2014 17TH INTERNATIONAL CONFERENCE ON INFORMATION FUSION (FUSION), 2014,