Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Rigorous Estimation of Floating-Point Round-Off Errors with Symbolic Taylor Expansions

Published: 11 December 2018 Publication History

Abstract

Rigorous estimation of maximum floating-point round-off errors is an important capability central to many formal verification tools. Unfortunately, available techniques for this task often provide very pessimistic overestimates, causing unnecessary verification failure. We have developed a new approach called Symbolic Taylor Expansions that avoids these problems, and implemented a new tool called FPTaylor embodying this approach. Key to our approach is the use of rigorous global optimization, instead of the more familiar interval arithmetic, affine arithmetic, and/or SMT solvers. FPTaylor emits per-instance analysis certificates in the form of HOL Light proofs that can be machine checked.
In this article, we present the basic ideas behind Symbolic Taylor Expansions in detail. We also survey as well as thoroughly evaluate six tool families, namely, Gappa (two tool options studied), Fluctuat, PRECiSA, Real2Float, Rosa, and FPTaylor (two tool options studied) on 24 examples, running on the same machine, and taking care to find the best options for running each of these tools. This study demonstrates that FPTaylor estimates round-off errors within much tighter bounds compared to other tools on a significant number of case studies. We also release FPTaylor along with our benchmarks, thus contributing to future studies and tool development in this area.

References

[1]
Jean-Marc Alliot, Nicolas Durand, David Gianazza, and Jean-Baptiste Gotteland. 2012a. Finding and proving the optimum: Cooperative stochastic and deterministic search. In Proceedings of the 20th European Conference on Artificial Intelligence (ECAI’12). ACM, 55--60.
[2]
Jean-Marc Alliot, Nicolas Durand, David Gianazza, and Jean-Baptiste Gotteland. 2012b. Implementing an interval computation library for OCaml on x86/AMD64 architectures (short paper). In Proceedings of the International Conference on Functional Programming (ICFP’12). ACM.
[3]
Marc Andrysco, Ranjit Jhala, and Sorin Lerner. 2016. Printing floating-point numbers: A faster, always correct method. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’16). ACM, 555--567.
[4]
Earl T. Barr, Thanh Vo, Vu Le, and Zhendong Su. 2013. Automatic detection of floating-point exceptions. In Proceedings of the 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’13). ACM, 549--560.
[5]
Jesse Bingham and Joe Leslie-Hurd. 2014. Verifying relative error bounds using symbolic simulation. In Proceedings of the 26th International Conference on Computer Aided Verification (CAV’14). Springer, 277--292.
[6]
Sylvie Boldo, François Clément, Jean-Christophe Filliâtre, Micaela Mayero, Guillaume Melquiond, and Pierre Weis. 2013. Wave equation numerical resolution: A comprehensive mechanized proof of a C program. Journal of Automated Reasoning (JAR) 50, 4 (2013), 423--456.
[7]
Sylvie Boldo, Jean-Christophe Filliâtre, and Guillaume Melquiond. 2009. Combining Coq and Gappa for certifying floating-point programs. In Proceedings of the 16th Symposium on the Integration of Symbolic Computation and Mechanised Reasoning (CALCULEMUS’09). Springer, 59--74.
[8]
Sylvie Boldo, Jacques-Henri Jourdan, Xavier Leroy, and Guillaume Melquiond. 2015. Verified compilation of floating-point computations. Journal of Automated Reasoning (JAR) 54, 2 (2015), 135--163.
[9]
Sylvie Boldo and Guillaume Melquiond. 2011. Flocq: A unified library for proving floating-point algorithms in Coq. In Proceedings of the IEEE Symposium on Computer Arithmetic. 243--252.
[10]
Angelo Brillout, Daniel Kroening, and Thomas Wahl. 2009. Mixed abstractions for floating-point arithmetic. In Formal Methods in Computer-Aided Design (FMCAD’09). 69--76.
[11]
Liqian Chen, Antoine Miné, and Patrick Cousot. 2008. A sound floating-point polyhedra abstract domain. In Proceedings of the 6th Asian Symposium on Programming Languages and Systems (APLAS’08). Springer, 3--18.
[12]
Wei-Fan Chiang, Mark Baranowski, Ian Briggs, Alexey Solovyev, Ganesh Gopalakrishnan, and Zvonimir Rakamarić. 2017. Rigorous floating-point mixed-precision tuning. In Proceedings of the ACM SIGPLAN Symposium on Principles of Programming Languages (POPL’17). ACM, 300--315.
[13]
Wei-Fan Chiang, Ganesh Gopalakrishnan, Zvonimir Rakamarić, and Alexey Solovyev. 2014. Efficient search for inputs causing high floating-point errors. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’14). ACM, 43--52.
[14]
Alessandro Cimatti, Alberto Griggio, BastiaanJoost Schaafsma, and Roberto Sebastiani. 2013. The MathSAT5 SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS’13), Lecture Notes in Computer Science, Vol. 7795. Springer, 93--107.
[15]
Coq 2016. The Coq Proof Assistant. http://coq.inria.fr.
[16]
Patrick Cousot and Radhia Cousot. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL’77). ACM, 238--252.
[17]
Patrick Cousot, Radhia Cousot, Jerôme Feret, Laurent Mauborgne, Antoine Miné, David Monniaux, and Xavier Rival. 2005. The ASTRÉE analyser. In Proceedings of the 14th European Symposium on Programming Languages and Systems (ESOP’05), Lecture Notes in Computer Science, Vol. 3444. Springer, 21--30.
[18]
Nasrine Damouche, Matthieu Martel, and Alexandre Chapoutot. 2017. Improving the numerical accuracy of programs by automatic transformation. International Journal on Software Tools for Technology Transfer (STTT) 19, 4 (2017), 427--448.
[19]
Catherine Daramy, David Defour, Florent de Dinechin, and Jean-Michel Muller. 2003. CR-LIBM: A correctly rounded elementary function library. Advanced Signal Processing Algorithms, Architectures, and Implementations XIII, SPIE 5205 (2003), 458--464.
[20]
Eva Darulova and Viktor Kuncak. 2011. Trustworthy numerical computation in Scala. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA’11). ACM, 325--344.
[21]
Eva Darulova and Viktor Kuncak. 2014. Sound compilation of reals. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’14). ACM, 235--248.
[22]
Eva Darulova and Viktor Kuncak. 2017. Towards a compiler for reals. ACM Trans. Program. Lang. Syst. 39, 2 (2017), 8:1--8:28.
[23]
Marc Daumas and Guillaume Melquiond. 2010. Certification of bounds on expressions involving rounded operators. ACM Trans. Math. Software 37, 1 (2010), Article 2, 20 pages.
[24]
Leonardo de Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS’08), Lecture Notes in Computer Science, Vol. 4963. Springer, Berlin, 337--340.
[25]
David Delmas, Eric Goubault, Sylvie Putot, Jean Souyris, Karim Tekkal, and Franck Védrine. 2009. Towards an industrial use of FLUCTUAT on safety-critical avionics software. In Formal Methods for Industrial Critical Systems (FMICS’09), Lecture Notes in Computer Science, Vol. 5825. Springer, Berlin, 53--69.
[26]
Laurent Fousse, Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier, and Paul Zimmermann. 2007. MPFR: A multiple-precision binary floating-point library with correct rounding. ACM Trans. Math. Software 33, 2 (2007).
[27]
Frama-C 2017. Frama-C Software Analyzers. Retrieved October 13, 2017 from http://frama-c.com/index.html.
[28]
Sicun Gao, Soonho Kong, and Edmund M. Clarke. 2013. dReal: An SMT solver for nonlinear theories over the reals. In Proceedings of the 24th International Conference on Automated Deduction (CADE’13). 208--214.
[29]
Attila Gáti. 2012. Miller analyzer for Matlab: A Matlab package for automatic roundoff analysis. Comput. Inf. 31, 4 (2012), 713--726.
[30]
Gelpia 2017. Gelpia: A Global Optimizer for Real Functions. Retrieved October 13, 2017 from https://github.com/soarlab/gelpia.
[31]
Dimitra Giannakopoulou, Falk Howar, Malte Isberner, Todd Lauderdale, Zvonimir Rakamarić, and Vishwanath Raman. 2014. Taming test inputs for separation assurance. In Proceedings of the 29th IEEE/ACM International Conference on Automated Software Engineering (ASE’14). ACM, 373--384.
[32]
David Goldberg. 1991. What every computer scientist should know about floating-point arithmetic. Comput. Surveys 23, 1 (March 1991), 5--48.
[33]
Alwyn Goodloe, César Muñoz, Florent Kirchner, and Loïc Correnson. 2013. Verification of numerical programs: From real numbers to floating point numbers. In Proceedings of the 5th NASA Formal Methods Symposium (NFM’13), Lecture Notes in Computer Science, Vol. 7871. Springer, 441--446.
[34]
Frédéric Goualard. 2014. How do you compute the midpoint of an interval? ACM Trans. Math. Software 40, 2, Article 11 (2014), 25 pages.
[35]
Frédéric Goualard. 2017. GAOL (Not Just Another Interval Library). Retrieved October 13, 2017 from http://frederic.goualard.net/#research-software.
[36]
Eric Goubault and Sylvie Putot. 2011. Static analysis of finite precision computations. In Proceedings of the International Workshop on Verification, Model Checking, and Abstract Interpretation (VMCAI’11), Lecture Notes in Computer Science, Vol. 6538. Springer, Berlin, 232--247.
[37]
Leopold Haller, Alberto Griggio, Martin Brain, and Daniel Kroening. 2012. Deciding floating-point logic with systematic abstraction. In Formal Methods in Computer-Aided Design (FMCAD’12). 131--140.
[38]
John Harrison. 2000. Formal verification of floating point trigonometric functions. In Proceedings of the 3rd International Conference on Formal Methods in Computer-Aided Design (FMCAD’00), Lecture Notes in Computer Science, Vol. 1954. Springer, 254--270.
[39]
John Harrison. 2006. Floating-point verification using theorem proving. In SFM 2006. Lecture Notes in Computer Science, Vol. 3965. Springer Berlin Heidelberg, 211--242.
[40]
John Harrison. 2009. HOL light: An overview. In TPHOLs 2009, Lecture Notes in Computer Science, Vol. 5674. Springer Berlin Heidelberg, 60--66.
[41]
2008. IEEE Standard for floating-point arithmetic. IEEE Std 754-2008 (2008), 1--70.
[42]
Charles Jacobsen, Alexey Solovyev, and Ganesh Gopalakrishnan. 2015. A parameterized floating-point formalization in HOL light. Electro. Notes Theor. Comput. Sci. 317 (2015), 101--107.
[43]
Steven G. Johnson. 2017. The NLopt Nonlinear-Optimization Package. Retrieved October 13, 2017 from https://nlopt.readthedocs.io/en/latest/.
[44]
William Kahan. 2006. How Futile Are Mindless Assessments of Roundoff in Floating-Point Computation? Retrieved October 13, 2017 from https://people.eecs.berkeley.edu/∼wkahan/Mindless.pdf.
[45]
R. Baker Kearfott. 2009. GlobSol user guide. Opt. Methods Softw. 24, 4--5 (2009), 687--708.
[46]
Yahia Lebbah. 2009. ICOS: A branch and bound based solver for rigorous global optimization. Optim. Methods Softw. 24, 4--5 (2009), 709--726.
[47]
Wonyeol Lee, Rahul Sharma, and Alex Aiken. 2016. Verifying bit-manipulations of floating-point. In Proceedings of the 37th Annual ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’16). 70--84.
[48]
Miriam Leeser, Saoni Mukherjee, Jaideep Ramachandran, and Thomas Wahl. 2014. Make it real: Effective floating-point reasoning via exact arithmetic. In Proceedings of the Conference on Design, Automation 8 Test in Europe (DATE’14). 1--4.
[49]
Michael D. Linderman, Matthew Ho, David L. Dill, Teresa H. Meng, and Garry P. Nolan. 2010. Towards program optimization through automated analysis of numerical precision. In Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO’10). ACM, 230--237.
[50]
Victor Magron, George Constantinides, and Alastair Donaldson. 2017. Certified roundoff error bounds using semidefinite programming. ACM Trans. Math. Software 43, 4 (Jan. 2017), Article 34, 31 pages.
[51]
Matthieu Martel. 2006. Semantics of roundoff error propagation in finite precision calculations. High.-Order Symb. Comput. 19, 1 (2006), 7--30.
[52]
Matthieu Martel. 2009. Program transformation for numerical precision. In Proceedings of the 2009 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM’09). ACM, 101--110.
[53]
Matthieu Martel. 2011. RangeLab: A static-analyzer to bound the accuracy of finite-precision computations. In Proceedings of the 13th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC’11). IEEE Computer Society, 118--122.
[54]
Érik Martin-Dorel, Laurence Rideau, Laurent Théry, Micaela Mayero, and Ioana Pasca. 2013. Certified, efficient and sharp univariate Taylor models in Coq. In Proceedings of the 2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC’13). IEEE, 193--200.
[55]
Maxima. 2013. Maxima, a Computer Algebra System. Version 5.30.0. Retrieved April 3, 2013 from http://maxima.sourceforge.net/.
[56]
Guillaume Melquiond. 2012. Floating-point arithmetic in the Coq system. Inf. Comput. 216 (2012), 14--23.
[57]
Piotr Mikusinski and Michael Taylor. 2002. An Introduction to Multivariable Analysis from Vector to Manifold. Birkhäuser Boston.
[58]
Webb Miller. 1975. Software for roundoff analysis. ACM. Math. Softw. 1, 2 (1975), 108--128.
[59]
R. E. Moore. 1966. Interval Analysis. Prentice-Hall.
[60]
Mark P. W. Mutrie, Richard H. Bartels, and Bruce W. Char. 1992. An approach for floating-point error analysis using computer algebra. In Papers from the International Symposium on Symbolic and Algebraic Computation (ISSAC’92). ACM, 284--293.
[61]
Anthony Narkawicz and César Munoz. 2013. A formally verified generic branching algorithm for global optimization. In Working Conference on Verified Software: Theories, Tools, and Experiments. Springer, 326--343.
[62]
NASA. 2017. NASA World Wind Java SDK. Retrieved October 13, 2017 from http://worldwind.arc.nasa.gov/java/.
[63]
Arnold Neumaier. 2003. Taylor forms—Use and limits. Reliab. Comput. 9, 1 (Feb. 2003), 43--79.
[64]
Arnold Neumaier. 2004. Complete search in continuous global optimization and constraint satisfaction. Acta Num. 13 (2004), 271--369.
[65]
OpenOpt. 2017. OpenOpt: Universal Numerical Optimization Package. Retrieved October 13, 2017 from http://openopt.org.
[66]
Gabriele Paganelli and Wolfgang Ahrendt. 2013. Verifying (in-)stability in floating-point programs by increasing precision, using SMT solving. In Symbolic and Numeric Algorithms for Scientific Computing (SYNASC’13). 209--216.
[67]
Pavel Panchekha, Alex Sanchez-Stern, James R. Wilcox, and Zachary Tatlock. 2015. Automatically improving accuracy for floating point expressions. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’15). ACM, 1--11.
[68]
Olivier Ponsini, Claude Michel, and Michel Rueher. 2014. Verifying floating-point programs with constraint programming and abstract interpretation techniques. Autom. Softw. Eng. (2014), 1--27.
[69]
Zvonimir Rakamarić and Michael Emmi. 2014. SMACK: Decoupling source language details from verifier implementations. In Computer Aided Verification (CAV’14), Lecture Notes in Computer Science, Vol. 8559. Springer International Publishing, 106--113.
[70]
N. Revol, K. Makino, and M. Berz. 2005. Taylor models and floating-point arithmetic: Proof that arithmetic operations are validated in COSY. J. Logic Algebr.c Program. 64, 1 (2005), 135--154.
[71]
Philipp Rümmer and Thomas Wahl. 2010. An SMT-LIB theory of binary floating-point arithmetic. In Informal Proceedings of the 8th International Workshop on Satisfiability Modulo Theories (SMT Workshop’10).
[72]
Alexey Solovyev. 2017. TOPLAS FPTaylor Results Table. Retrieved October 10, 2017 from http://tinyurl.com/TOPLAS-FPTaylor-Results-Table.
[73]
Alexey Solovyev and Thomas C. Hales. 2013. Formal verification of nonlinear inequalities with Taylor interval approximations. In NASA Formal Methods (NFM’13), Lecture Notes in Computer Science, Vol. 7871. Springer, Berlin, 383--397.
[74]
Alexey Solovyev, Charles Jacobsen, Zvonimir Rakamarić, and Ganesh Gopalakrishnan. 2015. Rigorous estimation of floating-point round-off errors with symbolic Taylor expansions. In Proceedings of the 20th International Symposium on Formal Methods Formal (FM’15). 532--550.
[75]
Jorge Stolfi and Luiz H. de Figueiredo. 2003. An introduction to affine arithmetic. TEMA Trends Appl. Comput. Math. 4, 3 (2003), 297--312.
[76]
David R. Stoutemyer. 1977. Automatic error analysis using computer algebraic manipulation. ACM Trans. Math. Software 3, 1 (1977), 26--43.
[77]
Microsoft Support. 2018. Floating-point arithmetic may give inaccurate results in Excel. https://support.microsoft.com/en-us/help/78113/floating-point-arithmetic-may-give-inaccurate-results-in-excel Last updated April 17, 2018.
[78]
Sonja Surjanovic and Derek Bingham. 2017. Trid Function. Retrieved October 10, 2017 from http://www.sfu.ca/%7Essurjano/trid.html Tridiagonal Examples.
[79]
Laura Titolo. 2017. Schloss Dagstuhl: Seminar Homepage. Retrieved October 10, 2017 from http://www.dagstuhl.de/en/program/calendar/semhp/?semnr=17352.
[80]
Eric Weisstein. 2017a. Chebyschev Polynomial of the First Kind—From Wolfram MathWorld. Retrieved October 10, 2017 from http://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html.
[81]
Eric Weisstein. 2017b. Legendre Polynomial—From Wolfram MathWorld. Retrieved October 13, 2017 from http://mathworld.wolfram.com/LegendrePolynomial.html.

Cited By

View all
  • (2024)Numerical Fuzz: A Type System for Rounding Error AnalysisProceedings of the ACM on Programming Languages10.1145/36564568:PLDI(1954-1978)Online publication date: 20-Jun-2024
  • (2024)Floating-Point TVPI Abstract DomainProceedings of the ACM on Programming Languages10.1145/36563958:PLDI(442-466)Online publication date: 20-Jun-2024
  • (2024)Arfa: An Agile Regime-Based Floating-Point Optimization Approach for Rounding ErrorsProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680378(1516-1528)Online publication date: 11-Sep-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems  Volume 41, Issue 1
March 2019
235 pages
ISSN:0164-0925
EISSN:1558-4593
DOI:10.1145/3299867
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 December 2018
Accepted: 01 June 2018
Revised: 01 March 2018
Received: 01 January 2017
Published in TOPLAS Volume 41, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Floating-point arithmetic
  2. IEEE floating-point standard
  3. formal verification
  4. global optimization
  5. mixed-precision arithmetic
  6. round-off error

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)416
  • Downloads (Last 6 weeks)63
Reflects downloads up to 21 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Numerical Fuzz: A Type System for Rounding Error AnalysisProceedings of the ACM on Programming Languages10.1145/36564568:PLDI(1954-1978)Online publication date: 20-Jun-2024
  • (2024)Floating-Point TVPI Abstract DomainProceedings of the ACM on Programming Languages10.1145/36563958:PLDI(442-466)Online publication date: 20-Jun-2024
  • (2024)Arfa: An Agile Regime-Based Floating-Point Optimization Approach for Rounding ErrorsProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680378(1516-1528)Online publication date: 11-Sep-2024
  • (2024)VCFloat2: Floating-Point Error Analysis in CoqProceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3636501.3636953(14-29)Online publication date: 9-Jan-2024
  • (2024)Implementation and Synthesis of Math Library FunctionsProceedings of the ACM on Programming Languages10.1145/36328748:POPL(942-969)Online publication date: 5-Jan-2024
  • (2024)A Holistic Approach to Automatic Mixed-Precision Code Generation and Tuning for Affine ProgramsProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638484(55-67)Online publication date: 2-Mar-2024
  • (2024)Predicting Performance and Accuracy of Mixed-Precision Programs for Precision TuningProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3623338(1-13)Online publication date: 20-May-2024
  • (2024)Rounding Error Analysis of an Orbital Collision Probability Evaluation Algorithm2024 IEEE 31st Symposium on Computer Arithmetic (ARITH)10.1109/ARITH61463.2024.00025(96-103)Online publication date: 10-Jun-2024
  • (2024)Formalizing Date Arithmetic and Statically Detecting Ambiguities for the LawProgramming Languages and Systems10.1007/978-3-031-57267-8_16(421-450)Online publication date: 5-Apr-2024
  • (2023)Formal Verification of a Controller Implementation in Fixed-Point Arithmetic2023 European Control Conference (ECC)10.23919/ECC57647.2023.10178283(1-6)Online publication date: 13-Jun-2023
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media