This package is for supporting integers of unlimited precision, and it is implemented based on the GMP library. The primary purpose of the package is to provide a simple and clean approach to programming with large integers that is also memory-efficient.
vtypedef Intinf = [i:int] intinf (i)
vtypedef intinfLt (i0:int) = [i:int | i < i0] intinf (i)
vtypedef intinfLte (i0:int) = [i:int | i <= i0] intinf (i)
vtypedef intinfGt (i0:int) = [i:int | i > i0] intinf (i)
vtypedef intinfGte (i0:int) = [i:int | i >= i0] intinf (i)
vtypedef intinfBtw (i1:int, i2:int) = [i:int | i1 <= i; i < i2] intinf (i)
vtypedef intinfBtwe (i1:int, i2:int) = [i:int | i1 <= i; i <= i2] intinf (i)
fun{}
intinf_make_int {i:int} (x: int (i)): intinf (i)
fun{}
intinf_make_uint {i:int} (x: uint (i)): intinf (i)
fun{}
intinf_make_lint {i:int} (x: lint (i)): intinf (i)
fun{}
intinf_make_ulint {i:int} (x: ulint (i)): intinf (i)
fun{}
intinf_free (x: Intinf): void
fun{}
print_intinf (x: !Intinf): void
fun{}
prerr_intinf (x: !Intinf): void
fun{}
fprint_intinf (out: FILEref, x: !Intinf): void
fun{}
fprint_intinf_base
(out: FILEref, x: !Intinf, base: intinf_base): void
fun{}
abs_intinf0 {i:int} (x: intinf i): intinf (abs(i))
fun{}
abs_intinf1 {i:int} (x: !intinf i): intinf (abs(i))
fun{}
neg_intinf0 {i:int} (x: intinf i): intinf (~i)
fun{}
neg_intinf1 {i:int} (x: !intinf i): intinf (~i)
fun{}
succ_intinf0 {i:int} (x: intinf i): intinf (i+1)
fun{}
succ_intinf1 {i:int} (x: !intinf i): intinf (i+1)
fun{}
pred_intinf0 {i:int} (x: intinf i): intinf (i-1)
fun{}
pred_intinf1 {i:int} (x: !intinf i): intinf (i-1)
fun{}
add_intinf0_int
{i,j:int} (x: intinf i, y: int j): intinf (i+j)
fun{}
add_intinf1_int
{i,j:int} (x: !intinf i, y: int j): intinf (i+j)
fun{}
add_int_intinf0
{i,j:int} (x: int i, y: intinf j): intinf (i+j)
fun{}
add_int_intinf1
{i,j:int} (x: int i, y: !intinf j): intinf (i+j)
fun{}
add_intinf0_intinf1
{i,j:int} (x: intinf i, y: !intinf j): intinf (i+j)
fun{}
add_intinf1_intinf0
{i,j:int} (x: !intinf i, y: intinf j): intinf (i+j)
fun{}
add_intinf1_intinf1
{i,j:int} (x: !intinf i, y: !intinf j): intinf (i+j)
fun{}
sub_intinf0_int
{i,j:int} (x: intinf i, y: int j): intinf (i-j)
fun{}
sub_intinf1_int
{i,j:int} (x: !intinf i, y: int j): intinf (i-j)
fun{}
sub_int_intinf0
{i,j:int} (x: int i, y: intinf j): intinf (i-j)
fun{}
sub_int_intinf1
{i,j:int} (x: int i, y: !intinf j): intinf (i-j)
fun{}
sub_intinf0_intinf1
{i,j:int} (x: intinf i, y: !intinf j): intinf (i-j)
fun{}
sub_intinf1_intinf0
{i,j:int} (x: !intinf i, y: intinf j): intinf (i-j)
fun{}
sub_intinf1_intinf1
{i,j:int} (x: !intinf i, y: !intinf j): intinf (i-j)
fun{}
mul_intinf0_int
{i,j:int} (x: intinf i, y: int j): intinf (i*j)
fun{}
mul_intinf1_int
{i,j:int} (x: !intinf i, y: int j): intinf (i*j)
fun{}
mul_int_intinf0
{i,j:int} (x: int i, y: intinf j): intinf (i*j)
fun{}
mul_int_intinf1
{i,j:int} (x: int i, y: !intinf j): intinf (i*j)
fun{}
mul_intinf0_intinf1
{i,j:int} (x: intinf i, y: !intinf j): intinf (i*j)
fun{}
mul_intinf1_intinf0
{i,j:int} (x: !intinf i, y: intinf j): intinf (i*j)
fun{}
mul_intinf1_intinf1
{i,j:int} (x: !intinf i, y: !intinf j): intinf (i*j)
fun{}
div_intinf0_int
{i,j:int | j != 0} (x: intinf i, y: int j): Intinf
fun{}
div_intinf1_int
{i,j:int | j != 0} (x: !intinf i, y: int j): Intinf
fun{}
div_intinf0_intinf1
{i,j:int} (x: intinf i, y: !intinf j): Intinf
fun{}
div_intinf1_intinf0
{i,j:int} (x: !intinf i, y: intinf j): Intinf
fun{}
div_intinf1_intinf1
{i,j:int} (x: !intinf i, y: !intinf j): Intinf
fun{}
ndiv_intinf0_int
{i,j:int | i >= 0; j > 0}
(x: intinf i, y: int j): intinf (ndiv(i,j))
fun{}
ndiv_intinf1_int
{i,j:int | i >= 0; j > 0}
(x: !intinf i, y: int j): intinf (ndiv(i,j))
fun{}
nmod_intinf0_int
{i,j:int | i >= 0; j > 0} (x: intinf i, y: int j): natLt (j)
fun{}
nmod_intinf1_int
{i,j:int | i >= 0; j > 0} (x: !intinf i, y: int j): natLt (j)
fun{}
compare_int_intinf
{i,j:int} (x: int i, y: !intinf j):<> int (sgn(i-j))
fun{}
compare_intinf_int
{i,j:int} (x: !intinf i, y: int j):<> int (sgn(i-j))
fun{}
compare_intinf_intinf
{i,j:int} (x: !intinf i, y: !intinf j):<> int (sgn(i-j))
fun{}
pow_intinf_int {i:nat} (base: !Intinf, exp: int i): Intinf
This page is created with ATS by Hongwei Xi and also maintained by Hongwei Xi. |