This package contains an API in ATS for the libgmp package.
absvt@ype
mpz_vt0ype = $extype"atscntrb_libgmp_mpz"
absvt@ype
mpq_vt0ype = $extype"atscntrb_libgmp_mpq"
absvt@ype
mpf_vt0ype = $extype"atscntrb_libgmp_mpf"
typedef mp_base = intBtw (2, 36+1) // for outputing MP numbers
fun mpz_init
(x: &mpz? >> mpz): void = "mac#%"
fun mpz_init2
(x: &mpz? >> mpz, n: ulint): void = "mac#%"
fun mpz_clear (x: &mpz >> mpz?): void = "mac#%"
fun mpz_realloc2
(x: &mpz >> mpz, n: ulint): void = "mac#%"
fun mpz_get_int (x: &RD(mpz)): int = "mac#%"
fun mpz_get_lint (x: &RD(mpz)): lint = "mac#%"
fun mpz_get_uint (x: &RD(mpz)): uint = "mac#%"
fun mpz_get_ulint (x: &RD(mpz)): ulint = "mac#%"
fun mpz_get_double (x: &RD(mpz)): double = "mac#%"
fun mpz_get_str
(
res: ptr
, base: mp_base, x: &RD(mpz)
) : Strptr1 = "mac#%"
fun mpz_set_int
(x: &mpz >> _, y: int): void = "mac#%"
fun mpz_set_lint
(x: &mpz >> _, y: lint): void = "mac#%"
fun mpz_set_uint
(x: &mpz >> _, y: uint): void = "mac#%"
fun mpz_set_ulint
(x: &mpz >> _, y: ulint): void = "mac#%"
fun mpz_set_double
(x: &mpz >> _, y: double): void = "mac#%"
fun mpz_set_mpz
(x: &mpz >> _, y: &RD(mpz)): void = "mac#%"
fun mpz_set_mpq
(x: &mpz >> _, y: &RD(mpq)): void = "mac#%"
fun mpz_set_mpf
(x: &mpz >> _, y: &RD(mpf)): void = "mac#%"
fun mpz_set_str
(x: &mpz >> _, inp: string, base: mp_base): int = "mac#%"
fun mpz_set_str_exn
(x: &mpz >> _, inp: string, base: mp_base): void = "mac#%"
overload mpz_neg with mpz_neg1
overload mpz_neg with mpz_neg2
fun mpz_neg1
(x: &mpz >> _): void = "mac#%"
fun mpz_neg2
(x: &mpz >> _, y: &mpz): void = "mac#%"
overload mpz_abs with mpz_abs1
overload mpz_abs with mpz_abs2
fun mpz_abs1
(x: &mpz >> _): void = "mac#%"
fun mpz_abs2
(x: &mpz >> _, y: &mpz): void = "mac#%"
overload mpz_add with mpz_add2_mpz
overload mpz_add with mpz_add2_int
overload mpz_add with mpz_add2_lint
overload mpz_add with mpz_add2_uint
overload mpz_add with mpz_add2_ulint
overload mpz_add with mpz_add3_mpz
overload mpz_add with mpz_add3_int
overload mpz_add with mpz_add3_lint
overload mpz_add with mpz_add3_uint
overload mpz_add with mpz_add3_ulint
fun mpz_add2_int
(x: &mpz >> _, y: int): void = "mac#%"
fun mpz_add2_lint
(x: &mpz >> _, y: lint): void = "mac#%"
fun mpz_add2_uint
(x: &mpz >> _, y: uint): void = "mac#%"
fun mpz_add2_ulint
(x: &mpz >> _, y: ulint): void = "mac#%"
fun mpz_add2_mpz
(x: &mpz >> _, y: &mpz): void = "mac#%"
fun mpz_add3_int
(x: &mpz >> _, y: &mpz, z: int): void = "mac#%"
fun mpz_add3_lint
(x: &mpz >> _, y: &mpz, z: lint): void = "mac#%"
fun mpz_add3_uint
(x: &mpz >> _, y: &mpz, z: uint): void = "mac#%"
fun mpz_add3_ulint
(x: &mpz >> _, y: &mpz, z: ulint): void = "mac#%"
fun mpz_add3_mpz
(x: &mpz >> _, y: &mpz, z: &mpz): void = "mac#%"
This page is created with ATS by Hongwei Xi and also maintained by Hongwei Xi. |