Fast and Accurate Floating Point Summation with Application to Computational Geometry |
| |
Authors: | James Demmel Yozo Hida |
| |
Institution: | 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
|
| |
Abstract: | 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 round-to-nearest 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. |
| |
Keywords: | |
本文献已被 SpringerLink 等数据库收录! |
|