This package contains common functions on signed and unsigned integers of various finite precision.
fun
{k1
,k2:tk}
g0int2int(x: g0int(k1)):<> g0int(k2)
fun{
k1,k2:tk
} g1int2int // i2i
{i:int} (x: g1int (k1, i)):<> g1int (k2, i)
fun{
k1,k2:tk
} g1int2int : g1int2int_type(k1, k2)
castfn
g1ofg0_int{tk:tk}(g0int(tk)):<> g1int(tk)
fun{tk:tk}
g0string2int(rep: NSH(string)):<> g0int(tk)
prfun
g1int_get_index
{tk:tk}{i1:int}
(x: g1int(tk, i1)): [i2:int] EQINT(i1, i2)
fun
{tk:tk}
g0int_neg : g0int_uop_type(tk)
fun
{tk:tk}
g1int_neg : g1int_neg_type(tk)
fun
{tk:tk}
g0int_succ : g0int_uop_type(tk)
fun{tk:tk}
g1int_succ : g1int_succ_type(tk)
fun
{tk:tk}
g0int_pred : g0int_uop_type(tk)
fun{tk:tk}
g1int_pred : g1int_pred_type(tk)
fun
{tk:tk}
g0int_add : g0int_aop_type(tk)
fun
{tk:tk}
g1int_add : g1int_add_type(tk)
fun
{tk:tk}
g0int_sub : g0int_aop_type(tk)
fun
{tk:tk}
g1int_sub : g1int_sub_type(tk)
fun
{tk:tk}
g0int_mul : g0int_aop_type(tk)
fun
{tk:tk}
g1int_mul : g1int_mul_type(tk)
fun
{tk:tk}
g1int_mul2
{i,j:int}
(
x: g1int (tk, i)
, y: g1int (tk, j)
) :<> [ij:int]
(MUL (i, j, ij) | g1int (tk, ij))
fun
{tk:tk}
g0int_div : g0int_aop_type(tk)
fun
{tk:tk}
g1int_div : g1int_div_type(tk)
fun
{tk:tk}
g1int_ndiv : g1int_ndiv_type(tk)
fun {tk:tk} g1int_ndiv2 {i,j:int | i >= 0; j > 0} ( x: g1int(tk, i), y: g1int(tk, j) ) :<> [ q,r:int | 0 <= r; r < j ] ( DIVMOD (i, j, q, r) | g1int (tk, q) ) (* end of [g1int_ndiv2] *)
fun
{tk:tk}
g0int_mod : g0int_aop_type(tk)
Synopsis for [g1int_mod] is unavailable.
fun{tk:tk}
g1int_nmod : g1int_nmod_type(tk)
fun{tk:tk} g1int_nmod2 {i,j:int | i >= 0; j > 0} ( x: g1int(tk, i), y: g1int(tk, j) ) :<> [q,r:nat | r < j] ( DIVMOD(i, j, q, r) | g1int(tk, r) ) (* end of [g1int_nmod2] *)
Synopsis for [g0int_gcd] is unavailable.
Synopsis for [g1int_gcd] is unavailable.
Synopsis for [g1int_ngcd] is unavailable.
Synopsis for [g1int_ngcd2] is unavailable.
fun
{tk:tk}
g0int_lt : g0int_cmp_type(tk)
fun{tk:tk}
g1int_lt : g1int_lt_type(tk)
fun
{tk:tk}
g0int_lte : g0int_cmp_type(tk)
fun{tk:tk}
g1int_lte : g1int_lte_type(tk)
fun
{tk:tk}
g0int_gt : g0int_cmp_type(tk)
fun
{tk:tk}
g1int_gt : g1int_gt_type(tk)
fun
{tk:tk}
g0int_gte : g0int_cmp_type(tk)
fun
{tk:tk}
g1int_gte : g1int_gte_type(tk)
fun
{tk:tk}
g0int_eq : g0int_cmp_type(tk)
fun
{tk:tk}
g1int_eq : g1int_eq_type(tk)
fun
{tk:tk}
g0int_neq : g0int_cmp_type(tk)
fun
{tk:tk}
g1int_neq : g1int_neq_type(tk)
fun{tk:tk}
g0int_compare
(x: g0int(tk), y: g0int(tk)):<> int
fun{tk:tk}
g1int_compare : g1int_compare_type(tk)
fun
{tk:tk}
g0int_max : g0int_aop_type(tk)
fun
{tk:tk}
g1int_max : g1int_max_type(tk)
fun
{tk:tk}
g0int_min : g0int_aop_type(tk)
fun
{tk:tk}
g1int_min : g1int_min_type(tk)
fun fprint_int : fprint_type (int) = "mac#%"
Synopsis for [fprint_lint] is unavailable.
Synopsis for [fprint_llint] is unavailable.
Synopsis for [fprint_ssize] is unavailable.
fun{
k1,k2:tk
} g0int2uint(g0int(k1)):<> g0uint(k2)
fun{
k1,k2:tk
} g0uint2int(g0uint(k1)):<> g0int(k2)
fun{
k1,k2:tk
} g0uint2uint(g0uint(k1)):<> g0uint(k2)
fun{
k1,k2:tk
} g1int2uint : g1int2uint_type(k1, k2)
fun{
k1,k2:tk
} g1uint2int : g1uint2int_type(k1, k2)
fun{
k1,k2:tk
} g1uint2uint : g1uint2uint_type(k1, k2)
castfn
g1ofg0_uint{tk:tk}(x: g0uint tk):<> g1uint0 (tk)
fun{tk:tk}
g0string2uint(rep: NSH(string)):<> g0uint(tk)
prfun
g1uint_get_index
{tk:tk}{i1:int}
(x: g1uint(tk, i1)): [i2:int] EQINT(i1, i2)
fun{tk:tk}
g0uint_succ
(g0uint(tk)):<> g0uint(tk)
fun{tk:tk}
g1uint_succ : g1uint_succ_type(tk)
fun{tk:tk}
g0uint_pred
(g0uint(tk)):<> g0uint(tk)
fun{tk:tk}
g1uint_pred : g1uint_pred_type(tk)
fun{
tk:tk
} g0uint_add
(x: g0uint (tk), y: g0uint (tk)):<> g0uint (tk)
fun
{tk:tk}
g1uint_add : g1uint_add_type(tk)
fun{
tk:tk
} g0uint_sub
(x: g0uint (tk), y: g0uint (tk)):<> g0uint (tk)
fun
{tk:tk}
g1uint_sub : g1uint_sub_type(tk)
fun{
tk:tk
} g0uint_mul
(x: g0uint (tk), y: g0uint (tk)):<> g0uint (tk)
fun
{tk:tk}
g1uint_mul : g1uint_mul_type(tk)
fun
{tk:tk}
g1uint_mul2
{i,j:int}
(
x: g1uint(tk, i), y: g1uint(tk, j)
) :<> [ij:int] (MUL(i, j, ij) | g1uint(tk, ij))
fun{
tk:tk
} g0uint_div
(x: g0uint (tk), y: g0uint (tk)):<> g0uint (tk)
fun
{tk:tk}
g1uint_div : g1uint_div_type(tk)
fun{
tk:tk
} g0uint_mod
(x: g0uint (tk), y: g0uint (tk)):<> g0uint (tk)
fun
{tk:tk}
g1uint_mod : g1uint_mod_type(tk)
fun{
tk:tk
} g0uint_lt
(x: g0uint (tk), y: g0uint (tk)):<> bool
fun{tk:tk}
g1uint_lt : g1uint_lt_type(tk)
fun{
tk:tk
} g0uint_lte
(x: g0uint (tk), y: g0uint (tk)):<> bool
fun{tk:tk}
g1uint_lte : g1uint_lte_type(tk)
fun{
tk:tk
} g0uint_gt
(x: g0uint (tk), y: g0uint (tk)):<> bool
fun
{tk:tk}
g1uint_gt : g1uint_gt_type(tk)
fun{
tk:tk
} g0uint_gte
(x: g0uint (tk), y: g0uint (tk)):<> bool
fun
{tk:tk}
g1uint_gte : g1uint_gte_type(tk)
fun{
tk:tk
} g0uint_eq
(x: g0uint (tk), y: g0uint (tk)):<> bool
fun
{tk:tk}
g1uint_eq : g1uint_eq_type(tk)
fun{
tk:tk
} g0uint_neq
(x: g0uint (tk), y: g0uint (tk)):<> bool
fun
{tk:tk}
g1uint_neq : g1uint_neq_type(tk)
fun{tk:tk}
g0uint_compare
(x: g0uint(tk), y: g0uint(tk)):<> int
fun{tk:tk}
g1uint_compare : g1uint_compare_type(tk)
fun
{tk:tk}
g0uint_max
(g0uint(tk), g0uint(tk)):<> g0uint(tk)
fun
{tk:tk}
g1uint_max : g1uint_max_type(tk)
fun
{tk:tk}
g0uint_min
(g0uint(tk), g0uint(tk)):<> g0uint(tk)
fun
{tk:tk}
g1uint_min : g1uint_min_type(tk)
fun fprint_uint : fprint_type (uint) = "mac#%"
Synopsis for [fprint_ulint] is unavailable.
Synopsis for [fprint_ullint] is unavailable.
Synopsis for [fprint_size] is unavailable.
macdef g0i2i(x) = g0int2int(,(x))
macdef g1i2i(x) = g1int2int(,(x))
macdef g0i2u(x) = g0int2uint(,(x))
macdef g1i2u(x) = g1int2uint(,(x))
macdef g0u2i(x) = g0uint2int(,(x))
macdef g1u2i(x) = g1uint2int(,(x))
macdef g0u2u(x) = g0uint2uint(,(x))
macdef g1u2u(x) = g1uint2uint(,(x))
macdef
i2u(x) = g1int2uint_int_uint(,(x))
Synopsis for [i2sz] is unavailable.
Synopsis for [i2ssz] is unavailable.
macdef
u2i(x) = g1uint2int_uint_int(,(x))
Synopsis for [u2sz] is unavailable.
Synopsis for [sz2i] is unavailable.
Synopsis for [sz2u] is unavailable.
overload g0ofg1 with g0ofg1_int // index-erasing
overload g0ofg1 with g0ofg1_uint // index-erasing
overload g1ofg0 with g1ofg0_int // index-inducing
overload g1ofg0 with g1ofg0_uint // index-inducing
overload ~ with g0int_neg of 0
overload ~ with g1int_neg of 10 // ~ for uminus
overload ~ with g0uint_lnot
overload neg with g0int_neg of 0
overload neg with g1int_neg of 10
overload abs with g0int_abs of 0
overload abs with g1int_abs of 10
overload succ with g0int_succ of 0
overload succ with g1int_succ of 10
overload succ with g0uint_succ of 0
overload succ with g1uint_succ of 10
overload pred with g0int_pred of 0
overload pred with g1int_pred of 10
overload pred with g0uint_pred of 0
overload pred with g1uint_pred of 10
overload half with g0int_half of 0
overload half with g1int_half of 10
overload half with g0uint_half of 0
overload half with g1uint_half of 10
overload + with g0int_add of 0
overload + with add_int1_size0 of 11
overload + with add_size0_int1 of 11
overload + with g1int_add of 20
overload + with add_size1_int1 of 22
overload + with add_int1_size1 of 22
overload + with g0uint_add of 0
overload + with g1uint_add of 20
overload - with g0int_sub of 0
overload - with g1int_sub of 20
overload - with sub_size1_int1 of 22
overload - with g0uint_sub of 0
overload - with g1uint_sub of 20
overload * with g0int_mul of 0
overload * with mul_int1_size0 of 11
overload * with mul_size0_int1 of 11
overload * with g1int_mul of 20
overload * with mul_int1_size1 of 22
overload * with mul_size1_int1 of 22
overload * with g0uint_mul of 0
overload * with g1uint_mul of 20
overload / with g0int_div of 0
overload / with g1int_div of 20
overload / with g0uint_div of 0
overload / with g1uint_div of 20
overload mod with g0int_mod of 0
overload mod with g0uint_mod of 0
overload mod with g1uint_mod of 20
overload isltz with g0int_isltz of 0
overload isltz with g1int_isltz of 10
overload isltez with g0int_isltez of 0
overload isltez with g1int_isltez of 10
overload isgtz with g0int_isgtz of 0
overload isgtz with g1int_isgtz of 10
overload isgtz with g0uint_isgtz of 0
overload isgtz with g1uint_isgtz of 10
overload isgtez with g0int_isgtez of 0
overload isgtez with g1int_isgtez of 10
overload iseqz with g0int_iseqz of 0
overload iseqz with g1int_iseqz of 10
overload iseqz with g0uint_iseqz of 0
overload iseqz with g1uint_iseqz of 10
overload isneqz with g0int_isneqz of 0
overload isneqz with g1int_isneqz of 10
overload isneqz with g0uint_isneqz of 0
overload isneqz with g1uint_isneqz of 10
overload < with g0int_lt of 0
overload < with lt_g0int_int of 11
overload < with g1int_lt of 20
overload < with lt_g1int_int of 21
overload < with g0uint_lt of 0
overload < with lt_g0uint_int of 11
overload < with g1uint_lt of 20
overload < with lt_g1uint_int of 21
overload <= with g0int_lte of 0
overload <= with lte_g0int_int of 11
overload <= with g1int_lte of 20
overload <= with lte_g1int_int of 21
overload <= with g0uint_lte of 0
overload <= with lte_g0uint_int of 11
overload <= with g1uint_lte of 20
overload <= with lte_g1uint_int of 21
overload > with g0int_gt of 0
overload > with gt_g0int_int of 11
overload > with g1int_gt of 20
overload > with gt_g1int_int of 21
overload > with g0uint_gt of 0
overload > with gt_g0uint_int of 11
overload > with g1uint_gt of 20
overload > with gt_g1uint_int of 21
overload >= with g0int_gte of 0
overload >= with gte_g0int_int of 11
overload >= with g1int_gte of 20
overload >= with gte_g1int_int of 21
overload >= with g0uint_gte of 0
overload >= with gte_g0uint_int of 11
overload >= with g1uint_gte of 20
overload >= with gte_g1uint_int of 21
overload = with g0int_eq of 0
overload = with eq_g0int_int of 11
overload = with g1int_eq of 20
overload = with eq_g1int_int of 21
overload = with g0uint_eq of 0
overload = with eq_g0uint_int of 11
overload = with g1uint_eq of 20
overload = with eq_g1uint_int of 21
overload != with g0int_neq of 0
overload != with neq_g0int_int of 11
overload != with g1int_neq of 20
overload != with neq_g1int_int of 21
overload != with g0uint_neq of 0
overload != with neq_g0uint_int of 11
overload != with g1uint_neq of 20
overload != with neq_g1uint_int of 21
overload compare with g0int_compare of 0
overload compare with compare_g0int_int of 11
overload compare with g1int_compare of 20
overload compare with compare_g1int_int of 21
overload compare with g0uint_compare of 0
overload compare with g1uint_compare of 20
overload max with g0int_max of 0
overload max with g1int_max of 20
overload max with g0uint_max of 0
overload max with g1uint_max of 20
overload min with g0int_min of 0
overload min with g1int_min of 20
overload min with g0uint_min of 0
overload min with g1uint_min of 20
overload print with print_int
overload print with print_uint
overload prerr with prerr_int
overload prerr with prerr_uint
overload fprint with fprint_int
overload fprint with fprint_uint
This page is created with ATS by Hongwei Xi and also maintained by Hongwei Xi. |