, Volume 37, Issue 1, pp 101112
First online:
Fast and Accurate Floating Point Summation with Application to Computational Geometry
 James DemmelAffiliated withComputer Science Division and Mathematics Department, University of California
 , Yozo HidaAffiliated withComputer Science Division, University of California
Rent the article at a discount
Rent now* Final gross prices may vary according to local VAT.
Get AccessAbstract
We present 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 roundtonearest arithmetic, up to ⌊2^{ F−f }/(1−2^{−f })⌋+1 numbers can be accurately added by just summing the terms in decreasing order of exponents, yielding a sum correct to within about 1.5 units in the last place. In particular, if the sum is zero, it is computed exactly. We apply this result to the floating point formats in the IEEE floating point standard, and investigate its performance. Our results show that in the absence of massive cancellation (the most common case) the cost of guaranteed accuracy is about 30–40% more than the straightforward summation. If massive cancellation does occur, the cost of computing the accurate sum is about a factor of ten. Finally, we apply our algorithm in computing a robust geometric predicate (used in computational geometry), where our accurate summation algorithm improves the existing algorithm by a factor of two on a nearly coplanar set of points.
 Title
 Fast and Accurate Floating Point Summation with Application to Computational Geometry
 Journal

Numerical Algorithms
Volume 37, Issue 14 , pp 101112
 Cover Date
 200412
 DOI
 10.1023/B:NUMA.0000049458.99541.38
 Print ISSN
 10171398
 Online ISSN
 15729265
 Publisher
 Kluwer Academic Publishers
 Additional Links
 Topics
 Keywords

 floating point summation
 rounding error analysis
 computational geometry
 robust geometric predicate
 Industry Sectors
 Authors

 James Demmel ^{(1)}
 Yozo Hida ^{(2)}
 Author Affiliations

 1. Computer Science Division and Mathematics Department, University of California, Berkeley, CA, 94720, USA
 2. Computer Science Division, University of California, Berkeley, CA, 94720, USA