Algorithm 871 : a C/C++ precompiler for autogeneration of multiprecision programsAlgorithm 871 : a C/C++ precompiler for autogeneration of multiprecision programs
Faculty of Sciences. Mathematics and Computer Science
2008New York, N.Y., 2008
ACM transactions on mathematical software. - New York, N.Y.
University of Antwerp
In the past decade a number of libraries for multiprecision floating-point arithmetic have been developed. 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++ multiprecision 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 multiprecision 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.