#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mini-gmp.h"
Data Structures | |
struct | gmp_div_inverse |
struct | mpn_base_info |
Macros | |
#define | GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) |
#define | GMP_LIMB_MAX (~ (mp_limb_t) 0) |
#define | GMP_LIMB_HIGHBIT ((mp_limb_t) 1 << (GMP_LIMB_BITS - 1)) |
#define | GMP_HLIMB_BIT ((mp_limb_t) 1 << (GMP_LIMB_BITS / 2)) |
#define | GMP_LLIMB_MASK (GMP_HLIMB_BIT - 1) |
#define | GMP_ULONG_BITS (sizeof(unsigned long) * CHAR_BIT) |
#define | GMP_ULONG_HIGHBIT ((unsigned long) 1 << (GMP_ULONG_BITS - 1)) |
#define | GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) |
#define | GMP_NEG_CAST(T, x) (-((T)((x) + 1) - 1)) |
#define | GMP_MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | GMP_MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | gmp_assert_nocarry(x) |
#define | gmp_clz(count, x) |
#define | gmp_ctz(count, x) |
#define | gmp_add_ssaaaa(sh, sl, ah, al, bh, bl) |
#define | gmp_sub_ddmmss(sh, sl, ah, al, bh, bl) |
#define | gmp_umul_ppmm(w1, w0, u, v) |
#define | gmp_udiv_qrnnd_preinv(q, r, nh, nl, d, di) |
#define | gmp_udiv_qr_3by2(q, r1, r0, n2, n1, n0, d1, d0, dinv) |
#define | MP_LIMB_T_SWAP(x, y) |
#define | MP_SIZE_T_SWAP(x, y) |
#define | MP_BITCNT_T_SWAP(x, y) |
#define | MP_PTR_SWAP(x, y) |
#define | MP_SRCPTR_SWAP(x, y) |
#define | MPN_PTR_SWAP(xp, xs, yp, ys) |
#define | MPN_SRCPTR_SWAP(xp, xs, yp, ys) |
#define | MPZ_PTR_SWAP(x, y) |
#define | MPZ_SRCPTR_SWAP(x, y) |
#define | gmp_xalloc(size) ((*gmp_allocate_func)((size))) |
#define | gmp_free(p) ((*gmp_free_func) ((p), 0)) |
#define | mpn_zero_p(xp, n) (mpn_normalized_size ((xp), (n)) == 0) |
#define | MPZ_REALLOC(z, n) |
#define | GMP_PRIME_PRODUCT (3UL*5UL*7UL*11UL*13UL*17UL*19UL*23UL*29UL) |
#define | GMP_PRIME_MASK 0xc96996dcUL |
Enumerations | |
enum | mpz_div_round_mode { GMP_DIV_FLOOR, GMP_DIV_CEIL, GMP_DIV_TRUNC } |
Variables | |
const int | mp_bits_per_limb = GMP_LIMB_BITS |
#define GMP_ABS | ( | x | ) | ((x) >= 0 ? (x) : -(x)) |
Referenced by mpz_abs(), mpz_and(), mpz_cmpabs(), mpz_cmpabs_d(), mpz_cmpabs_ui(), mpz_export(), mpz_gcd_ui(), mpz_get_d(), mpz_get_str(), mpz_getlimbn(), mpz_ior(), mpz_limbs_finish(), mpz_mul(), mpz_mul_2exp(), mpz_mul_ui(), mpz_powm(), mpz_scan0(), mpz_scan1(), mpz_set(), mpz_size(), mpz_sizeinbase(), mpz_tstbit(), and mpz_xor().
#define gmp_add_ssaaaa | ( | sh, | |
sl, | |||
ah, | |||
al, | |||
bh, | |||
bl | |||
) |
#define gmp_assert_nocarry | ( | x | ) |
Referenced by mpz_divexact(), mpz_divexact_ui(), and mpz_powm().
#define gmp_clz | ( | count, | |
x | |||
) |
#define gmp_ctz | ( | count, | |
x | |||
) |
#define gmp_free | ( | p | ) | ((*gmp_free_func) ((p), 0)) |
Referenced by mpz_clear(), mpz_get_str(), mpz_out_str(), mpz_powm(), mpz_set_str(), and mpz_sizeinbase().
#define GMP_HLIMB_BIT ((mp_limb_t) 1 << (GMP_LIMB_BITS / 2)) |
#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) |
Referenced by mpn_invert_3by2(), mpn_lshift(), mpn_rshift(), mpn_scan0(), mpn_scan1(), mpz_init2(), mpz_mul(), mpz_mul_2exp(), mpz_realloc2(), mpz_scan0(), mpz_scan1(), and mpz_tstbit().
#define GMP_LIMB_HIGHBIT ((mp_limb_t) 1 << (GMP_LIMB_BITS - 1)) |
Referenced by mpn_invert_3by2(), mpz_cmpabs_d(), mpz_fits_slong_p(), mpz_get_d(), mpz_get_si(), mpz_powm(), and mpz_set_d().
#define GMP_LIMB_MAX (~ (mp_limb_t) 0) |
Referenced by mpn_scan0(), mpn_scan1(), mpz_scan0(), and mpz_scan1().
#define GMP_LLIMB_MASK (GMP_HLIMB_BIT - 1) |
Referenced by mpn_invert_3by2().
#define GMP_MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
#define GMP_MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
Referenced by mpz_gcd(), and mpz_gcdext().
#define GMP_NEG_CAST | ( | T, | |
x | |||
) | (-((T)((x) + 1) - 1)) |
Referenced by mpz_cmp_si(), mpz_mul_si(), and mpz_set_si().
#define GMP_PRIME_MASK 0xc96996dcUL |
Referenced by mpz_probab_prime_p().
#define GMP_PRIME_PRODUCT (3UL*5UL*7UL*11UL*13UL*17UL*19UL*23UL*29UL) |
Referenced by mpz_probab_prime_p().
#define gmp_sub_ddmmss | ( | sh, | |
sl, | |||
ah, | |||
al, | |||
bh, | |||
bl | |||
) |
#define gmp_udiv_qr_3by2 | ( | q, | |
r1, | |||
r0, | |||
n2, | |||
n1, | |||
n0, | |||
d1, | |||
d0, | |||
dinv | |||
) |
#define gmp_udiv_qrnnd_preinv | ( | q, | |
r, | |||
nh, | |||
nl, | |||
d, | |||
di | |||
) |
#define GMP_ULONG_BITS (sizeof(unsigned long) * CHAR_BIT) |
#define GMP_ULONG_HIGHBIT ((unsigned long) 1 << (GMP_ULONG_BITS - 1)) |
Referenced by mpz_pow_ui().
#define gmp_umul_ppmm | ( | w1, | |
w0, | |||
u, | |||
v | |||
) |
Referenced by mpn_addmul_1(), mpn_invert_3by2(), mpn_mul_1(), and mpn_submul_1().
Referenced by mpz_export(), mpz_get_str(), and mpz_set_str().
#define MP_BITCNT_T_SWAP | ( | x, | |
y | |||
) |
Referenced by mpz_gcdext().
#define MP_LIMB_T_SWAP | ( | x, | |
y | |||
) |
#define MP_PTR_SWAP | ( | x, | |
y | |||
) |
Referenced by mpz_swap().
#define MP_SIZE_T_SWAP | ( | x, | |
y | |||
) |
#define MP_SRCPTR_SWAP | ( | x, | |
y | |||
) |
#define MPN_PTR_SWAP | ( | xp, | |
xs, | |||
yp, | |||
ys | |||
) |
#define MPN_SRCPTR_SWAP | ( | xp, | |
xs, | |||
yp, | |||
ys | |||
) |
Referenced by mpz_hamdist().
#define mpn_zero_p | ( | xp, | |
n | |||
) | (mpn_normalized_size ((xp), (n)) == 0) |
Referenced by mpz_scan0(), and mpz_scan1().
#define MPZ_PTR_SWAP | ( | x, | |
y | |||
) |
Referenced by mpz_gcdext().
#define MPZ_REALLOC | ( | z, | |
n | |||
) |
Referenced by mpz_and(), mpz_import(), mpz_ior(), mpz_limbs_modify(), mpz_mul_2exp(), mpz_mul_ui(), mpz_powm(), mpz_set(), mpz_set_d(), mpz_set_str(), and mpz_xor().
#define MPZ_SRCPTR_SWAP | ( | x, | |
y | |||
) |
Referenced by mpz_and(), mpz_gcdext(), mpz_ior(), and mpz_xor().
enum mpz_div_round_mode |
void mp_get_memory_functions | ( | void *(**)(size_t) | alloc_func, |
void *(**)(void *, size_t, size_t) | realloc_func, | ||
void(**)(void *, size_t) | free_func | ||
) |
void mp_set_memory_functions | ( | void *(*)(size_t) | alloc_func, |
void *(*)(void *, size_t, size_t) | realloc_func, | ||
void(*)(void *, size_t) | free_func | ||
) |
Referenced by mpz_get_str(), mpz_set(), and mpz_sizeinbase().
References GMP_LIMB_BITS, GMP_LIMB_HIGHBIT, GMP_LLIMB_MASK, and gmp_umul_ppmm.
References GMP_LIMB_BITS.
Referenced by mpz_mul_2exp(), and mpz_powm().
References mpn_addmul_1(), and mpn_mul_1().
Referenced by mpn_mul_n(), mpn_sqr(), and mpz_mul().
References gmp_umul_ppmm.
Referenced by mpn_mul(), and mpz_mul_ui().
mp_bitcnt_t mpn_popcount | ( | mp_srcptr | p, |
mp_size_t | n | ||
) |
References GMP_LIMB_BITS.
mp_bitcnt_t mpn_scan0 | ( | mp_srcptr | ptr, |
mp_bitcnt_t | bit | ||
) |
References GMP_LIMB_BITS, and GMP_LIMB_MAX.
mp_bitcnt_t mpn_scan1 | ( | mp_srcptr | ptr, |
mp_bitcnt_t | bit | ||
) |
References GMP_LIMB_BITS, and GMP_LIMB_MAX.
References mpn_copyd(), mpz_clear(), mpz_init(), mpz_roinit_n(), mpz_rootrem(), and s.
References mpn_sub_1(), and mpn_sub_n().
Referenced by mpz_powm().
References gmp_umul_ppmm.
References GMP_ABS, and mpz_set().
Referenced by mpz_gcd(), mpz_gcd_ui(), mpz_gcdext(), mpz_lcm(), mpz_lcm_ui(), and mpz_powm().
Referenced by interval_map_decompose(), mpz_addmul(), mpz_addmul_ui(), mpz_gcdext(), mpz_invert(), mpz_rootrem(), and range_expr_value_high().
References mpz_add(), mpz_clear(), mpz_init(), and mpz_mul().
References mpz_add(), mpz_clear(), mpz_init(), and mpz_mul_ui().
References GMP_ABS, MP_SIZE_T_SWAP, MPZ_REALLOC, MPZ_SRCPTR_SWAP, and rx().
Referenced by constant_expr_splice(), and interval_map_decompose().
References mpz_clear(), mpz_divexact(), mpz_fac_ui(), mpz_init(), mpz_mul_ui(), and mpz_set_ui().
References GMP_DIV_CEIL, and NULL.
void mpz_cdiv_q_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | cnt | ||
) |
References GMP_DIV_CEIL.
References GMP_DIV_CEIL, and NULL.
References GMP_DIV_CEIL.
References GMP_DIV_CEIL.
References GMP_DIV_CEIL, and NULL.
void mpz_cdiv_r_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | cnt | ||
) |
References GMP_DIV_CEIL.
References GMP_DIV_CEIL, and NULL.
References GMP_DIV_CEIL, and NULL.
void mpz_clear | ( | mpz_t | r | ) |
References gmp_free.
Referenced by constant_expr_splice(), mpn_sqrtrem(), mpz_addmul(), mpz_addmul_ui(), mpz_bin_uiui(), mpz_congruent_p(), mpz_gcd(), mpz_gcdext(), mpz_invert(), mpz_lcm(), mpz_mul(), mpz_pow_ui(), mpz_powm(), mpz_powm_ui(), mpz_probab_prime_p(), mpz_root(), mpz_rootrem(), mpz_submul(), mpz_submul_ui(), mpz_ui_pow_ui(), and range_expr_value_high().
void mpz_clrbit | ( | mpz_t | d, |
mp_bitcnt_t | bit_index | ||
) |
References mpn_cmp().
Referenced by mpz_congruent_p(), mpz_gcd(), mpz_gcdext(), and mpz_probab_prime_p().
int mpz_cmp_d | ( | const mpz_t | x, |
double | d | ||
) |
int mpz_cmp_si | ( | const mpz_t | u, |
long | v | ||
) |
Referenced by interval_map_decompose(), mpz_cmp_si(), and mpz_invert().
References GMP_ABS.
Referenced by mpz_gcdext(), and mpz_rootrem().
int mpz_cmpabs_d | ( | const mpz_t | x, |
double | d | ||
) |
References GMP_ABS, and GMP_LIMB_HIGHBIT.
Referenced by mpz_cmp_d().
References GMP_ABS.
Referenced by mpz_invert(), mpz_probab_prime_p(), and mpz_rootrem().
void mpz_combit | ( | mpz_t | d, |
mp_bitcnt_t | bit_index | ||
) |
References mpz_clear(), mpz_cmp(), mpz_divisible_p(), mpz_init(), mpz_sgn(), and mpz_sub().
References gmp_assert_nocarry, GMP_DIV_TRUNC, and NULL.
Referenced by mpz_bin_uiui(), mpz_gcdext(), and mpz_lcm().
References gmp_assert_nocarry, GMP_DIV_TRUNC, and NULL.
Referenced by mpz_gcdext().
References GMP_DIV_TRUNC, and NULL.
Referenced by mpz_congruent_p().
References GMP_DIV_TRUNC, and NULL.
void* mpz_export | ( | void * | r, |
size_t * | countp, | ||
int | order, | ||
size_t | size, | ||
int | endian, | ||
size_t | nails, | ||
const mpz_t | u | ||
) |
References bytes, GMP_ABS, gmp_xalloc, and size.
Referenced by mpz_export_data().
References mpz_mul_ui(), and mpz_set_ui().
Referenced by mpz_bin_uiui().
References GMP_DIV_FLOOR, and NULL.
void mpz_fdiv_q_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | cnt | ||
) |
References GMP_DIV_FLOOR.
References GMP_DIV_FLOOR, and NULL.
void mpz_fdiv_r_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | cnt | ||
) |
int mpz_fits_slong_p | ( | const mpz_t | u | ) |
References GMP_LIMB_HIGHBIT.
int mpz_fits_ulong_p | ( | const mpz_t | u | ) |
References GMP_MIN, mpz_abs(), mpz_clear(), mpz_cmp(), mpz_init(), mpz_mul_2exp(), mpz_set_ui(), mpz_sub(), mpz_swap(), mpz_tdiv_r(), and mpz_tdiv_ui().
Referenced by mpz_lcm().
References GMP_ABS, mpz_abs(), mpz_set_ui(), and NULL.
Referenced by mpz_lcm_ui(), and mpz_probab_prime_p().
References GMP_MIN, MP_BITCNT_T_SWAP, mpz_abs(), mpz_add(), mpz_clear(), mpz_cmp(), mpz_cmpabs(), mpz_divexact(), mpz_divexact_ui(), mpz_init(), mpz_mul_2exp(), mpz_neg(), mpz_odd_p, MPZ_PTR_SWAP, mpz_set_si(), mpz_set_ui(), mpz_setbit(), mpz_sgn(), MPZ_SRCPTR_SWAP, mpz_sub(), mpz_swap(), and mpz_tdiv_qr().
Referenced by mpz_invert().
double mpz_get_d | ( | const mpz_t | u | ) |
References GMP_ABS, and GMP_LIMB_HIGHBIT.
long int mpz_get_si | ( | const mpz_t | u | ) |
References GMP_LIMB_HIGHBIT.
char* mpz_get_str | ( | char * | sp, |
int | base, | ||
const mpz_t | u | ||
) |
References GMP_ABS, gmp_free, gmp_xalloc, mpn_copyi(), mpz_sizeinbase(), and NULL.
Referenced by mpz_out_str(), and mpz_printf().
mp_bitcnt_t mpz_hamdist | ( | const mpz_t | u, |
const mpz_t | v | ||
) |
References MPN_SRCPTR_SWAP.
void mpz_import | ( | mpz_t | r, |
size_t | count, | ||
int | order, | ||
size_t | size, | ||
int | endian, | ||
size_t | nails, | ||
const void * | src | ||
) |
References bytes, MPZ_REALLOC, and size.
Referenced by mpz_import_data().
void mpz_init | ( | mpz_t | r | ) |
Referenced by interval_map_decompose(), mpn_sqrtrem(), mpz_addmul(), mpz_addmul_ui(), mpz_bin_uiui(), mpz_congruent_p(), mpz_gcd(), mpz_gcdext(), mpz_init_set(), mpz_init_set_d(), mpz_init_set_si(), mpz_init_set_str(), mpz_init_set_ui(), mpz_invert(), mpz_lcm(), mpz_powm(), mpz_probab_prime_p(), mpz_root(), mpz_rootrem(), mpz_submul(), and mpz_submul_ui().
void mpz_init2 | ( | mpz_t | r, |
mp_bitcnt_t | bits | ||
) |
References GMP_LIMB_BITS.
Referenced by constant_expr_alloc(), constant_expr_splice(), mpz_init_bitmask(), mpz_mul(), and mpz_rootrem().
void mpz_init_set_d | ( | mpz_t | r, |
double | x | ||
) |
void mpz_init_set_si | ( | mpz_t | r, |
signed long int | x | ||
) |
int mpz_init_set_str | ( | mpz_t | r, |
const char * | sp, | ||
int | base | ||
) |
References mpz_init(), and mpz_set_ui().
Referenced by mpz_pow_ui(), mpz_powm(), mpz_powm_ui(), and mpz_ui_pow_ui().
References mpz_add(), mpz_clear(), mpz_cmp_ui(), mpz_cmpabs_ui(), mpz_gcdext(), mpz_init(), mpz_sub(), mpz_swap(), and NULL.
Referenced by mpz_powm().
References GMP_ABS, MP_SIZE_T_SWAP, MPZ_REALLOC, mpz_set(), MPZ_SRCPTR_SWAP, and rx().
References __mpz_struct::_mp_size, mpz_abs(), mpz_clear(), mpz_divexact(), mpz_gcd(), mpz_init(), and mpz_mul().
References mpz_abs(), mpz_gcd_ui(), mpz_mul_ui(), and NULL.
References MPZ_REALLOC.
Referenced by mpz_limbs_write().
mp_srcptr mpz_limbs_read | ( | mpz_srcptr | x | ) |
References __mpz_struct::_mp_d.
References GMP_DIV_CEIL, GMP_DIV_FLOOR, and NULL.
References __mpz_struct::_mp_size, GMP_ABS, GMP_LIMB_BITS, mpn_mul(), mpz_clear(), mpz_init2(), and mpz_swap().
Referenced by mpz_addmul(), mpz_lcm(), mpz_pow_ui(), mpz_powm(), and mpz_submul().
void mpz_mul_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | bits | ||
) |
References GMP_ABS, GMP_LIMB_BITS, mpn_copyd(), mpn_lshift(), and MPZ_REALLOC.
Referenced by mpz_gcd(), mpz_gcdext(), and mpz_lshift_ui().
References GMP_ABS, mpn_mul_1(), and MPZ_REALLOC.
Referenced by mpz_addmul_ui(), mpz_bin_uiui(), mpz_fac_ui(), mpz_lcm_ui(), mpz_mul_si(), mpz_rootrem(), and mpz_submul_ui().
References mpz_set().
Referenced by mpz_com(), mpz_gcdext(), mpz_mul_si(), and mpz_rootrem().
size_t mpz_out_str | ( | FILE * | stream, |
int | base, | ||
const mpz_t | x | ||
) |
int mpz_perfect_square_p | ( | const mpz_t | u | ) |
mp_bitcnt_t mpz_popcount | ( | const mpz_t | u | ) |
References mpn_popcount().
Referenced by bitmask_expr_to_binops().
References GMP_ULONG_HIGHBIT, mpz_clear(), mpz_init_set_ui(), mpz_mul(), and mpz_swap().
Referenced by mpz_rootrem(), and mpz_ui_pow_ui().
References GMP_ABS, gmp_assert_nocarry, gmp_free, GMP_LIMB_HIGHBIT, mpn_lshift(), mpn_sub(), mpz_abs(), mpz_clear(), mpz_init(), mpz_init_set_ui(), mpz_invert(), mpz_mul(), MPZ_REALLOC, mpz_set_ui(), mpz_swap(), NULL, and gmp_div_inverse::shift.
Referenced by mpz_powm_ui().
References mpz_clear(), mpz_init_set_ui(), and mpz_powm().
int mpz_probab_prime_p | ( | const mpz_t | n, |
int | reps | ||
) |
References GMP_PRIME_MASK, GMP_PRIME_PRODUCT, mpz_clear(), mpz_cmp(), mpz_cmpabs_ui(), mpz_even_p, mpz_gcd_ui(), mpz_init(), mpz_scan1(), mpz_set_ui(), mpz_tdiv_q_2exp(), and NULL.
void mpz_realloc2 | ( | mpz_t | x, |
mp_bitcnt_t | n | ||
) |
References GMP_LIMB_BITS.
mpz_srcptr mpz_roinit_n | ( | mpz_t | x, |
mp_srcptr | xp, | ||
mp_size_t | xs | ||
) |
References __mpz_struct::_mp_alloc, and mpz_limbs_finish().
Referenced by mpn_perfect_square_p(), and mpn_sqrtrem().
References mpz_clear(), mpz_init(), and mpz_rootrem().
Referenced by mpn_perfect_square_p(), and mpz_perfect_square_p().
References __mpz_struct::_mp_size, mpz_add(), mpz_clear(), mpz_cmpabs(), mpz_cmpabs_ui(), mpz_init(), mpz_init2(), mpz_mul_ui(), mpz_neg(), mpz_pow_ui(), mpz_set(), mpz_setbit(), mpz_sizeinbase(), mpz_sub(), mpz_swap(), mpz_tdiv_q(), mpz_tdiv_q_2exp(), mpz_tdiv_q_ui(), and tb.
Referenced by mpn_sqrtrem(), mpz_root(), mpz_sqrt(), and mpz_sqrtrem().
mp_bitcnt_t mpz_scan0 | ( | const mpz_t | u, |
mp_bitcnt_t | starting_bit | ||
) |
References GMP_ABS, GMP_LIMB_BITS, GMP_LIMB_MAX, and mpn_zero_p.
Referenced by interval_map_decompose().
mp_bitcnt_t mpz_scan1 | ( | const mpz_t | u, |
mp_bitcnt_t | starting_bit | ||
) |
References GMP_ABS, GMP_LIMB_BITS, GMP_LIMB_MAX, and mpn_zero_p.
Referenced by bitmask_expr_to_binops(), and mpz_probab_prime_p().
References GMP_ABS, mpn_copyi(), and MPZ_REALLOC.
Referenced by constant_expr_splice(), interval_map_decompose(), mpz_abs(), mpz_init_set(), mpz_ior(), mpz_neg(), mpz_rootrem(), mpz_xor(), range_expr_value_high(), and range_expr_value_low().
void mpz_set_d | ( | mpz_t | r, |
double | x | ||
) |
References GMP_LIMB_HIGHBIT, and MPZ_REALLOC.
Referenced by mpz_init_set_d().
void mpz_set_si | ( | mpz_t | r, |
signed long int | x | ||
) |
References GMP_NEG_CAST, and mpz_set_ui().
Referenced by mpz_gcdext(), and mpz_init_set_si().
int mpz_set_str | ( | mpz_t | r, |
const char * | sp, | ||
int | base | ||
) |
References dp, mpn_base_info::exp, gmp_free, gmp_xalloc, and MPZ_REALLOC.
Referenced by mpz_init_set_str().
Referenced by flag_expr_alloc(), mpz_bin_uiui(), mpz_bitmask(), mpz_fac_ui(), mpz_gcd(), mpz_gcd_ui(), mpz_gcdext(), mpz_init_set_ui(), mpz_powm(), mpz_probab_prime_p(), and mpz_set_si().
void mpz_setbit | ( | mpz_t | d, |
mp_bitcnt_t | bit_index | ||
) |
References mpz_tstbit().
Referenced by mpz_bitmask(), mpz_gcdext(), and mpz_rootrem().
int mpz_sgn | ( | const mpz_t | u | ) |
size_t mpz_sizeinbase | ( | const mpz_t | u, |
int | base | ||
) |
References GMP_ABS, gmp_free, and mpn_copyi().
Referenced by mpz_get_str(), mpz_printf(), and mpz_rootrem().
Referenced by interval_map_decompose(), mpz_congruent_p(), mpz_gcd(), mpz_gcdext(), mpz_invert(), mpz_rootrem(), mpz_submul(), and mpz_submul_ui().
Referenced by interval_map_decompose(), mpz_bitmask(), and mpz_com().
References mpz_clear(), mpz_init(), mpz_mul(), and mpz_sub().
References mpz_clear(), mpz_init(), mpz_mul_ui(), and mpz_sub().
References MP_PTR_SWAP, and MP_SIZE_T_SWAP.
Referenced by mpz_gcd(), mpz_gcdext(), mpz_invert(), mpz_mul(), mpz_pow_ui(), mpz_powm(), and mpz_rootrem().
References GMP_DIV_TRUNC, and NULL.
Referenced by mpz_rootrem().
void mpz_tdiv_q_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | cnt | ||
) |
References GMP_DIV_TRUNC.
Referenced by mpz_probab_prime_p(), mpz_rootrem(), and mpz_rshift_ui().
References GMP_DIV_TRUNC, and NULL.
Referenced by mpz_rootrem().
References GMP_DIV_TRUNC.
References GMP_DIV_TRUNC, and NULL.
Referenced by mpz_gcd().
void mpz_tdiv_r_2exp | ( | mpz_t | r, |
const mpz_t | u, | ||
mp_bitcnt_t | cnt | ||
) |
References GMP_DIV_TRUNC.
References GMP_DIV_TRUNC, and NULL.
References GMP_DIV_TRUNC, and NULL.
Referenced by mpz_gcd().
int mpz_tstbit | ( | const mpz_t | d, |
mp_bitcnt_t | bit_index | ||
) |
References GMP_ABS, GMP_LIMB_BITS, and gmp_div_inverse::shift.
Referenced by mpz_clrbit(), mpz_combit(), and mpz_setbit().
References mpz_clear(), mpz_init_set_ui(), and mpz_pow_ui().
References GMP_ABS, MP_SIZE_T_SWAP, MPZ_REALLOC, mpz_set(), MPZ_SRCPTR_SWAP, and rx().
const int mp_bits_per_limb = GMP_LIMB_BITS |