The RealLib Project

RealLib is a real number computation package in C++. Its primary aim is to be efficient and to avoid the huge overheads usually associated with real number computations.

RealLib3, which is the current version of the library, makes this possible. In this version of the library, the user can work on both a layer where numbers are represented as terms describing the computation, and a layer where functions on real numbers compute on the level of approximations to the real number. The latter can be very fast, depending on the precision that is actually required by the computation. In the cases where machine precision is sufficient, exact real computations can be executed at a speed comparable to the speed of double precision arithmetic, sometimes even running on par with it.

Version 3 comes with a detailed user manual that describes the system from the user's point of view and shows how such fast computations are made possible. An introductory paper, which contains performance comparison to two other real number packages and to machine precision floating point, is also available. The theoretical background, an approach to use Type-1 functions for real number computations, is described in a separate paper.

RealLib started its existence as my Master's Thesis at the University of Sofia as a package that implemented primitive recursive computation on real numbers and functions using an approach similar to the domain theoretic model for computable analisys. At the University of Aarhus we managed to add substantial new features to the theoretical model, extending it to form a two-layer approach that can also be used to refer to complexity of real functions, which is not available in other models that are similar to it.

In parallel to this work, the implementation was also extended to a two-layer structure. The top layer represents real numbers as complete entities available to the user, and the bottom layer represents real numbers and functions as program code using the approach of partial approximation representations defined in the model. The separation allows to have uncompromised efficiency while maintaining soundness with the theory and ability to be used in any context. The other existing real number systems fail to comply with at least one of the sides of this requirement.

In Version 3 the library was extended to allow a machine-precision first stage in the bottom layer, very significantly (over 100 times) increasing the performance of the first stage of the computation. With this improvement, the system can run very close to the hardware and the difference between running a machine precision implementation of a function and its exact counterpart in RealLib3's approximation layer is little enough (usually around 3-4 times slower) to make exact real computations feasible for general use.

The second version contained an initial implementation of the theoretical ideas. It can be downloaded via this link:
RealLib version 2 (tgz)
A two-layer approach for computability and complexity in Analysis (pdf)

The initial version of the system, as presented at my Master's Defense in November 2001 in Sofia, along with the thesis, can also be downloaded:
RealLib version 1 (zip)
A practical view on the computability of real numbers (pdf, in Bulgarian , abstract, pdf, in English)


Back to homepage