lrsarith: a small fixed/hybrid arithmetic C library
David Avis, Charles Jordan

TL;DR
lrsarith is a compact C library providing fixed and hybrid precision arithmetic for integers and rationals, enhancing polyhedral computations with overflow control and minimal code modifications.
Contribution
It introduces a flexible, small C library supporting fixed and hybrid arithmetic modes for integers and rationals, integrated into lrslib for polyhedral computations.
Findings
Hybrid mode effectively manages overflow in computations.
Performance varies with fixed, GMP, and hybrid arithmetic modes.
Minimal code changes needed for integration into existing software.
Abstract
We describe lrsarith which is a small fixed precision and hybrid arithmetic C library for integers and rationals that we developed for use in the lrslib library for polyhedral computation. Using a generic set of operations, a program can be compiled with either 64-bit or 128-bit (if available) fixed precision, with an extended precision library such as GMP or the built-in MP routines. A simple scheme checks for overflow and either terminates the program or, in hybrid mode, changes to a higher precision arithmetic. Implementing these arithmetics in lrslib resulted in only minimal changes to the original code. We give computational results using lrs and mplrs, vertex/facet enumeration codes in lrslib, using 64 and 128 bit fixed integer arithmetic with and without overflow checking, GMP arithmetic, lrsarith hybrid arithmetic with both GMP and MP, and FLINT hybrid arithmetic. We give a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Coding theory and cryptography · Numerical Methods and Algorithms
