Accurate Sum and Dot Product
Abstract
Algorithms for summation and dot product of floating-point numbers are presented which are fast in terms of measured computing time. We show that the computed results are as accurate as if computed in twice or K-fold working precision, $K\ge 3$. For twice the working precision our algorithms for summation and dot product are some 40% faster than the corresponding XBLAS routines while sharing similar error estimates. Our algorithms are widely applicable because they require only addition, subtraction, and multiplication of floating-point numbers in the same working precision as the given data. Higher precision is unnecessary, algorithms are straight loops without branch, and no access to mantissa or exponent is necessary.
[1] , A distillation algorithm for floating‐point summation, SIAM J. Sci. Comput., 20 (1999), 1797–1806 2000k:65248
[2]
[3] , Numerical stability in mathematical analysis, North‐Holland, Amsterdam, 1969, 11–23 41:4854
[4]
[5] , A Fortran‐90 based multiprecision system, ACM Trans. Math. Software, 21 (1995), pp. 379–387. att ACMSCU 0098-3500 ACM Trans. Math. Softw.
[6] , Floating‐point computation of functions with maximum accuracy, IEEE Trans. Computers, C‐26 (1977), 621–632 56:9908
[7]
[8]
[9]
[10] , A floating‐point technique for extending the available precision, Numer. Math., 18 (1971), pp. 224–242. num NUMMA7 0029-599X Numer. Math.
[11] , Accurate and efficient floating point summation, SIAM J. Sci. Comput., 25 (2003/04), 1214–1248 2005b:65055
[12] Johannes Grabmeier, , Erich Kaltofen and , Volker Weispfenning, Computer algebra handbook, Springer‐Verlag, 2003xx+637, Foundations. Applications. Systems; With 1 CD‐ROM (Windows, Macintosh) 2004h:68001
[13] , Handling floating‐point exceptions in numeric programs, ACM Trans. Program. Lang. Syst., 18 (1996), pp. 139–174.
[14] , The accuracy of floating point summation, SIAM J. Sci. Comput., 14 (1993), 783–799 94a:65025
[15] , Accuracy and stability of numerical algorithms, Society for Industrial and Applied Mathematics (SIAM), 2002xxx+680 2003g:65064
[16]
[17] , A note on floating‐point summation of very many terms, Elektron. Informationsverarb. Kybernet., 19 (1983), 435–440 85c:65161
[18] , The accurate solution of certain continuous problems using only single precision arithmetic, BIT, 25 (1985), 635–651 87d:65053
[19]
[20]
[21]
[22] , Summation algorithm with corrections and some of its applications, Math. Stos., 1 (1973), pp. 22–41.
[23] , The art of computer programming. Vol. 2: Seminumerical algorithms, Addison‐Wesley Publishing Co., Reading, Mass.‐London‐Don Mills, Ont, 1969xi+624 44:3531
[24] , The arithmetic of the digital computer: a new approach, SIAM Rev., 28 (1986), 1–40 87e:65030
[25] , Parallel algorithms for the rounding exact summation of floating point numbers, Computing, 28 (1982), 89–104 83c:68009
[26] , Design, implementation and testing of extended and mixed precision BLAS, ACM Trans. Math. Software, 28 (2002), pp. 152–205. att ACMSCU 0098-3500 ACM Trans. Math. Softw.
[27] , Software for doubled‐precision floating‐point computations, ACM Trans. Math. Software, 7 (1981), 272–283 82h:68041
[28] , On accurate floating‐point summation, Comm. ACM, 14 (1971), 731–736 47:4434
[29] , Quasi double‐precision in floating point addition, Nordisk Tidskr. Informations‐Behandling, 5 (1965), 37–50 31:5359
[30]
[31] , Rundungsfehleranalyse einiger Verfahren zur Summation endlicher Summen, Z. Angew. Math. Mech., 54 (1974), 39–51 51:14556
[32] , Das Kahan‐Babuškasche Summierungsverfahren in Triplex‐ALGOL 60, Z. Angew. Math. Mech., 50 (1970), pp. 369–373. zam ZAMMAX 0044-2267 Z. Angew. Math. Mech.
[33] , Scalar fused multiply‐add instructions produce floating‐point matrix arithmetic provably accurate to the penultimate digit, ACM Trans. Math. Software, 29 (2003), 27–48 2001452
[34]
[35] , Correction d’une somme en arithmétique à virgule flottante, Numer. Math., 19 (1972), 400–406 48:3241
[36]
[37]
[38] , Reducing truncation errors using cascading accumulators, Comm. ACM, 8 (1965), pp. 32–33. cao CACMA2 0001-0782 Commun. ACM
[39]
[40] J. Rohn, , T. Yamamoto and , S. Rump, Special issue on linear algebra in self‐validating methods, Elsevier Science B.V., 2001i–iv and 1–235, Linear Algebra Appl. 324 (2001), no. 1‐3 2001i:65005
[41] , Adaptive precision floating‐point arithmetic and fast robust geometric predicates, Discrete Comput. Geom., 18 (1997), 305–363, ACM Symposium on Computational Geometry (Philadelphia, PA, 1996) 98m:65238
[42] , Iterative refinement implies numerical stability for Gaussian elimination, Math. Comp., 35 (1980), 817–832 83e:65058
[43]
[44] , Genaue Lösung linearer Gleichungssysteme, GAMM Mitt. Ges. Angew. Math. Mech., 26 (2003), 7–107 2005d:65069