On sound relative error bounds for floating-point arithmetic

State-of-the-art static analysis tools for verifying finite-precision code compute worst-case absolute error bounds on numerical errors. These are, however, often not a good estimate of accuracy as they do not take into account the magnitude of the computed values. Relative errors, which compute errors relative to the value's magnitude, are thus preferable. While today's tools do report relative error bounds, these are merely computed via absolute errors and thus not necessarily tight or more informative. Furthermore, whenever the computed value is close to zero on part of the domain, the tools do not report any relative error estimate at all. Surprisingly, the quality of relative error bounds computed by today's tools has not been systematically studied or reported to date. In this paper, we investigate how state-of-the-art static techniques for computing sound absolute error bounds can be used, extended and combined for the computation of relative errors. Our experiments on a standard benchmark set show that computing relative errors directly, as opposed to via absolute errors, is often beneficial and can provide error estimates up to six orders of magnitude tighter, i.e. more accurate. We also show that interval subdivision, another commonly used technique to reduce over-approximations, has less benefit when computing relative errors directly, but it can help to alleviate the effects of the inherent issue of relative error estimates close to zero.

[1]  Jean-Michel Muller,et al.  On the maximum relative error when computing x^n in floating-point arithmetic , 2014, ArXiv.

[2]  Bronis R. de Supinski,et al.  Abstract: Automatically Adapting Programs for Mixed-Precision Floating-Point Computation , 2013, 2012 SC Companion: High Performance Computing, Networking Storage and Analysis.

[3]  Sebastian Hack,et al.  A dynamic program analysis to find floating-point accuracy problems , 2012, PLDI.

[4]  Ganesh Gopalakrishnan,et al.  A Parameterized Floating-Point Formalizaton in HOL Light , 2015, NSV.

[5]  Guillaume Melquiond,et al.  Flocq: A Unified Library for Proving Floating-Point Algorithms in Coq , 2011, 2011 IEEE 20th Symposium on Computer Arithmetic.

[6]  Edmund M. Clarke,et al.  dReal: An SMT Solver for Nonlinear Theories over the Reals , 2013, CADE.

[7]  Viktor Kuncak,et al.  Sound compilation of reals , 2013, POPL.

[8]  Cesare Tinelli,et al.  An Automatable Formal Semantics for IEEE-754 Floating-Point Arithmetic , 2015, 2015 IEEE 22nd Symposium on Computer Arithmetic.

[9]  Daniel Kroening,et al.  Deciding floating-point logic with abstract conflict driven clause learning , 2013, Formal Methods in System Design.

[10]  Bertrand Jeannet,et al.  Apron: A Library of Numerical Abstract Domains for Static Analysis , 2009, CAV.

[11]  Pavel Panchekha,et al.  Automatically improving accuracy for floating point expressions , 2015, PLDI.

[12]  Alexander Aiken,et al.  Verifying bit-manipulations of floating-point , 2016, PLDI.

[13]  Claude Marché,et al.  Multi-Prover Verification of Floating-Point Programs , 2010, IJCAR.

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

[15]  Ganesh Gopalakrishnan,et al.  Efficient search for inputs causing high floating-point errors , 2014, PPoPP '14.

[16]  Guillaume Melquiond,et al.  Journal of Automated Reasoning manuscript No. (will be inserted by the editor) Wave Equation Numerical Resolution: a Comprehensive Mechanized Proof of a C Program , 2022 .

[17]  Teresa H. Y. Meng,et al.  Towards program optimization through automated analysis of numerical precision , 2010, CGO '10.

[18]  Jorge Stolfi,et al.  Affine Arithmetic: Concepts and Applications , 2004, Numerical Algorithms.

[19]  G. W. Stewart,et al.  Dynamic floating-point cancellation detection , 2013, Parallel Comput..

[20]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[21]  James Demmel,et al.  IEEE Standard for Floating-Point Arithmetic , 2008 .

[22]  Viktor Kuncak,et al.  Towards a Compiler for Reals , 2014, ACM Trans. Program. Lang. Syst..

[23]  Patrick Cousot,et al.  A Sound Floating-Point Polyhedra Abstract Domain , 2008, APLAS.

[24]  Tahina Ramananandro,et al.  A unified Coq framework for verifying C programs with floating-point computations , 2016, CPP.

[25]  Philipp Rümmer,et al.  An SMT-LIB Theory of Binary Floating-Point Arithmetic ∗ , 2010 .

[26]  Eric Goubault,et al.  Static Analysis of Finite Precision Computations , 2011, VMCAI.

[27]  James Demmel,et al.  Precimonious: Tuning assistant for floating-point precision , 2013, 2013 SC - International Conference for High Performance Computing, Networking, Storage and Analysis (SC).

[28]  Leonardo Mendonça de Moura,et al.  Solving non-linear arithmetic , 2012, ACCA.

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

[30]  Guillaume Melquiond,et al.  Certification of bounds on expressions involving rounded operators , 2007, TOMS.

[31]  Xavier Leroy,et al.  A Formally-Verified C Static Analyzer , 2015, POPL.