Related sites: University of Antwerp | Department of Mathematics and Computer Science

# CANT Research Group

Navigation: Precompiler

# Introduction

The precompiler is an easy to use, generic tool for the conversion of C or C++ source code into new code that uses a C++ multi-precision library of choice. On this site you can download the sources of the precompiler, find information on how to run the precompiler, while elaborate examples are given here. These examples show some of the more advanced features of the precompiler.

Information and background on the precompiler can be found in :

    @article{
      author      = {Schreppers, W. and Cuyt, A},
      title       = {Algorithm XXX: A C/C++ precompiler for the autogeneration of multiprecision programs},
      journal     = {ACM TOMS},
      volume      = {},
      number      = {},
      pages       = {},
      year        = {2006}
    }

^ TOP

## Abstract

In the past decade a number of libraries for multi-precision floating-point arithmetic have been developed. Just one of these libraries comes with a transcription program to automatically convert existing source code, using hardware precisions, into code that uses the multi-precision types of the library. We describe an easy to use, generic C/C++ transcription program or precompiler for the conversion of C or C++ source code into new code that uses a C++ multi-precision library of choice. The precompiler can convert any type in the input source code to another type in the output source code. The input source can be either C or C++, while the output code generated by the precompiler and using the new types, is C++. The type conversion is based on a simple XML configuration file which is provided by either the developer of the multi-precision library or by the user of the precompiler. The precompiler can also convert to data types with additional features, which are not supported in the types of the source code. Applicability of the precompiler is shown with the successful conversion of large subsets of the GNU Scientific Library and Numerical Recipes.

^ TOP

## Contact

Walter Schreppers
Annie Cuyt