Lines Matching refs:mpz_t

607 void mpz_init_zero(mpz_t *z) {  in mpz_init_zero()
615 void mpz_init_from_int(mpz_t *z, mp_int_t val) { in mpz_init_from_int()
620 void mpz_init_fixed_from_int(mpz_t *z, mpz_dig_t *dig, size_t alloc, mp_int_t val) { in mpz_init_fixed_from_int()
629 void mpz_deinit(mpz_t *z) { in mpz_deinit()
638 mpz_t *mpz_zero(void) {
639 mpz_t *z = m_new_obj(mpz_t);
644 mpz_t *mpz_from_int(mp_int_t val) {
645 mpz_t *z = mpz_zero();
650 mpz_t *mpz_from_ll(long long val, bool is_signed) {
651 mpz_t *z = mpz_zero();
657 mpz_t *mpz_from_float(mp_float_t val) {
658 mpz_t *z = mpz_zero();
664 mpz_t *mpz_from_str(const char *str, size_t len, bool neg, unsigned int base) {
665 mpz_t *z = mpz_zero();
671 STATIC void mpz_free(mpz_t *z) { in mpz_free()
674 m_del_obj(mpz_t, z); in mpz_free()
678 STATIC void mpz_need_dig(mpz_t *z, size_t need) { in mpz_need_dig()
692 STATIC mpz_t *mpz_clone(const mpz_t *src) { in mpz_clone()
694 mpz_t *z = m_new_obj(mpz_t); in mpz_clone()
707 void mpz_set(mpz_t *dest, const mpz_t *src) { in mpz_set()
714 void mpz_set_from_int(mpz_t *z, mp_int_t val) { in mpz_set_from_int()
738 void mpz_set_from_ll(mpz_t *z, long long val, bool is_signed) { in mpz_set_from_ll()
758 void mpz_set_from_float(mpz_t *z, mp_float_t src) { in mpz_set_from_float()
816 size_t mpz_set_from_str(mpz_t *z, const char *str, size_t len, bool neg, unsigned int base) { in mpz_set_from_str()
852 void mpz_set_from_bytes(mpz_t *z, bool big_endian, size_t len, const byte *buf) { in mpz_set_from_bytes()
888 bool mpz_is_pos(const mpz_t *z) {
892 bool mpz_is_odd(const mpz_t *z) {
896 bool mpz_is_even(const mpz_t *z) {
901 int mpz_cmp(const mpz_t *z1, const mpz_t *z2) { in mpz_cmp()
920 mp_int_t mpz_cmp_sml_int(const mpz_t *z, mp_int_t sml_int) {
974 mpz_t *mpz_abs(const mpz_t *z) {
976 mpz_t *z2 = mpz_clone(z);
983 mpz_t *mpz_neg(const mpz_t *z) {
985 mpz_t *z2 = mpz_clone(z);
993 mpz_t *mpz_add(const mpz_t *lhs, const mpz_t *rhs) {
994 mpz_t *z = mpz_zero();
1002 mpz_t *mpz_sub(const mpz_t *lhs, const mpz_t *rhs) {
1003 mpz_t *z = mpz_zero();
1011 mpz_t *mpz_mul(const mpz_t *lhs, const mpz_t *rhs) {
1012 mpz_t *z = mpz_zero();
1020 mpz_t *mpz_pow(const mpz_t *lhs, const mpz_t *rhs) {
1021 mpz_t *z = mpz_zero();
1031 void mpz_divmod(const mpz_t *lhs, const mpz_t *rhs, mpz_t **quo, mpz_t **rem) {
1041 void mpz_abs_inpl(mpz_t *dest, const mpz_t *z) { in mpz_abs_inpl()
1051 void mpz_neg_inpl(mpz_t *dest, const mpz_t *z) { in mpz_neg_inpl()
1061 void mpz_not_inpl(mpz_t *dest, const mpz_t *z) { in mpz_not_inpl()
1085 void mpz_shl_inpl(mpz_t *dest, const mpz_t *lhs, mp_uint_t rhs) { in mpz_shl_inpl()
1098 void mpz_shr_inpl(mpz_t *dest, const mpz_t *lhs, mp_uint_t rhs) { in mpz_shr_inpl()
1136 void mpz_add_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_add_inpl()
1138 const mpz_t *temp = lhs; in mpz_add_inpl()
1157 void mpz_sub_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_sub_inpl()
1161 const mpz_t *temp = lhs; in mpz_sub_inpl()
1185 void mpz_and_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_and_inpl()
1188 const mpz_t *temp = lhs; in mpz_and_inpl()
1219 void mpz_or_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_or_inpl()
1222 const mpz_t *temp = lhs; in mpz_or_inpl()
1253 void mpz_xor_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_xor_inpl()
1256 const mpz_t *temp = lhs; in mpz_xor_inpl()
1291 void mpz_mul_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_mul_inpl()
1297 mpz_t *temp = NULL; in mpz_mul_inpl()
1323 void mpz_pow_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs) { in mpz_pow_inpl()
1334 mpz_t *x = mpz_clone(lhs); in mpz_pow_inpl()
1335 mpz_t *n = mpz_clone(rhs); in mpz_pow_inpl()
1357 void mpz_pow3_inpl(mpz_t *dest, const mpz_t *lhs, const mpz_t *rhs, const mpz_t *mod) { in mpz_pow3_inpl()
1369 mpz_t *x = mpz_clone(lhs); in mpz_pow3_inpl()
1370 mpz_t *n = mpz_clone(rhs); in mpz_pow3_inpl()
1371 mpz_t quo; in mpz_pow3_inpl()
1401 mpz_t *mpz_gcd(const mpz_t *z1, const mpz_t *z2) {
1404 mpz_t *a = mpz_clone(z2);
1408 mpz_t *a = mpz_clone(z1);
1413 mpz_t *a = mpz_clone(z1);
1414 mpz_t *b = mpz_clone(z2);
1415 mpz_t c;
1427 mpz_t *t = a;
1459 mpz_t *mpz_lcm(const mpz_t *z1, const mpz_t *z2) {
1464 mpz_t *gcd = mpz_gcd(z1, z2);
1465 mpz_t *quo = mpz_zero();
1466 mpz_t *rem = mpz_zero();
1482 void mpz_divmod_inpl(mpz_t *dest_quo, mpz_t *dest_rem, const mpz_t *lhs, const mpz_t *rhs) { in mpz_divmod_inpl()
1496 mpz_t mpzone; in mpz_divmod_inpl()
1510 mpz_t *mpz_div(const mpz_t *lhs, const mpz_t *rhs) {
1511 mpz_t *quo = mpz_zero();
1512 mpz_t rem;
1522 mpz_t *mpz_mod(const mpz_t *lhs, const mpz_t *rhs) {
1523 mpz_t quo;
1525 mpz_t *rem = mpz_zero();
1533 mp_int_t mpz_hash(const mpz_t *z) { in mpz_hash()
1548 bool mpz_as_int_checked(const mpz_t *i, mp_int_t *value) { in mpz_as_int_checked()
1568 bool mpz_as_uint_checked(const mpz_t *i, mp_uint_t *value) { in mpz_as_uint_checked()
1589 void mpz_as_bytes(const mpz_t *z, bool big_endian, size_t len, byte *buf) { in mpz_as_bytes()
1632 mp_float_t mpz_as_float(const mpz_t *i) { in mpz_as_float()
1650 char *mpz_as_str(const mpz_t *i, unsigned int base) {
1660 size_t mpz_as_str_inpl(const mpz_t *i, unsigned int base, const char *prefix, char base_char, char … in mpz_as_str_inpl()