INS - Ingénierie Numérique et Sécurité

Code generators for mathematical functions and filters – MetaLibm

Submission summary

This project first addresses the implementation of elementary functions such as exponential or trigonometric. The standard mathematical library (libm) offers a small set of such functions in a small set of precisions. Performance of libm functions is of critical importance, in particular in scientific and financial computing. Therefore, they have always received special attention. For instance, processor manufacturers have teams of engineers who implement an optimized libm for each new processor, a time-consuming and error-prone task. A first objective of this project is therefore to automate libm development, up to the point where libms generated in a fraction of the time match in performance hand-coded ones for a wide range of targets: general-purpose processors, embedded processors, graphical processing units, and even FPGA and digital circuits.

Applications often require functions not present in the libm. In such case, a composition of libm functions may be very inefficient, or simply not possible (function defined by a differential equation or by interpolation of a set of data points for instance). Even the libm functions are offered in a limited choice of implementations which will most of the time poorly match the actual needs of an application in terms of range, accuracy, performance and resource consumption. The second objective of this project is is therefore to open the set of functions and contexts available to programmers. This qualitative progress will be enabled by automation: we aim at designing and distributing tools that implement mathematical functions on-demand for a given context. Such implementations can not be tested a priori, their accuracy needs to be proven by construction: this will be a pervasive concern in this project.

The process of implementing a mathematical function into code is composed of several steps, typically range reduction, approximation, evaluation. In the signal processing and control communities, a very similar process, based on similar steps, consists in implementing a digital filter out of its mathematical specification. In both cases, the final code or circuit consists of the same primitives (additions, multiplications, and pre-computed constant values). A third objective of this project is therefore to unify the understanding of function and filter development, sharing common mathematical, methodological, and implementation tools. In particular this will lead to on-demand generation of filters for the same breadth of targets and with the same guarantees on numerical quality.

To reach these three objectives, the method will be
- a systematic attempt to formalize the development process as a whole, up to the point where it can be described algorithmically,
- motivation by, and validation against, practical case studies from partners of the project and beyond,
- development of open-source code (and proof) generators.

The proposed consortium (INRIA/AriC, UPMC/LIP6, LIRMM, Kalray, CERN) gathers, around worldwide leaders in elementary functions, a number of expertises covering filters and control, a wide range of technological targets, and scientific and industrial applications.

Project coordination

Florent DUPONT DE DINECHIN (Centre de Recherche Inria Grenoble Rhone-Alpes)

The author of this summary is the project coordinator, who is responsible for the content of this summary. The ANR declines any responsibility as for its contents.


LIRMM/DALI Laboratoire d'Informatique, de Robotique et de Microélectronique de Montpellier, équipe DALI
UPMC/LIP6 Université Marie et Pierre Curie Paris 6, Laboratoire d'Informatique de Paris 6, équipe PEQUAN
Inria / SOCRATE Centre de Recherche Inria Grenoble Rhone-Alpes

Help of the ANR 622,779 euros
Beginning and duration of the scientific project: December 2013 - 48 Months

Useful links

Explorez notre base de projets financés



ANR makes available its datasets on funded projects, click here to find more.

Sign up for the latest news:
Subscribe to our newsletter