Paper
^ 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
Complete paper
Here all source files for creating the paper and website of the precompiler can be downloaded. Also in the paper we refer to the conversion and skip file schema specifications, these can also be downloaded below. The extra command line options for arithmos are on the usage page.
Details on adding new conversion functions to the Convert class (as the paper states on pages 6 and 11) are on examples page. There are also some bash scripts available for automating the gsl conversion here.
precompile.pdf | PDF format |
precompile.ps | PhostScript |
convert.schema | XML Schema of the conversion configuration file (the paper refers to this on page 3) |
skip.schema | XML Schema of the skip configuration file (the paper refers to this on page 3) |
precompiler-acmtoms.tar.gz | Bundled files (source tex files and makefile to generate pdf and ps) |