Stochastic rounding: implementation, error analysis and applications
- PMID: 35291325
- PMCID: PMC8905452
- DOI: 10.1098/rsos.211631
Stochastic rounding: implementation, error analysis and applications
Abstract
Stochastic rounding (SR) randomly maps a real number x to one of the two nearest values in a finite precision number system. The probability of choosing either of these two numbers is 1 minus their relative distance to x. This rounding mode was first proposed for use in computer arithmetic in the 1950s and it is currently experiencing a resurgence of interest. If used to compute the inner product of two vectors of length n in floating-point arithmetic, it yields an error bound with constant with high probability, where u is the unit round-off. This is not necessarily the case for round to nearest (RN), for which the worst-case error bound has constant nu. A particular attraction of SR is that, unlike RN, it is immune to the phenomenon of stagnation, whereby a sequence of tiny updates to a relatively large quantity is lost. We survey SR by discussing its mathematical properties and probabilistic error analysis, its implementation, and its use in applications, with a focus on machine learning and the numerical solution of differential equations.
Keywords: IEEE 754; bfloat16; binary16; floating-point arithmetic; machine learning; rounding error analysis.
© 2022 The Authors.
Conflict of interest statement
We declare we have no competing interests.
Figures
References
-
- Connolly MP, Higham NJ, Mary T. 2021. Stochastic rounding and its probabilistic backward error analysis. SIAM J. Sci. Comput. 43, A566-A585. (10.1137/20M1334796) - DOI
-
- Higham NJ, Pranesh S. 2019. Simulating low precision floating-point arithmetic. SIAM J. Sci. Comput. 41, C585-C602. (10.1137/19M1251308) - DOI
-
- Forsythe GE. 1950. Round-off errors in numerical integration on automatic machinery. Bull. Am. Math. Soc. 56, 55-64. (10.1090/S0002-9904-1950-09343-4) - DOI
-
- Huskey HD. 1949. On the precision of a certain procedure of numerical integration. With an appendix by Douglas R. Hartree. J. Res. Nat. Bur. Stand. 42, 57-62. (10.6028/jres.042.005) - DOI
-
- Barnes RCM, Cooke-Yarborough EH, Thomas DGA. 1951. An electronic digital computor using cold cathode counting tubes for storage. Electron. Eng. 23, 286-291. (doi:10.1088/1674-4926/41/2/022404) - DOI
Publication types
LinkOut - more resources
Full Text Sources
Research Materials
