A Probabilistic Approach to Floating-Point Arithmetic

Finite-precision floating point arithmetic unavoidably introduces rounding errors which are traditionally bounded using a worst-case analysis. However, worst-case analysis might be overly conservative because worst-case errors can be extremely rare events in practice. Here we develop a probabilistic model of rounding errors with which it becomes possible to estimate the likelihood that the rounding error of an algorithm lies within a given interval. Given an input distribution, we show how to compute the distribution of rounding errors. We do this exactly for low precision arithmetic, for high precision arithmetic we derive a simple approximation. The model is then entirely compositional: given a numerical program written in a simple imperative programming language we can recursively compute the distribution of rounding errors at each step of the computation and propagate it through each program instruction. This is done by applying a formalism originally developed by Kozen to formalize the semantics of probabilistic programs. We then discuss an implementation of the model and use it to perform probabilistic range analyses on some benchmarks.

[1]  Eva Darulova,et al.  Sound Probabilistic Numerical Error Analysis , 2019, IFM.

[2]  Heiko Becker,et al.  Daisy - Framework for Analysis and Optimization of Numerical Programs (Tool Paper) , 2018, TACAS.

[3]  George A. Constantinides,et al.  Certified Roundoff Error Bounds Using Semidefinite Programming , 2015, ACM Trans. Math. Softw..

[4]  S. Jaroszewicz,et al.  PaCAL: A Python Package for Arithmetic Computations with Random Variables , 2014 .

[5]  Ganesh Gopalakrishnan,et al.  Rigorous Estimation of Floating-Point Round-off Errors with Symbolic Taylor Expansions , 2015, FM.

[6]  Lloyd N. Trefethen,et al.  An Extension of MATLAB to Continuous Functions and Operators , 2004, SIAM J. Sci. Comput..

[7]  P. R. Nelson The algebra of random variables , 1979 .

[8]  Nicholas J. Higham,et al.  A New Approach to Probabilistic Rounding Error Analysis , 2019, SIAM J. Sci. Comput..

[9]  Ilse C. F. Ipsen,et al.  Probabilistic Error Analysis for Inner Products , 2019, SIAM J. Matrix Anal. Appl..

[10]  Dexter Kozen,et al.  Semantics of probabilistic programs , 1979, 20th Annual Symposium on Foundations of Computer Science (sfcs 1979).

[11]  D. Stott Parker,et al.  Monte Carlo Arithmetic: exploiting randomness in floating-point arithmetic , 1997 .

[12]  Matthieu Martel,et al.  Toward a Standard Benchmark Format and Suite for Floating-Point Analysis , 2016, NSV@CAV.

[13]  J. Neumann,et al.  Numerical inverting of matrices of high order , 1947 .

[14]  Wayne Luk,et al.  Synthesis and optimization of DSP algorithms , 2004 .

[15]  Szymon Jaroszewicz,et al.  Arithmetic Operations on Independent Random Variables: A Numerical Approach , 2012, SIAM J. Sci. Comput..

[16]  Nicholas J. Higham,et al.  INVERSE PROBLEMS NEWSLETTER , 1991 .