Sign in


Arpra is a C library for analyzing the propagation of numerical error in arbitrary precision IEEE-754 floating-point computations.

488 commits | Last commit 10 months ago

Cite this software

What Arpra can do for you

Arpra is a C library for (Ar)bitrary-(p)recision (r)ange (a)nalysis of IEEE-754 floating-point computations, based on GNU MPFR. The main use-case of Arpra is to maintain computed upper and lower bounds of numerical error for all variables, at all times, throughout a computation. Arpra uses mixed trimmed interval/affine arithmetic with deviation term reduction to accomplish this.

Affine arithmetic is a variant of interval arithmetic which accounts for variable correlations. As such, it does not suffer from the so-called 'dependency problem', where intervals grow overly large due to lack of consideration for variable correlations. The problem is described further at By combining the results of interval arithmetic and affine arithmetic, one avoids both the dependency problem of interval arithmetic, and the nonlinear function overshoot/undershoot problem of affine arithmetic.

Arpra implements affine arithmetic using a GNU MPFR backend. MPFR is an arbitrary-precision floating-point library, meaning the floating-point MPFR variables can be of arbitrary precision. For more information, refer to the MPFR project website at By implementing affine arithmetic with an arbitrary-precision backend, one is able, for example, to test how a change in numerical precision or integration scheme affects local and global error during a long numerical simulation, without the interval 'explosion' problem regular interval arithmetic suffers from.

For further information on the implementation and features of Arpra, such as range trimming and deviation term reduction, refer to the original published article:

Turner, J. P., & Nowotny, T. (2021). Arpra: An Arbitrary Precision Range Analysis Library. Frontiers in Neuroinformatics, 30.

Programming languages
  • C 98%
  • M4 1%
  • Makefile 1%
  • LGPL-3.0
</>Source code

Participating organisations

University of Sussex


James Turner