Intinf
A simple package based on libgmp for arithmetic operations (plus some other common operations on integers)
Description
SATS Files

SATS/intinf.sats: The abstract types
intinf_type(int)
(nonlin) andintinf_vtype(int)
(linear) are introduced, and a few functions are declared for going between values of these two types. Given a static integeri
, the typeintinf_type(i)
is for a dynamic value representingi
while the typeintinf_vtype(i)
is for a (linear) dynamic value representingi
. 
SATS/intinf_t.sats: The interface for arithmetic operations and some other operations on integers represented as dynamic values of the type
intinf_type
. In general, using functions declared inintinf_t.sats
may require some support of GC. 
SATS/intinf_vt.sats: The interface for arithmetic operations and some other operations on integers represented as linear dynamic values of the type
intinf_vtype
. While it is a bit more involved to use functions declared inintinf_vt.sats
than inintinf_t.sats
, the resulting code can be significantly more efficent both timewise and memorywise.
DATS Files

DATS/intinf_t.dats: The file contains implementation for the templates declared in
intinf_t.sats
. 
DATS/intinf_vt.dats: The file contains implementation for the templates declared in
intinf_vt.sats
. 
DATS/gintinf_t.dats: The file contains implementation for using values of the type
intinf_type
as gnumbers (generic numbers).
TEST Files
The files in the TEST directory contain code that gives details on using various templates implemented in this package.