Code generation for argument filtering and argument reduction in elementary functions - Archive ouverte HAL Access content directly
Conference Papers Year : 2010

Code generation for argument filtering and argument reduction in elementary functions

(1, 2) , (1) , (1) , (1)
1
2

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.
Not file

Dates and versions

inria-00544808 , version 1 (09-12-2010)

Identifiers

  • HAL Id : inria-00544808 , version 1

Cite

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, Revol, Nathalie and de Dinechin, Florent and Jeannerod, Claude-Pierre and Lefèvre, Vincent and Louvet, Nicolas and Morin, Sèverine and Nguyen, Hong Diep, Sep 2010, Lyon, France. ⟨inria-00544808⟩
102 View
0 Download

Share

Gmail Facebook Twitter LinkedIn More