Certifying the Floating-Point Implementation of an Elementary Function Using Gappa
Florent Dupont de Dinechin, Christoph Lauter, Guillaume Melquiond · 2010 · 138 citationsRead the paper
High confidence in floating-point programs requires proving numerical properties of final and intermediate values. One may need to guarantee that a value stays within some range, or that the error relative to some ideal value is well bounded. This certification may require a time-consuming proof for each line of code, and it is usually broken by the smallest change to the code, e.g., for maintenance or optimization purpose. Certifying floating-point programs by hand is, therefore, very tedious and error-prone. The Gappa proof assistant is designed to make this task both easier and more secure, due to the following novel features: It automates the evaluation and propagation of rounding errors using interval arithmetic. Its input format is very close to the actual code to validate. It can be used incrementally to prove complex mathematical properties pertaining to the code. It generates a formal proof of the results, which can be checked independently by a lower level proof assistant like Coq. Yet it does not require any specific knowledge about automatic theorem proving, and thus, is accessible to a wide community. This paper demonstrates the practical use of this tool for a widely used class of floating-point programs: implementations of elementary functions in a mathematical library.
What the full text shows
Working prototype- Demonstrated the ability to prove tight error bounds for a correctly rounded elementary function implementation. — Epstotal in [-1b-67, 1b-67] (|yl / yh| <= 1b-53, |Yhl| in [1b-200, 6.29e-03], |yh| in [1b-1000, 1], |Epsargred| <= 2.53e-23, |Epsapprox| <= 2.26e-24)
- Validated the Fast2Sum algorithm's ability to compute the rounding error of a sum. (IEEE-754 round-to-nearest, |a| >= |b|)
- Setup
- Straight-line floating-point programs of reasonable size (up to several hundred operations), specifically applied to the CRlibm mathematical library.
- How
- The Gappa proof assistant uses interval arithmetic and built-in rewriting rules to automate the evaluation and propagation of rounding errors. It allows interactive proof construction and generates formal proofs checkable by Coq or PVS.
- Limitations
- Iterative codes (loops) are currently out of scope. · Requires manual guidance/hints and domain knowledge; not fully automatic. · Some proofs may require the -Munconstrained flag if the tool cannot prove denominators are non-null.
Summarized by Gemma 4 from the open-access full text · 26 Nov 2026. Read it