Code generation for argument filtering and argument reduction in elementary functions

Florent De Dinechin 1, 2 Claude-Pierre Jeannerod 1 David Pfannholzer 1 Nathalie Revol 1
1 ARENAIRE - Computer arithmetic
Inria Grenoble - Rhône-Alpes, LIP - Laboratoire de l'Informatique du Parallélisme
Abstract : Computer platforms need implementations of elementary functions (exponential, logarithm, trigonometric, etc.) that are both efficient and reliable. Such an implementation relates a function (in the mathematical sense), input and output formats (for instance IEEE floating-point in single or double precision), and the constraints and capabilities of the target (hardware floating-point support or not, available parallelism, etc.). The quality (performance, memory consumption, accuracy, etc.) of the implementation depends on the algorithms chosen. In addition, it is often possible to control performance/cost/accuracy tradeoffs by means of implementation parameters. Code generation is a means to manage the resulting complexity, while maintaining confidence in the resulting code. A code generator may explore the parameter space and perform optimizations before actually producing the code. The implementation of a function often reduces to polynomial approximation, for which several approaches to code generation have been studied. Here, we focus on code generation for the remaining parts of the implementation: special case management (detecting overflows or underflows, or proving that they cannot happen), range reduction, and reconstruction. Indeed, these are the parts of the code where the features of the input and output formats are used. This work presents a code generator framework that abstracts the function, the target hardware, and the input and output formats, in a way that enables automatic code generation for special case management. It is demonstrated on several functions of the C99 standard. Its extension to generic techniques of range reduction is also discussed.
Type de document :
Communication dans un congrès
SCAN 2010: 14th GAMM-IMACS International Symposium on Scientific Computing, Computer Arithmetic and Validated Numerics, Sep 2010, Lyon, France. 2010
Liste complète des métadonnées

https://hal.inria.fr/inria-00544808
Contributeur : Nathalie Revol <>
Soumis le : jeudi 9 décembre 2010 - 02:32:22
Dernière modification le : vendredi 20 avril 2018 - 15:44:24

Identifiants

  • HAL Id : inria-00544808, version 1

Collections

Citation

Florent De Dinechin, Claude-Pierre Jeannerod, David Pfannholzer, Nathalie Revol. Code generation for argument filtering and argument reduction in elementary functions. SCAN 2010: 14th GAMM-IMACS International Symposium on Scientific Computing, Computer Arithmetic and Validated Numerics, Sep 2010, Lyon, France. 2010. 〈inria-00544808〉

Partager

Métriques

Consultations de la notice

223