DeepAI
Log In Sign Up

lrsarith: a small fixed/hybrid arithmetic C library

01/29/2021
by   David Avis, et al.
0

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 small self-contained example C program using the lrsarith package in both fixed precision and hybrid mode.

READ FULL TEXT

page 1

page 2

page 3

page 4

02/21/2018

Moore: Interval Arithmetic in C++20

This article presents the Moore library for interval arithmetic in C++20...
11/29/2016

Moore: Interval Arithmetic in Modern C++

We present the library Moore, which implements Interval Arithmetic in mo...
01/06/2020

Issues with rounding in the GCC implementation of the ISO 18037:2008 standard fixed-point arithmetic

We describe various issues caused by the lack of round-to-nearest mode i...
06/10/2017

Proposal for a High Precision Tensor Processing Unit

This whitepaper proposes the design and adoption of a new generation of ...
12/30/2019

Linear Programming using Limited-Precision Oracles

Since the elimination algorithm of Fourier and Motzkin, many different m...
11/07/2016

SPECTRA -a Maple library for solving linear matrix inequalities in exact arithmetic

This document describes our freely distributed Maple library spectra, f...