Accurate Floating-Point Summation Part I: Faithful Rounding

  • Authors:
  • Siegfried M. Rump;Takeshi Ogita;Shin'ichi Oishi

  • Affiliations:
  • rump@tu-harburg.de;ogita@lab.twcu.ac.jp;oishi@waseda.jp

  • Venue:
  • SIAM Journal on Scientific Computing
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a vector of floating-point numbers with exact sum $s$, we present an algorithm for calculating a faithful rounding of $s$, i.e., the result is one of the immediate floating-point neighbors of $s$. If the sum $s$ is a floating-point number, we prove that this is the result of our algorithm. The algorithm adapts to the condition number of the sum, i.e., it is fast for mildly conditioned sums with slowly increasing computing time proportional to the logarithm of the condition number. All statements are also true in the presence of underflow. The algorithm does not depend on the exponent range. Our algorithm is fast in terms of measured computing time because it allows good instruction-level parallelism, it neither requires special operations such as access to mantissa or exponent, it contains no branch in the inner loop, nor does it require some extra precision: The only operations used are standard floating-point addition, subtraction, and multiplication in one working precision, for example, double precision. Certain constants used in the algorithm are proved to be optimal.