Floating-point numbers round-off error analysis by constraint programming

Author: 

Rémy Garcia

School: 

Université Côte d'Azur, Nice, France

Supervisors: 

Claude Michel, Université Côte d'Azur, Nice, France
Michel Rueher, Université Côte d'Azur, Nice, France

Abstract: 

Floating-point numbers are used in many applications to perform computations, often without the user’s knowledge. The mathematical models of these applications use real numbers that are often not representable on a computer. Indeed, a finite binary representation is not sufficient to represent the continuous and infinite set of real numbers. The problem is that computing with floating-point numbers often introduces a rounding error compared to its equivalent over real numbers. Knowing the order of magnitude of this error is essential in order to correctly understand the behaviour of a program. Many error analysis tools calculate an over-approximation of the errors. These over-approximations are often too coarse to effectively assess the impact of the error on the behaviour of the program. Other tools calculate an under-approximation of the maximum error, i.e., the largest possible error in absolute value. These under-approximations are either incorrect or unreachable. In this thesis, we propose a constraint system capable of capturing and reasoning about the error produced by a program that performs computations with floating-point numbers. We also propose an algorithm to search for the maximum error. For this purpose, our algorithm computes both a rigorous over-approximation and a rigorous under-approximation of the maximum error. An over-approximation is obtained from the constraint system for the errors, while a reachable under-approximation is produced using a generate-and-test procedure and a local search. Our algorithm is the first to combine both an over-approximation and an under-approximation of the error. Our methods are implemented in a solver, called FErA. Performance on a set of common problems is competitive: the rigorous enclosure produced is accurate and compares well with other state-of-the-art tools.

Keywords: constraint programming, floating-point numbers, round-off error, error analysis, constraints over errors, optimization


Les nombres à virgule flottante sont utilisés dans de nombreuses applications pour effectuer des calculs, souvent à l’insu de l’utilisateur. Les modèles mathématiques de ces applications utilisent des nombres réels qui ne sont souvent pas représentables sur un ordinateur. En effet, une représentation binaire finie n’est pas suffisante pour représenter l’ensemble continu et infini des nombres réels. Le problème est que le calcul avec des nombres à virgule flottante introduit souvent une erreur d’arrondi par rapport à son équivalent sur les nombres réels. Connaître l’ordre de grandeur de cette erreur est essentiel afin de comprendre correctement le comportement d’un programme. De nombreux outils en analyse d’erreurs calculent une sur-approximation des erreurs. Ces sur-approximations sont souvent trop grossières pour évaluer efficacement l’impact de l’erreur sur le comportement du programme. D’autres outils calculent une sous-approximation de l’erreur maximale, i.e., la plus grande erreur possible en valeur absolue. Ces sous-approximations sont soit incorrectes, soit inatteignables. Dans cette thèse, nous proposons un système de contraintes capable de capturer et de raisonner sur l’erreur produite par un programme qui effectue des calculs avec des nombres à virgule flottante. Nous proposons également un algorithme afin de chercher l’erreur maximale. Pour cela, notre algorithme calcule à la fois une sur-approximation et une sous approximation rigoureuses de l’erreur maximale. Une sur-approximation est obtenue à partir du système de contraintes pour les erreurs, tandis qu’une sous-approximation atteignable est produite à l’aide d’une procédure générer-et-tester et d’une recherche locale. Notre algorithme est le premier à combiner à la fois une sur-approximation et une sous-approximation de l’erreur. Nos méthodes sont implémentées dans un solveur, appelé FErA. Les performances sur un ensemble de problèmes communs sont compétitives : l’encadrement rigoureux produit est précis et se compare bien par rapport aux autres outils de l’état de l’art.

Mots-clés : programmation par contraintes, nombres à virgule flottante, erreur d’arrondi, analyse d’erreurs, contraintes sur les erreurs, optimisation

Graduated: 

Wednesday, September 8, 2021

PDF of thesis: