# 1 "mp.c" # 1 "/home/jpuydt/sage-4.8/spkg/build/pari-2.5.0.p3/src/Olinux-armv7l//" # 1 "" # 1 "" # 1 "mp.c" # 2 "../src/kernel/gmp/mp.c" # 40 "../src/kernel/gmp/mp.c" # 1 "/home/jpuydt/sage-4.8/local/include/gmp.h" 1 # 55 "/home/jpuydt/sage-4.8/local/include/gmp.h" # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 212 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 3 4 typedef unsigned int size_t; # 56 "/home/jpuydt/sage-4.8/local/include/gmp.h" 2 # 196 "/home/jpuydt/sage-4.8/local/include/gmp.h" typedef unsigned long int mp_limb_t; typedef long int mp_limb_signed_t; typedef unsigned long int mp_bitcnt_t; typedef struct { int _mp_alloc; int _mp_size; mp_limb_t *_mp_d; } __mpz_struct; typedef __mpz_struct mpz_t[1]; typedef mp_limb_t * mp_ptr; typedef const mp_limb_t * mp_srcptr; # 237 "/home/jpuydt/sage-4.8/local/include/gmp.h" typedef long int mp_size_t; typedef long int mp_exp_t; typedef struct { __mpz_struct _mp_num; __mpz_struct _mp_den; } __mpq_struct; typedef __mpq_struct mpq_t[1]; typedef struct { int _mp_prec; int _mp_size; mp_exp_t _mp_exp; mp_limb_t *_mp_d; } __mpf_struct; typedef __mpf_struct mpf_t[1]; typedef enum { GMP_RAND_ALG_DEFAULT = 0, GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT } gmp_randalg_t; typedef struct { mpz_t _mp_seed; gmp_randalg_t _mp_alg; union { void *_mp_lc; } _mp_algdata; } __gmp_randstate_struct; typedef __gmp_randstate_struct gmp_randstate_t[1]; typedef const __mpz_struct *mpz_srcptr; typedef __mpz_struct *mpz_ptr; typedef const __mpf_struct *mpf_srcptr; typedef __mpf_struct *mpf_ptr; typedef const __mpq_struct *mpq_srcptr; typedef __mpq_struct *mpq_ptr; # 545 "/home/jpuydt/sage-4.8/local/include/gmp.h" void __gmp_set_memory_functions (void *(*) (size_t), void *(*) (void *, size_t, size_t), void (*) (void *, size_t)) ; void __gmp_get_memory_functions (void *(**) (size_t), void *(**) (void *, size_t, size_t), void (**) (void *, size_t)) ; extern const int __gmp_bits_per_limb; extern int __gmp_errno; extern const char * const __gmp_version; extern const char * const __mpir_version; void __gmp_randinit_default (gmp_randstate_t); void __gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t) ; int __gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); void __gmp_randinit_mt (gmp_randstate_t); void __gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); void __gmp_randseed (gmp_randstate_t, mpz_srcptr); void __gmp_randseed_ui (gmp_randstate_t, unsigned long int); void __gmp_randclear (gmp_randstate_t); unsigned long __gmp_urandomb_ui (gmp_randstate_t, unsigned long); unsigned long __gmp_urandomm_ui (gmp_randstate_t, unsigned long); int __gmp_asprintf (char **, const char *, ...); # 623 "/home/jpuydt/sage-4.8/local/include/gmp.h" int __gmp_printf (const char *, ...); int __gmp_snprintf (char *, size_t, const char *, ...); int __gmp_sprintf (char *, const char *, ...); # 665 "/home/jpuydt/sage-4.8/local/include/gmp.h" int __gmp_scanf (const char *, ...); int __gmp_sscanf (const char *, const char *, ...); # 692 "/home/jpuydt/sage-4.8/local/include/gmp.h" void *__gmpz_realloc (mpz_ptr, mp_size_t); void __gmpz_abs (mpz_ptr, mpz_srcptr); void __gmpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_array_init (mpz_ptr, mp_size_t, mp_size_t); void __gmpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); void __gmpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, unsigned long); unsigned long int __gmpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); unsigned long int __gmpz_cdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_clear (mpz_ptr); void __gmpz_clears (mpz_ptr, ...); void __gmpz_clrbit (mpz_ptr, mp_bitcnt_t); int __gmpz_cmp (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_cmp_d (mpz_srcptr, double) __attribute__ ((__pure__)); int __gmpz_cmp_si (mpz_srcptr, signed long int) __attribute__ ((__pure__)); int __gmpz_cmp_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); int __gmpz_cmpabs (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_cmpabs_d (mpz_srcptr, double) __attribute__ ((__pure__)); int __gmpz_cmpabs_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_com (mpz_ptr, mpz_srcptr); void __gmpz_combit (mpz_ptr, mp_bitcnt_t); int __gmpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); int __gmpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __attribute__ ((__pure__)); void __gmpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); int __gmpz_divisible_p (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_divisible_ui_p (mpz_srcptr, unsigned long) __attribute__ ((__pure__)); int __gmpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); void __gmpz_dump (mpz_srcptr); void *__gmpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); void __gmpz_fac_ui (mpz_ptr, unsigned long int); void __gmpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); unsigned long int __gmpz_fdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_fib_ui (mpz_ptr, unsigned long int); void __gmpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); int __gmpz_fits_sint_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_fits_slong_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_fits_sshort_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_fits_uint_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_fits_ulong_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_fits_ushort_p (mpz_srcptr) __attribute__ ((__pure__)); void __gmpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); double __gmpz_get_d (mpz_srcptr) __attribute__ ((__pure__)); double __gmpz_get_d_2exp (signed long int *, mpz_srcptr); long int __gmpz_get_si (mpz_srcptr) __attribute__ ((__pure__)); char *__gmpz_get_str (char *, int, mpz_srcptr); unsigned long int __gmpz_get_ui (mpz_srcptr) __attribute__ ((__pure__)); mp_limb_t __gmpz_getlimbn (mpz_srcptr, mp_size_t) __attribute__ ((__pure__)); mp_bitcnt_t __gmpz_hamdist (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); void __gmpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); void __gmpz_init (mpz_ptr); void __gmpz_init2 (mpz_ptr, mp_bitcnt_t); void __gmpz_inits (mpz_ptr, ...); void __gmpz_init_set (mpz_ptr, mpz_srcptr); void __gmpz_init_set_d (mpz_ptr, double); void __gmpz_init_set_si (mpz_ptr, signed long int); int __gmpz_init_set_str (mpz_ptr, const char *, int); void __gmpz_init_set_ui (mpz_ptr, unsigned long int); # 951 "/home/jpuydt/sage-4.8/local/include/gmp.h" int __gmpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); int __gmpz_jacobi (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_kronecker_si (mpz_srcptr, long) __attribute__ ((__pure__)); int __gmpz_kronecker_ui (mpz_srcptr, unsigned long) __attribute__ ((__pure__)); int __gmpz_si_kronecker (long, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_ui_kronecker (unsigned long, mpz_srcptr) __attribute__ ((__pure__)); void __gmpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); void __gmpz_lucnum_ui (mpz_ptr, unsigned long int); void __gmpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); int __gmpz_millerrabin (mpz_srcptr, int) __attribute__ ((__pure__)); void __gmpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); void __gmpz_mul_si (mpz_ptr, mpz_srcptr, long int); void __gmpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_neg (mpz_ptr, mpz_srcptr); void __gmpz_nextprime (mpz_ptr, mpz_srcptr); void __gmpz_next_likely_prime (mpz_ptr, mpz_srcptr,gmp_randstate_t); # 1033 "/home/jpuydt/sage-4.8/local/include/gmp.h" int __gmpz_perfect_power_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_perfect_square_p (mpz_srcptr) __attribute__ ((__pure__)); mp_bitcnt_t __gmpz_popcount (mpz_srcptr) __attribute__ ((__pure__)); void __gmpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); void __gmpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); int __gmpz_probab_prime_p (mpz_srcptr, int) __attribute__ ((__pure__)); int __gmpz_probable_prime_p (mpz_srcptr,gmp_randstate_t, int,unsigned long); int __gmpz_likely_prime_p (mpz_srcptr,gmp_randstate_t, unsigned long); void __gmpz_realloc2 (mpz_ptr, mp_bitcnt_t); unsigned long int __gmpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); int __gmpz_root (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_nthroot (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_rootrem (mpz_ptr,mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); mp_bitcnt_t __gmpz_scan0 (mpz_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); mp_bitcnt_t __gmpz_scan1 (mpz_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); void __gmpz_set (mpz_ptr, mpz_srcptr); void __gmpz_set_d (mpz_ptr, double); void __gmpz_set_f (mpz_ptr, mpf_srcptr); void __gmpz_set_q (mpz_ptr, mpq_srcptr); void __gmpz_set_si (mpz_ptr, signed long int); int __gmpz_set_str (mpz_ptr, const char *, int); void __gmpz_set_ui (mpz_ptr, unsigned long int); void __gmpz_setbit (mpz_ptr, mp_bitcnt_t); size_t __gmpz_size (mpz_srcptr) __attribute__ ((__pure__)); size_t __gmpz_sizeinbase (mpz_srcptr, int) __attribute__ ((__pure__)); void __gmpz_sqrt (mpz_ptr, mpz_srcptr); void __gmpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); void __gmpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); void __gmpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_swap (mpz_ptr, mpz_ptr) ; unsigned long int __gmpz_tdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); int __gmpz_tstbit (mpz_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); void __gmpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); void __gmpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); void __gmpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); void __gmpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpq_abs (mpq_ptr, mpq_srcptr); void __gmpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_canonicalize (mpq_ptr); void __gmpq_clear (mpq_ptr); void __gmpq_clears (mpq_ptr, ...); int __gmpq_cmp (mpq_srcptr, mpq_srcptr) __attribute__ ((__pure__)); int __gmpq_cmp_si (mpq_srcptr, long, unsigned long) __attribute__ ((__pure__)); int __gmpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __attribute__ ((__pure__)); void __gmpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); int __gmpq_equal (mpq_srcptr, mpq_srcptr) __attribute__ ((__pure__)); void __gmpq_get_num (mpz_ptr, mpq_srcptr); void __gmpq_get_den (mpz_ptr, mpq_srcptr); double __gmpq_get_d (mpq_srcptr) __attribute__ ((__pure__)); char *__gmpq_get_str (char *, int, mpq_srcptr); void __gmpq_init (mpq_ptr); void __gmpq_inits (mpq_ptr, ...); void __gmpq_inv (mpq_ptr, mpq_srcptr); void __gmpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); void __gmpq_neg (mpq_ptr, mpq_srcptr); # 1275 "/home/jpuydt/sage-4.8/local/include/gmp.h" void __gmpq_set (mpq_ptr, mpq_srcptr); void __gmpq_set_d (mpq_ptr, double); void __gmpq_set_den (mpq_ptr, mpz_srcptr); void __gmpq_set_f (mpq_ptr, mpf_srcptr); void __gmpq_set_num (mpq_ptr, mpz_srcptr); void __gmpq_set_si (mpq_ptr, signed long int, unsigned long int); int __gmpq_set_str (mpq_ptr, const char *, int); void __gmpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); void __gmpq_set_z (mpq_ptr, mpz_srcptr); void __gmpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_swap (mpq_ptr, mpq_ptr) ; void __gmpf_abs (mpf_ptr, mpf_srcptr); void __gmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_ceil (mpf_ptr, mpf_srcptr); void __gmpf_clear (mpf_ptr); void __gmpf_clears (mpf_ptr, ...); int __gmpf_cmp (mpf_srcptr, mpf_srcptr) __attribute__ ((__pure__)); int __gmpf_cmp_d (mpf_srcptr, double) __attribute__ ((__pure__)); int __gmpf_cmp_si (mpf_srcptr, signed long int) __attribute__ ((__pure__)); int __gmpf_cmp_ui (mpf_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); void __gmpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_dump (mpf_srcptr); int __gmpf_eq (mpf_srcptr, mpf_srcptr, unsigned long int) __attribute__ ((__pure__)); int __gmpf_fits_sint_p (mpf_srcptr) __attribute__ ((__pure__)); int __gmpf_fits_slong_p (mpf_srcptr) __attribute__ ((__pure__)); int __gmpf_fits_sshort_p (mpf_srcptr) __attribute__ ((__pure__)); int __gmpf_fits_uint_p (mpf_srcptr) __attribute__ ((__pure__)); int __gmpf_fits_ulong_p (mpf_srcptr) __attribute__ ((__pure__)); int __gmpf_fits_ushort_p (mpf_srcptr) __attribute__ ((__pure__)); void __gmpf_floor (mpf_ptr, mpf_srcptr); double __gmpf_get_d (mpf_srcptr) __attribute__ ((__pure__)); double __gmpf_get_d_2exp (signed long int *, mpf_srcptr); mp_bitcnt_t __gmpf_get_default_prec (void) __attribute__ ((__pure__)); mp_bitcnt_t __gmpf_get_prec (mpf_srcptr) __attribute__ ((__pure__)); long __gmpf_get_si (mpf_srcptr) __attribute__ ((__pure__)); char *__gmpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); unsigned long __gmpf_get_ui (mpf_srcptr) __attribute__ ((__pure__)); void __gmpf_init (mpf_ptr); void __gmpf_init2 (mpf_ptr, mp_bitcnt_t); void __gmpf_inits (mpf_ptr, ...); void __gmpf_init_set (mpf_ptr, mpf_srcptr); void __gmpf_init_set_d (mpf_ptr, double); void __gmpf_init_set_si (mpf_ptr, signed long int); int __gmpf_init_set_str (mpf_ptr, const char *, int); void __gmpf_init_set_ui (mpf_ptr, unsigned long int); int __gmpf_integer_p (mpf_srcptr) __attribute__ ((__pure__)); void __gmpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); void __gmpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_neg (mpf_ptr, mpf_srcptr); void __gmpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); void __gmpf_rrandomb (mpf_ptr, gmp_randstate_t, mp_size_t, mp_exp_t); void __gmpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_set (mpf_ptr, mpf_srcptr); void __gmpf_set_d (mpf_ptr, double); void __gmpf_set_default_prec (mp_bitcnt_t) ; void __gmpf_set_prec (mpf_ptr, mp_bitcnt_t); void __gmpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) ; void __gmpf_set_q (mpf_ptr, mpq_srcptr); void __gmpf_set_si (mpf_ptr, signed long int); int __gmpf_set_str (mpf_ptr, const char *, int); void __gmpf_set_ui (mpf_ptr, unsigned long int); void __gmpf_set_z (mpf_ptr, mpz_srcptr); size_t __gmpf_size (mpf_srcptr) __attribute__ ((__pure__)); void __gmpf_sqrt (mpf_ptr, mpf_srcptr); void __gmpf_sqrt_ui (mpf_ptr, unsigned long int); void __gmpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_swap (mpf_ptr, mpf_ptr) ; void __gmpf_trunc (mpf_ptr, mpf_srcptr); void __gmpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); void __gmpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); void __gmpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); # 1524 "/home/jpuydt/sage-4.8/local/include/gmp.h" mp_limb_t __gmpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t); mp_limb_t __gmpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) ; mp_limb_t __gmpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); mp_limb_t __gmpn_bdivmod (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, unsigned long int); mp_limb_t __gmpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); int __gmpn_mulmod_2expp1 (mp_ptr, mp_srcptr, mp_srcptr,int,unsigned long, mp_ptr); void __gmpn_mulmod_2expm1 (mp_ptr, mp_ptr, mp_ptr,unsigned long, mp_ptr); int __gmpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __attribute__ ((__pure__)); mp_limb_t __gmpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); mp_limb_t __gmpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); mp_limb_t __gmpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); void __gmpn_invert (mp_ptr xp, mp_srcptr ap, mp_size_t n); mp_limb_t __gmpn_sb_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dip) ; mp_limb_t __gmpn_dc_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dip, mp_ptr tp) ; void __gmpn_dc_bdiv_q_n (mp_ptr qp, mp_ptr wp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr scratch) ; mp_limb_t __gmpn_inv_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_srcptr dip) ; mp_limb_t __gmpn_dc_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t n, mp_limb_t dinv) ; mp_limb_t __gmpn_dc_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; mp_limb_t __gmpn_inv_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t n, mp_srcptr dinv) ; mp_limb_t __gmpn_inv_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv) ; mp_limb_t __gmpn_inv_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv) ; mp_limb_t __gmpn_inv_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv) ; mp_limb_t __gmpn_dc_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; mp_limb_t __gmpn_dc_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr tp) ; mp_limb_t __gmpn_sb_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; void __gmpn_sb_bdiv_q (mp_ptr qp, mp_ptr wp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; void __gmpn_dc_bdiv_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; mp_limb_t __gmpn_dc_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; mp_limb_t __gmpn_dc_bdiv_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr tp) ; mp_limb_t __gmpn_sb_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; mp_limb_t __gmpn_sb_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) ; void __gmpn_tdiv_q (mp_ptr qp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn) ; void __gmpn_divexact (mp_ptr qp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn) ; mp_size_t __gmpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); mp_limb_t __gmpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__)); mp_size_t __gmpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); size_t __gmpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); mp_bitcnt_t __gmpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __attribute__ ((__pure__)); mp_limb_t __gmpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); mp_limb_t __gmpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__)); mp_limb_t __gmpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); mp_limb_t __gmpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); void __gmpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_sqr (mp_ptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_neg_n (mp_ptr, mp_srcptr, mp_size_t); void __gmpn_com_n (mp_ptr, mp_srcptr, mp_size_t); int __gmpn_perfect_square_p (mp_srcptr, mp_size_t) __attribute__ ((__pure__)); mp_bitcnt_t __gmpn_popcount (mp_srcptr, mp_size_t) __attribute__ ((__pure__)); mp_size_t __gmpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); mp_limb_t __gmpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __attribute__ ((__pure__)); void __gmpn_random (mp_ptr, mp_size_t); void __gmpn_random2 (mp_ptr, mp_size_t); void __gmpn_urandomb (mp_ptr, gmp_randstate_t, unsigned long); void __gmpn_urandomm (mp_ptr, gmp_randstate_t, mp_srcptr, mp_size_t); void __gmpn_randomb (mp_ptr, gmp_randstate_t, mp_size_t); void __gmpn_rrandom (mp_ptr, gmp_randstate_t, mp_size_t); mp_limb_t __gmpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); mp_bitcnt_t __gmpn_scan0 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); mp_bitcnt_t __gmpn_scan1 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); mp_size_t __gmpn_set_str (mp_ptr, const unsigned char *, size_t, int); mp_size_t __gmpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t); mp_limb_t __gmpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) ; mp_limb_t __gmpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); void __gmpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); void __gmpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_copyi (mp_ptr, mp_srcptr, mp_size_t); void __gmpn_copyd (mp_ptr, mp_srcptr, mp_size_t); void __gmpn_zero (mp_ptr, mp_size_t); # 1804 "/home/jpuydt/sage-4.8/local/include/gmp.h" extern __inline__ __attribute__((__gnu_inline__)) void __gmpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpz_set (__gmp_w, __gmp_u); __gmp_w->_mp_size = ((__gmp_w->_mp_size) >= 0 ? (__gmp_w->_mp_size) : -(__gmp_w->_mp_size)); } # 1828 "/home/jpuydt/sage-4.8/local/include/gmp.h" extern __inline__ __attribute__((__gnu_inline__)) int __gmpz_fits_uint_p (mpz_srcptr __gmp_z) { mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned) 0)));; } extern __inline__ __attribute__((__gnu_inline__)) int __gmpz_fits_ulong_p (mpz_srcptr __gmp_z) { mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned long) 0)));; } extern __inline__ __attribute__((__gnu_inline__)) int __gmpz_fits_ushort_p (mpz_srcptr __gmp_z) { mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= ((unsigned short) ~0)));; } extern __inline__ __attribute__((__gnu_inline__)) unsigned long __gmpz_get_ui (mpz_srcptr __gmp_z) { mp_ptr __gmp_p = __gmp_z->_mp_d; mp_size_t __gmp_n = __gmp_z->_mp_size; mp_limb_t __gmp_l = __gmp_p[0]; return (__gmp_n != 0 ? __gmp_l : 0); # 1884 "/home/jpuydt/sage-4.8/local/include/gmp.h" } extern __inline__ __attribute__((__gnu_inline__)) mp_limb_t __gmpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) { mp_limb_t __gmp_result = 0; if (__builtin_expect ((__gmp_n >= 0 && __gmp_n < ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size))) != 0, 1)) __gmp_result = __gmp_z->_mp_d[__gmp_n]; return __gmp_result; } extern __inline__ __attribute__((__gnu_inline__)) void __gmpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpz_set (__gmp_w, __gmp_u); __gmp_w->_mp_size = - __gmp_w->_mp_size; } extern __inline__ __attribute__((__gnu_inline__)) int __gmpz_perfect_square_p (mpz_srcptr __gmp_a) { mp_size_t __gmp_asize; int __gmp_result; __gmp_asize = __gmp_a->_mp_size; __gmp_result = (__gmp_asize >= 0); if (__builtin_expect ((__gmp_asize > 0) != 0, 1)) __gmp_result = __gmpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); return __gmp_result; } extern __inline__ __attribute__((__gnu_inline__)) mp_bitcnt_t __gmpz_popcount (mpz_srcptr __gmp_u) { mp_size_t __gmp_usize; mp_bitcnt_t __gmp_result; __gmp_usize = __gmp_u->_mp_size; __gmp_result = (__gmp_usize < 0 ? (~ (unsigned long) 0) : 0); if (__builtin_expect ((__gmp_usize > 0) != 0, 1)) __gmp_result = __gmpn_popcount (__gmp_u->_mp_d, __gmp_usize); return __gmp_result; } extern __inline__ __attribute__((__gnu_inline__)) void __gmpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) { __gmpz_tdiv_q (__gmp_w, (&((__gmp_u)->_mp_num)), (&((__gmp_u)->_mp_den))); } extern __inline__ __attribute__((__gnu_inline__)) size_t __gmpz_size (mpz_srcptr __gmp_z) { return ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size)); } extern __inline__ __attribute__((__gnu_inline__)) void __gmpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpq_set (__gmp_w, __gmp_u); __gmp_w->_mp_num._mp_size = ((__gmp_w->_mp_num._mp_size) >= 0 ? (__gmp_w->_mp_num._mp_size) : -(__gmp_w->_mp_num._mp_size)); } extern __inline__ __attribute__((__gnu_inline__)) void __gmpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpq_set (__gmp_w, __gmp_u); __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; } # 2226 "/home/jpuydt/sage-4.8/local/include/gmp.h" extern __inline__ __attribute__((__gnu_inline__)) mp_limb_t __gmpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_add_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ ((mp_limb_t) (0))) >> 0)) == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0); return __gmp_c; } extern __inline__ __attribute__((__gnu_inline__)) mp_limb_t __gmpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x + (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_r) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x + 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_r) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0); return __gmp_c; } extern __inline__ __attribute__((__gnu_inline__)) int __gmpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) { int __gmp_result; do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_y; (__gmp_result) = 0; __gmp_i = (__gmp_size); while (--__gmp_i >= 0) { __gmp_x = (__gmp_xp)[__gmp_i]; __gmp_y = (__gmp_yp)[__gmp_i]; if (__gmp_x != __gmp_y) { (__gmp_result) = (__gmp_x > __gmp_y ? 1 : -1); break; } } } while (0); return __gmp_result; } extern __inline__ __attribute__((__gnu_inline__)) mp_limb_t __gmpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_sub_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x - 1) & ((~ ((mp_limb_t) (0))) >> 0)), __gmp_x == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0); return __gmp_c; } extern __inline__ __attribute__((__gnu_inline__)) mp_limb_t __gmpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x - (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_x) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x - 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_x) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0); return __gmp_c; } # 2354 "/home/jpuydt/sage-4.8/local/include/gmp.h" typedef __mpz_struct MP_INT; typedef __mpq_struct MP_RAT; # 2364 "/home/jpuydt/sage-4.8/local/include/gmp.h" enum { GMP_ERROR_NONE = 0, GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, GMP_ERROR_DIVISION_BY_ZERO = 2, GMP_ERROR_SQRT_OF_NEGATIVE = 4, GMP_ERROR_INVALID_ARGUMENT = 8 }; # 41 "../src/kernel/gmp/mp.c" 2 # 1 "../src/headers/pari.h" 1 # 18 "../src/headers/pari.h" # 1 "./paricfg.h" 1 # 19 "../src/headers/pari.h" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 25 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 323 "/usr/include/features.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/predefs.h" 1 3 4 # 324 "/usr/include/features.h" 2 3 4 # 356 "/usr/include/features.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 1 3 4 # 353 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 # 354 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 2 3 4 # 357 "/usr/include/features.h" 2 3 4 # 388 "/usr/include/features.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 1 3 4 # 389 "/usr/include/features.h" 2 3 4 # 26 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 324 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 3 4 typedef unsigned int wchar_t; # 34 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 1 3 4 # 65 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 61 "/usr/include/endian.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 1 3 4 # 62 "/usr/include/endian.h" 2 3 4 # 66 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 2 3 4 union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 68 "/usr/include/stdlib.h" 3 4 typedef union { union wait *__uptr; int *__iptr; } __WAIT_STATUS __attribute__ ((__transparent_union__)); # 96 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 140 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern double atof (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int atoi (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int atol (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int atoll (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 277 "/usr/include/stdlib.h" 3 4 extern __inline double __attribute__ ((__nothrow__)) atof (__const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } extern __inline int __attribute__ ((__nothrow__)) atoi (__const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline long int __attribute__ ((__nothrow__)) atol (__const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) atoll (__const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } # 311 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern long int a64l (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1 "/usr/include/arm-linux-gnueabihf/sys/types.h" 1 3 4 # 28 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/types.h" 1 3 4 # 28 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 # 29 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; # 131 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/typesizes.h" 1 3 4 # 132 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; # 31 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; # 61 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; # 99 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 58 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 74 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 92 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 104 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 # 147 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 148 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 195 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 220 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/sys/select.h" 1 3 4 # 31 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/select.h" 1 3 4 # 32 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 1 3 4 # 24 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 120 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/time.h" 1 3 4 # 75 "/usr/include/arm-linux-gnueabihf/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 typedef __suseconds_t suseconds_t; typedef long int __fd_mask; # 67 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 typedef struct { __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 # 109 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); # 221 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 1 3 4 # 30 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 3 4 __extension__ extern unsigned int gnu_dev_major (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern unsigned int gnu_dev_minor (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 224 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 271 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 1 3 4 # 38 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; # 141 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 3 4 unsigned char __flags; unsigned char __shared; unsigned char __pad1; unsigned char __pad2; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 272 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 # 321 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) __attribute__ ((__nothrow__)); extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) __attribute__ ((__nothrow__)); extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); extern double drand48 (void) __attribute__ ((__nothrow__)); extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) __attribute__ ((__nothrow__)); extern long int nrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) __attribute__ ((__nothrow__)); extern long int jrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) __attribute__ ((__nothrow__)); extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); # 498 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 531 "/usr/include/stdlib.h" 3 4 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 554 "/usr/include/stdlib.h" 3 4 extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *__secure_getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int clearenv (void) __attribute__ ((__nothrow__)); # 606 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 620 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 642 "/usr/include/stdlib.h" 3 4 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 663 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 712 "/usr/include/stdlib.h" 3 4 extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); # 734 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); typedef int (*__compar_fn_t) (__const void *, __const void *); # 752 "/usr/include/stdlib.h" 3 4 extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); # 771 "/usr/include/stdlib.h" 3 4 extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int llabs (long long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern div_t div (int __numer, int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); # 808 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *gcvt (double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qgcvt (long double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) __attribute__ ((__nothrow__)); extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 896 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); # 948 "/usr/include/stdlib.h" 3 4 extern int getloadavg (double __loadavg[], int __nelem) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/arm-linux-gnueabihf/bits/stdlib.h" 1 3 4 # 24 "/usr/include/arm-linux-gnueabihf/bits/stdlib.h" 3 4 extern char *__realpath_chk (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved) { if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) { return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); } return __realpath_alias (__name, __resolved); } extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __ptsname_r_alias (__fd, __buf, __buflen); } extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int __attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); return __wctomb_alias (__s, __wchar); } extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__)) ; extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__)) __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __mbstowcs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) return __mbstowcs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); } return __mbstowcs_alias (__dst, __src, __len); } extern size_t __wcstombs_chk (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__)) ; extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__)) __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); if (__len > __builtin_object_size (__dst, 2 > 1)) return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); } return __wcstombs_alias (__dst, __src, __len); } # 956 "/usr/include/stdlib.h" 2 3 4 # 964 "/usr/include/stdlib.h" 3 4 # 21 "../src/headers/pari.h" 2 # 29 "../src/headers/pari.h" # 1 "/usr/include/signal.h" 1 3 4 # 31 "/usr/include/signal.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 1 3 4 # 104 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 3 4 extern int __sigismember (__const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); # 118 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 3 4 extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } # 34 "/usr/include/signal.h" 2 3 4 typedef __sig_atomic_t sig_atomic_t; # 58 "/usr/include/signal.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/signum.h" 1 3 4 # 59 "/usr/include/signal.h" 2 3 4 # 76 "/usr/include/signal.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 77 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 1 3 4 # 25 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 # 26 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 2 3 4 typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; # 51 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4 typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 3)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; } _sifields; } siginfo_t; # 129 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4 enum { SI_ASYNCNL = -60, SI_TKILL = -6, SI_SIGIO, SI_ASYNCIO, SI_MESGQ, SI_TIMER, SI_QUEUE, SI_USER, SI_KERNEL = 0x80 }; enum { ILL_ILLOPC = 1, ILL_ILLOPN, ILL_ILLADR, ILL_ILLTRP, ILL_PRVOPC, ILL_PRVREG, ILL_COPROC, ILL_BADSTK }; enum { FPE_INTDIV = 1, FPE_INTOVF, FPE_FLTDIV, FPE_FLTOVF, FPE_FLTUND, FPE_FLTRES, FPE_FLTINV, FPE_FLTSUB }; enum { SEGV_MAPERR = 1, SEGV_ACCERR }; enum { BUS_ADRALN = 1, BUS_ADRERR, BUS_OBJERR }; enum { TRAP_BRKPT = 1, TRAP_TRACE }; enum { CLD_EXITED = 1, CLD_KILLED, CLD_DUMPED, CLD_TRAPPED, CLD_STOPPED, CLD_CONTINUED }; enum { POLL_IN = 1, POLL_OUT, POLL_MSG, POLL_ERR, POLL_PRI, POLL_HUP }; # 273 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4 typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 3)]; __pid_t _tid; struct { void (*_function) (sigval_t); void *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; enum { SIGEV_SIGNAL = 0, SIGEV_NONE, SIGEV_THREAD, SIGEV_THREAD_ID = 4 }; # 80 "/usr/include/signal.h" 2 3 4 typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); # 99 "/usr/include/signal.h" 3 4 extern __sighandler_t signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); # 113 "/usr/include/signal.h" 3 4 # 126 "/usr/include/signal.h" 3 4 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__)); extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__)); extern int raise (int __sig) __attribute__ ((__nothrow__)); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); extern int gsignal (int __sig) __attribute__ ((__nothrow__)); extern void psignal (int __sig, __const char *__s); extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); # 168 "/usr/include/signal.h" 3 4 extern int __sigpause (int __sig_or_mask, int __is_sig); # 196 "/usr/include/signal.h" 3 4 extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); # 216 "/usr/include/signal.h" 3 4 typedef __sighandler_t sig_t; extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigismember (__const sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 252 "/usr/include/signal.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/sigaction.h" 1 3 4 # 25 "/usr/include/arm-linux-gnueabihf/bits/sigaction.h" 3 4 struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; __sigset_t sa_mask; int sa_flags; void (*sa_restorer) (void); }; # 253 "/usr/include/signal.h" 2 3 4 extern int sigprocmask (int __how, __const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__ ((__nothrow__)); extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__ ((__nothrow__)); extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (__const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (__const sigset_t *__restrict __set, siginfo_t *__restrict __info, __const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) __attribute__ ((__nothrow__)); # 310 "/usr/include/signal.h" 3 4 extern __const char *__const _sys_siglist[65]; extern __const char *__const sys_siglist[65]; struct sigvec { __sighandler_t sv_handler; int sv_mask; int sv_flags; }; # 334 "/usr/include/signal.h" 3 4 extern int sigvec (int __sig, __const struct sigvec *__vec, struct sigvec *__ovec) __attribute__ ((__nothrow__)); # 1 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 1 3 4 # 28 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/asm/sigcontext.h" 1 3 4 # 9 "/usr/include/arm-linux-gnueabihf/asm/sigcontext.h" 3 4 struct sigcontext { unsigned long trap_no; unsigned long error_code; unsigned long oldmask; unsigned long arm_r0; unsigned long arm_r1; unsigned long arm_r2; unsigned long arm_r3; unsigned long arm_r4; unsigned long arm_r5; unsigned long arm_r6; unsigned long arm_r7; unsigned long arm_r8; unsigned long arm_r9; unsigned long arm_r10; unsigned long arm_fp; unsigned long arm_ip; unsigned long arm_sp; unsigned long arm_lr; unsigned long arm_pc; unsigned long arm_cpsr; unsigned long fault_address; }; # 29 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 2 3 4 # 340 "/usr/include/signal.h" 2 3 4 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 350 "/usr/include/signal.h" 2 3 4 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__)); # 1 "/usr/include/arm-linux-gnueabihf/bits/sigstack.h" 1 3 4 # 26 "/usr/include/arm-linux-gnueabihf/bits/sigstack.h" 3 4 struct sigstack { void *ss_sp; int ss_onstack; }; enum { SS_ONSTACK = 1, SS_DISABLE }; # 50 "/usr/include/arm-linux-gnueabihf/bits/sigstack.h" 3 4 typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 357 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 1 3 4 # 25 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 3 4 # 1 "/usr/include/signal.h" 1 3 4 # 26 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 1 3 4 # 30 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 2 3 4 typedef int greg_t; typedef greg_t gregset_t[18]; enum { REG_R0 = 0, REG_R1 = 1, REG_R2 = 2, REG_R3 = 3, REG_R4 = 4, REG_R5 = 5, REG_R6 = 6, REG_R7 = 7, REG_R8 = 8, REG_R9 = 9, REG_R10 = 10, REG_R11 = 11, REG_R12 = 12, REG_R13 = 13, REG_R14 = 14, REG_R15 = 15 }; struct _libc_fpstate { struct { unsigned int sign1:1; unsigned int unused:15; unsigned int sign2:1; unsigned int exponent:14; unsigned int j:1; unsigned int mantissa1:31; unsigned int mantissa0:32; } fpregs[8]; unsigned int fpsr:32; unsigned int fpcr:32; unsigned char ftype[8]; unsigned int init_flag; }; typedef struct _libc_fpstate fpregset_t; typedef struct sigcontext mcontext_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; __sigset_t uc_sigmask; unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; # 360 "/usr/include/signal.h" 2 3 4 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int sigaltstack (__const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__)); # 395 "/usr/include/signal.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/sigthread.h" 1 3 4 # 31 "/usr/include/arm-linux-gnueabihf/bits/sigthread.h" 3 4 extern int pthread_sigmask (int __how, __const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__)); extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__)); # 396 "/usr/include/signal.h" 2 3 4 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); # 30 "../src/headers/pari.h" 2 # 1 "/usr/include/stdio.h" 1 3 4 # 30 "/usr/include/stdio.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 35 "/usr/include/stdio.h" 2 3 4 # 45 "/usr/include/stdio.h" 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 65 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 75 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/libio.h" 1 3 4 # 32 "/usr/include/libio.h" 3 4 # 1 "/usr/include/_G_config.h" 1 3 4 # 15 "/usr/include/_G_config.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 16 "/usr/include/_G_config.h" 2 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 83 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; # 21 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 53 "/usr/include/_G_config.h" 3 4 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 33 "/usr/include/libio.h" 2 3 4 # 53 "/usr/include/libio.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stdarg.h" 1 3 4 # 40 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 # 170 "/usr/include/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; # 180 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 203 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 271 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 319 "/usr/include/libio.h" 3 4 __off64_t _offset; # 328 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef struct _IO_FILE _IO_FILE; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 364 "/usr/include/libio.h" 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); # 416 "/usr/include/libio.h" 3 4 extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); # 460 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_peekc_locked (_IO_FILE *__fp); extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); # 490 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); # 76 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 109 "/usr/include/stdio.h" 3 4 typedef _G_fpos_t fpos_t; # 161 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio_lim.h" 1 3 4 # 162 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) __attribute__ ((__nothrow__)); extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); # 206 "/usr/include/stdio.h" 3 4 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 224 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 249 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 263 "/usr/include/stdio.h" 3 4 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); # 292 "/usr/include/stdio.h" 3 4 # 303 "/usr/include/stdio.h" 3 4 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 316 "/usr/include/stdio.h" 3 4 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__)); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__)); extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); # 414 "/usr/include/stdio.h" 3 4 extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); # 445 "/usr/include/stdio.h" 3 4 extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") __attribute__ ((__warn_unused_result__)); extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") __attribute__ ((__warn_unused_result__)); extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__)) ; # 465 "/usr/include/stdio.h" 3 4 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); # 496 "/usr/include/stdio.h" 3 4 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); # 524 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 552 "/usr/include/stdio.h" 3 4 extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 563 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); # 596 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); # 658 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); # 730 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); extern void rewind (FILE *__stream); # 766 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); # 785 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); # 808 "/usr/include/stdio.h" 3 4 # 817 "/usr/include/stdio.h" 3 4 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void perror (__const char *__s); # 1 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 1 3 4 # 27 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern __const char *__const sys_errlist[]; # 847 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 866 "/usr/include/stdio.h" 3 4 extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); extern int pclose (FILE *__stream); extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); # 906 "/usr/include/stdio.h" 3 4 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); # 927 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 1 3 4 # 44 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 3 4 extern __inline int getchar (void) { return _IO_getc (stdin); } extern __inline int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } # 125 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 3 4 extern __inline int __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x10) != 0); } extern __inline int __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x20) != 0); } # 928 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 1 3 4 # 24 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 3 4 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) { return __builtin___sprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) { return __builtin___vsprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __ap); } extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) { return __builtin___snprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) { return __builtin___vsnprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __ap); } extern int __fprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, ...); extern int __printf_chk (int __flag, __const char *__restrict __format, ...); extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, __gnuc_va_list __ap); extern int __vprintf_chk (int __flag, __const char *__restrict __format, __gnuc_va_list __ap); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) { return __fprintf_chk (__stream, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int printf (__const char *__restrict __fmt, ...) { return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int vfprintf (FILE *__restrict __stream, __const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); } # 220 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 3 4 extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); extern char *__gets_warn (char *__str) __asm__ ("" "gets") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * gets (char *__str) { if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); return __gets_warn (__str); } extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__)); extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n) || __n <= 0) return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); } return __fgets_alias (__s, __n, __stream); } extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__)); extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { if (__builtin_object_size (__ptr, 0) != (size_t) -1) { if (!__builtin_constant_p (__size) || !__builtin_constant_p (__n) || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); if (__size * __n > __builtin_object_size (__ptr, 0)) return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); } return __fread_alias (__ptr, __size, __n, __stream); } # 319 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 3 4 extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { if (__builtin_object_size (__ptr, 0) != (size_t) -1) { if (!__builtin_constant_p (__size) || !__builtin_constant_p (__n) || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); if (__size * __n > __builtin_object_size (__ptr, 0)) return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); } if (__builtin_constant_p (__size) && __builtin_constant_p (__n) && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) && __size * __n <= 8) { size_t __cnt = __size * __n; char *__cptr = (char *) __ptr; if (__cnt == 0) return 0; for (; __cnt > 0; --__cnt) { int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); if (__c == (-1)) break; *__cptr++ = __c; } return (__cptr - (char *) __ptr) / __size; } return __fread_unlocked_alias (__ptr, __size, __n, __stream); } # 931 "/usr/include/stdio.h" 2 3 4 # 31 "../src/headers/pari.h" 2 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stdarg.h" 1 3 4 # 34 "../src/headers/pari.h" 2 # 1 "/usr/include/setjmp.h" 1 3 4 # 28 "/usr/include/setjmp.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/setjmp.h" 1 3 4 # 35 "/usr/include/arm-linux-gnueabihf/bits/setjmp.h" 3 4 typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); # 31 "/usr/include/setjmp.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 1 3 4 # 32 "/usr/include/setjmp.h" 2 3 4 struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; }; typedef struct __jmp_buf_tag jmp_buf[1]; extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); # 78 "/usr/include/setjmp.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; # 110 "/usr/include/setjmp.h" 3 4 extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 1 "/usr/include/arm-linux-gnueabihf/bits/setjmp2.h" 1 3 4 # 26 "/usr/include/arm-linux-gnueabihf/bits/setjmp2.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 118 "/usr/include/setjmp.h" 2 3 4 # 35 "../src/headers/pari.h" 2 # 1 "/usr/include/string.h" 1 3 4 # 29 "/usr/include/string.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 35 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 95 "/usr/include/string.h" 3 4 extern void *memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 126 "/usr/include/string.h" 3 4 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 typedef struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; typedef __locale_t locale_t; # 163 "/usr/include/string.h" 2 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 210 "/usr/include/string.h" 3 4 # 235 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 262 "/usr/include/string.h" 3 4 extern char *strrchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 281 "/usr/include/string.h" 3 4 extern size_t strcspn (__const char *__s, __const char *__reject) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 314 "/usr/include/string.h" 3 4 extern char *strpbrk (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 342 "/usr/include/string.h" 3 4 extern char *strstr (__const char *__haystack, __const char *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); # 397 "/usr/include/string.h" 3 4 extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); # 427 "/usr/include/string.h" 3 4 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 445 "/usr/include/string.h" 3 4 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 489 "/usr/include/string.h" 3 4 extern char *index (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 517 "/usr/include/string.h" 3 4 extern char *rindex (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 536 "/usr/include/string.h" 3 4 extern int strcasecmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 559 "/usr/include/string.h" 3 4 extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); # 634 "/usr/include/string.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/string.h" 1 3 4 # 635 "/usr/include/string.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 1 3 4 # 80 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; # 394 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern void *__rawmemchr (const void *__s, int __c); # 969 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); extern __inline size_t __strcspn_c1 (__const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) ++__result; return __result; } extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2); extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) ++__result; return __result; } extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3); extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) ++__result; return __result; } # 1045 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern __inline size_t __strspn_c1 (__const char *__s, int __accept); extern __inline size_t __strspn_c1 (__const char *__s, int __accept) { register size_t __result = 0; while (__s[__result] == __accept) ++__result; return __result; } extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2); extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2) ++__result; return __result; } extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) ++__result; return __result; } # 1121 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, int __accept2); extern __inline char * __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline char * __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } # 1172 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); extern __inline char * __strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == ((void *)0)) __s = *__nextp; while (*__s == __sep) ++__s; __result = ((void *)0); if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } } *__nextp = __s; return __result; } # 1204 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern char *__strsep_g (char **__stringp, __const char *__delim); # 1222 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern __inline char *__strsep_1c (char **__s, char __reject); extern __inline char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) *(*__s)++ = '\0'; return __retval; } extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); extern __inline char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3); extern __inline char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } # 1303 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); # 1322 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4 extern char *__strndup (__const char *__string, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); # 638 "/usr/include/string.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/string3.h" 1 3 4 # 23 "/usr/include/arm-linux-gnueabihf/bits/string3.h" 3 4 extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) ; # 48 "/usr/include/arm-linux-gnueabihf/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) { return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__)) memmove (void *__dest, __const void *__src, size_t __len) { return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } # 76 "/usr/include/arm-linux-gnueabihf/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len) { if (__builtin_constant_p (__len) && __len == 0 && (!__builtin_constant_p (__ch) || __ch != 0)) { __warn_memset_zero_len (); return __dest; } return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__)) bcopy (__const void *__src, void *__dest, size_t __len) { (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len) { (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src) { return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } # 117 "/usr/include/arm-linux-gnueabihf/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) { return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, size_t __destlen) __attribute__ ((__nothrow__)); extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__)) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n) { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); return __stpncpy_alias (__dest, __src, __n); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src) { return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) { return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } # 643 "/usr/include/string.h" 2 3 4 # 36 "../src/headers/pari.h" 2 # 1 "/usr/include/unistd.h" 1 3 4 # 28 "/usr/include/unistd.h" 3 4 # 203 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/posix_opt.h" 1 3 4 # 204 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 1 3 4 # 23 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 # 24 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 2 3 4 # 208 "/usr/include/unistd.h" 2 3 4 # 227 "/usr/include/unistd.h" 3 4 # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4 # 228 "/usr/include/unistd.h" 2 3 4 # 256 "/usr/include/unistd.h" 3 4 typedef __useconds_t useconds_t; # 268 "/usr/include/unistd.h" 3 4 typedef __intptr_t intptr_t; typedef __socklen_t socklen_t; # 288 "/usr/include/unistd.h" 3 4 extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 305 "/usr/include/unistd.h" 3 4 extern int faccessat (int __fd, __const char *__file, int __type, int __flag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); # 331 "/usr/include/unistd.h" 3 4 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__)); # 350 "/usr/include/unistd.h" 3 4 extern int close (int __fd); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); # 373 "/usr/include/unistd.h" 3 4 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __attribute__ ((__warn_unused_result__)); extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, __off_t __offset) __attribute__ ((__warn_unused_result__)); # 414 "/usr/include/unistd.h" 3 4 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 429 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__)); # 441 "/usr/include/unistd.h" 3 4 extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __attribute__ ((__nothrow__)); extern int usleep (__useconds_t __useconds); # 466 "/usr/include/unistd.h" 3 4 extern int pause (void); extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchownat (int __fd, __const char *__file, __uid_t __owner, __gid_t __group, int __flag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchdir (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 508 "/usr/include/unistd.h" 3 4 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 522 "/usr/include/unistd.h" 3 4 extern char *getwd (char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); extern int dup (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__)); # 540 "/usr/include/unistd.h" 3 4 extern char **__environ; extern int execve (__const char *__path, char *__const __argv[], char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int execv (__const char *__path, char *__const __argv[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int execle (__const char *__path, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int execl (__const char *__path, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int execvp (__const char *__file, char *__const __argv[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int execlp (__const char *__file, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); # 595 "/usr/include/unistd.h" 3 4 extern int nice (int __inc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void _exit (int __status) __attribute__ ((__noreturn__)); # 1 "/usr/include/arm-linux-gnueabihf/bits/confname.h" 1 3 4 # 26 "/usr/include/arm-linux-gnueabihf/bits/confname.h" 3 4 enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; # 607 "/usr/include/unistd.h" 2 3 4 extern long int pathconf (__const char *__path, int __name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__)); extern long int sysconf (int __name) __attribute__ ((__nothrow__)); extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__)); extern __pid_t getpid (void) __attribute__ ((__nothrow__)); extern __pid_t getppid (void) __attribute__ ((__nothrow__)); extern __pid_t getpgrp (void) __attribute__ ((__nothrow__)); # 643 "/usr/include/unistd.h" 3 4 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__)); # 669 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) __attribute__ ((__nothrow__)); # 686 "/usr/include/unistd.h" 3 4 extern __pid_t setsid (void) __attribute__ ((__nothrow__)); extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__)); extern __uid_t getuid (void) __attribute__ ((__nothrow__)); extern __uid_t geteuid (void) __attribute__ ((__nothrow__)); extern __gid_t getgid (void) __attribute__ ((__nothrow__)); extern __gid_t getegid (void) __attribute__ ((__nothrow__)); extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 719 "/usr/include/unistd.h" 3 4 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__)); extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__)); extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__)); extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__)); extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__)); extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__)); # 775 "/usr/include/unistd.h" 3 4 extern __pid_t fork (void) __attribute__ ((__nothrow__)); extern __pid_t vfork (void) __attribute__ ((__nothrow__)); extern char *ttyname (int __fd) __attribute__ ((__nothrow__)); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int isatty (int __fd) __attribute__ ((__nothrow__)); extern int ttyslot (void) __attribute__ ((__nothrow__)); extern int link (__const char *__from, __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int linkat (int __fromfd, __const char *__from, int __tofd, __const char *__to, int __flags) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); extern int symlink (__const char *__from, __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int symlinkat (__const char *__from, int __tofd, __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int unlinkat (int __fd, __const char *__name, int __flag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__)); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__)); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 890 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/getopt.h" 1 3 4 # 59 "/usr/include/getopt.h" 3 4 extern char *optarg; # 73 "/usr/include/getopt.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 152 "/usr/include/getopt.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __attribute__ ((__nothrow__)); # 891 "/usr/include/unistd.h" 2 3 4 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sethostname (__const char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int sethostid (long int __id) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int getdomainname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int setdomainname (__const char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int vhangup (void) __attribute__ ((__nothrow__)); extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int acct (__const char *__name) __attribute__ ((__nothrow__)); extern char *getusershell (void) __attribute__ ((__nothrow__)); extern void endusershell (void) __attribute__ ((__nothrow__)); extern void setusershell (void) __attribute__ ((__nothrow__)); extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); # 976 "/usr/include/unistd.h" 3 4 extern int fsync (int __fd); extern long int gethostid (void); extern void sync (void) __attribute__ ((__nothrow__)); extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int getdtablesize (void) __attribute__ ((__nothrow__)); # 1007 "/usr/include/unistd.h" 3 4 extern int truncate (__const char *__file, __off_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1029 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); # 1050 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__)); # 1071 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__)); # 1094 "/usr/include/unistd.h" 3 4 extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); # 1125 "/usr/include/unistd.h" 3 4 extern int fdatasync (int __fildes); # 1154 "/usr/include/unistd.h" 3 4 extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); # 1 "/usr/include/arm-linux-gnueabihf/bits/unistd.h" 1 3 4 # 24 "/usr/include/arm-linux-gnueabihf/bits/unistd.h" 3 4 extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __attribute__ ((__warn_unused_result__)); extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__)); extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t read (int __fd, void *__buf, size_t __nbytes) { if (__builtin_object_size (__buf, 0) != (size_t) -1) { if (!__builtin_constant_p (__nbytes)) return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); if (__nbytes > __builtin_object_size (__buf, 0)) return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); } return __read_alias (__fd, __buf, __nbytes); } # 124 "/usr/include/arm-linux-gnueabihf/bits/unistd.h" 3 4 extern ssize_t __readlink_chk (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t __attribute__ ((__nothrow__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); if ( __len > __builtin_object_size (__buf, 2 > 1)) return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); } return __readlink_alias (__path, __buf, __len); } extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t __attribute__ ((__nothrow__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); if (__len > __builtin_object_size (__buf, 2 > 1)) return __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); } return __readlinkat_alias (__fd, __path, __buf, __len); } extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__)) getcwd (char *__buf, size_t __size) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__size)) return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); if (__size > __builtin_object_size (__buf, 2 > 1)) return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); } return __getcwd_alias (__buf, __size); } extern char *__getwd_chk (char *__buf, size_t buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__)) getwd (char *__buf) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); return __getwd_warn (__buf); } extern size_t __confstr_chk (int __name, char *__buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__)); extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__)) ; extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__)) __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__)) confstr (int __name, char *__buf, size_t __len) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); if (__builtin_object_size (__buf, 2 > 1) < __len) return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); } return __confstr_alias (__name, __buf, __len); } extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) getgroups (int __size, __gid_t __list[]) { if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__size) || __size < 0) return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); } return __getgroups_alias (__size, __list); } extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) ttyname_r (int __fd, char *__buf, size_t __buflen) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __ttyname_r_alias (__fd, __buf, __buflen); } extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int getlogin_r (char *__buf, size_t __buflen) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __getlogin_r_alias (__buf, __buflen); } extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) gethostname (char *__buf, size_t __buflen) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __gethostname_alias (__buf, __buflen); } extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__)) getdomainname (char *__buf, size_t __buflen) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __getdomainname_alias (__buf, __buflen); } # 1161 "/usr/include/unistd.h" 2 3 4 # 38 "../src/headers/pari.h" 2 # 1 "/usr/include/math.h" 1 3 4 # 30 "/usr/include/math.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/huge_val.h" 1 3 4 # 35 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/huge_valf.h" 1 3 4 # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/huge_vall.h" 1 3 4 # 38 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/inf.h" 1 3 4 # 41 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/nan.h" 1 3 4 # 44 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/mathdef.h" 1 3 4 # 28 "/usr/include/arm-linux-gnueabihf/bits/mathdef.h" 3 4 typedef float float_t; typedef double double_t; # 48 "/usr/include/math.h" 2 3 4 # 71 "/usr/include/math.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__)); extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__)); extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__)); extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__)); extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__)); extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__)); extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__)); extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__)); extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__)); # 87 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__)); extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__)); extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__)); extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__)); extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__)); extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__)); extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); # 127 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__)); extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__)); extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__)); extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__)); extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__)); extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__)); extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__)); extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__)); extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__)); extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__)); extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__)); extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__)); extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__)); extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__)); extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__)); extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__)); extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__)); extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__)); extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__)); extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__)); extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__)); extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__)); extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__)); extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__)); extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__)); extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__)); extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern int __fpclassify (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __signbit (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__)); # 72 "/usr/include/math.h" 2 3 4 # 94 "/usr/include/math.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__)); extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__)); extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__)); extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__)); extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__)); extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__)); extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__)); extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__)); extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__)); # 87 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__)); extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__)); extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__)); extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__)); extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__)); extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__)); extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); # 127 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__)); extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__)); extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__)); extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__)); extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__)); extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__)); extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__)); extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__)); extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__)); extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__)); extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__)); extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__)); extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__)); extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__)); extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__)); extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__)); extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__)); extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__)); extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__)); extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__)); extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__)); extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__)); extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__)); extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__)); extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__)); extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __signbitf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__)); # 95 "/usr/include/math.h" 2 3 4 # 145 "/usr/include/math.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) __asm__ ("" "acos") __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __asm__ ("" "__acos") __attribute__ ((__nothrow__)); extern long double asinl (long double __x) __asm__ ("" "asin") __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __asm__ ("" "__asin") __attribute__ ((__nothrow__)); extern long double atanl (long double __x) __asm__ ("" "atan") __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __asm__ ("" "__atan") __attribute__ ((__nothrow__)); extern long double atan2l (long double __y, long double __x) __asm__ ("" "atan2") __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __asm__ ("" "__atan2") __attribute__ ((__nothrow__)); extern long double cosl (long double __x) __asm__ ("" "cos") __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __asm__ ("" "__cos") __attribute__ ((__nothrow__)); extern long double sinl (long double __x) __asm__ ("" "sin") __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __asm__ ("" "__sin") __attribute__ ((__nothrow__)); extern long double tanl (long double __x) __asm__ ("" "tan") __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __asm__ ("" "__tan") __attribute__ ((__nothrow__)); extern long double coshl (long double __x) __asm__ ("" "cosh") __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __asm__ ("" "__cosh") __attribute__ ((__nothrow__)); extern long double sinhl (long double __x) __asm__ ("" "sinh") __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __asm__ ("" "__sinh") __attribute__ ((__nothrow__)); extern long double tanhl (long double __x) __asm__ ("" "tanh") __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __asm__ ("" "__tanh") __attribute__ ((__nothrow__)); # 87 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern long double acoshl (long double __x) __asm__ ("" "acosh") __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __asm__ ("" "__acosh") __attribute__ ((__nothrow__)); extern long double asinhl (long double __x) __asm__ ("" "asinh") __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __asm__ ("" "__asinh") __attribute__ ((__nothrow__)); extern long double atanhl (long double __x) __asm__ ("" "atanh") __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __asm__ ("" "__atanh") __attribute__ ((__nothrow__)); extern long double expl (long double __x) __asm__ ("" "exp") __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __asm__ ("" "__exp") __attribute__ ((__nothrow__)); extern long double frexpl (long double __x, int *__exponent) __asm__ ("" "frexp") __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __asm__ ("" "__frexp") __attribute__ ((__nothrow__)); extern long double ldexpl (long double __x, int __exponent) __asm__ ("" "ldexp") __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __asm__ ("" "__ldexp") __attribute__ ((__nothrow__)); extern long double logl (long double __x) __asm__ ("" "log") __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __asm__ ("" "__log") __attribute__ ((__nothrow__)); extern long double log10l (long double __x) __asm__ ("" "log10") __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __asm__ ("" "__log10") __attribute__ ((__nothrow__)); extern long double modfl (long double __x, long double *__iptr) __asm__ ("" "modf") __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __asm__ ("" "__modf") __attribute__ ((__nothrow__)); # 127 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 extern long double expm1l (long double __x) __asm__ ("" "expm1") __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __asm__ ("" "__expm1") __attribute__ ((__nothrow__)); extern long double log1pl (long double __x) __asm__ ("" "log1p") __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __asm__ ("" "__log1p") __attribute__ ((__nothrow__)); extern long double logbl (long double __x) __asm__ ("" "logb") __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __asm__ ("" "__logb") __attribute__ ((__nothrow__)); extern long double exp2l (long double __x) __asm__ ("" "exp2") __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __asm__ ("" "__exp2") __attribute__ ((__nothrow__)); extern long double log2l (long double __x) __asm__ ("" "log2") __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __asm__ ("" "__log2") __attribute__ ((__nothrow__)); extern long double powl (long double __x, long double __y) __asm__ ("" "pow") __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __asm__ ("" "__pow") __attribute__ ((__nothrow__)); extern long double sqrtl (long double __x) __asm__ ("" "sqrt") __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __asm__ ("" "__sqrt") __attribute__ ((__nothrow__)); extern long double hypotl (long double __x, long double __y) __asm__ ("" "hypot") __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __asm__ ("" "__hypot") __attribute__ ((__nothrow__)); extern long double cbrtl (long double __x) __asm__ ("" "cbrt") __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __asm__ ("" "__cbrt") __attribute__ ((__nothrow__)); extern long double ceill (long double __x) __asm__ ("" "ceil") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __asm__ ("" "__ceil") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double fabsl (long double __x) __asm__ ("" "fabs") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __asm__ ("" "__fabs") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double floorl (long double __x) __asm__ ("" "floor") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __asm__ ("" "__floor") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) __asm__ ("" "fmod") __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __asm__ ("" "__fmod") __attribute__ ((__nothrow__)); extern int __isinfl (long double __value) __asm__ ("" "__isinf") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __finitel (long double __value) __asm__ ("" "__finite") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int isinfl (long double __value) __asm__ ("" "isinf") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int finitel (long double __value) __asm__ ("" "finite") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) __asm__ ("" "drem") __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __asm__ ("" "__drem") __attribute__ ((__nothrow__)); extern long double significandl (long double __x) __asm__ ("" "significand") __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __asm__ ("" "__significand") __attribute__ ((__nothrow__)); extern long double copysignl (long double __x, long double __y) __asm__ ("" "copysign") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __asm__ ("" "__copysign") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double nanl (__const char *__tagb) __asm__ ("" "nan") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __asm__ ("" "__nan") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __isnanl (long double __value) __asm__ ("" "__isnan") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int isnanl (long double __value) __asm__ ("" "isnan") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double j0l (long double) __asm__ ("" "j0") __attribute__ ((__nothrow__)); extern long double __j0l (long double) __asm__ ("" "__j0") __attribute__ ((__nothrow__)); extern long double j1l (long double) __asm__ ("" "j1") __attribute__ ((__nothrow__)); extern long double __j1l (long double) __asm__ ("" "__j1") __attribute__ ((__nothrow__)); extern long double jnl (int, long double) __asm__ ("" "jn") __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __asm__ ("" "__jn") __attribute__ ((__nothrow__)); extern long double y0l (long double) __asm__ ("" "y0") __attribute__ ((__nothrow__)); extern long double __y0l (long double) __asm__ ("" "__y0") __attribute__ ((__nothrow__)); extern long double y1l (long double) __asm__ ("" "y1") __attribute__ ((__nothrow__)); extern long double __y1l (long double) __asm__ ("" "__y1") __attribute__ ((__nothrow__)); extern long double ynl (int, long double) __asm__ ("" "yn") __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __asm__ ("" "__yn") __attribute__ ((__nothrow__)); extern long double erfl (long double) __asm__ ("" "erf") __attribute__ ((__nothrow__)); extern long double __erfl (long double) __asm__ ("" "__erf") __attribute__ ((__nothrow__)); extern long double erfcl (long double) __asm__ ("" "erfc") __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __asm__ ("" "__erfc") __attribute__ ((__nothrow__)); extern long double lgammal (long double) __asm__ ("" "lgamma") __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __asm__ ("" "__lgamma") __attribute__ ((__nothrow__)); extern long double tgammal (long double) __asm__ ("" "tgamma") __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __asm__ ("" "__tgamma") __attribute__ ((__nothrow__)); extern long double gammal (long double) __asm__ ("" "gamma") __attribute__ ((__nothrow__)); extern long double __gammal (long double) __asm__ ("" "__gamma") __attribute__ ((__nothrow__)); extern long double lgammal_r (long double, int *__signgamp) __asm__ ("" "lgamma_r") __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __asm__ ("" "__lgamma_r") __attribute__ ((__nothrow__)); extern long double rintl (long double __x) __asm__ ("" "rint") __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __asm__ ("" "__rint") __attribute__ ((__nothrow__)); extern long double nextafterl (long double __x, long double __y) __asm__ ("" "nextafter") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __asm__ ("" "__nextafter") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) __asm__ ("" "nexttoward") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __asm__ ("" "__nexttoward") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) __asm__ ("" "remainder") __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __asm__ ("" "__remainder") __attribute__ ((__nothrow__)); extern long double scalbnl (long double __x, int __n) __asm__ ("" "scalbn") __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __asm__ ("" "__scalbn") __attribute__ ((__nothrow__)); extern int ilogbl (long double __x) __asm__ ("" "ilogb") __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __asm__ ("" "__ilogb") __attribute__ ((__nothrow__)); extern long double scalblnl (long double __x, long int __n) __asm__ ("" "scalbln") __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __asm__ ("" "__scalbln") __attribute__ ((__nothrow__)); extern long double nearbyintl (long double __x) __asm__ ("" "nearbyint") __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __asm__ ("" "__nearbyint") __attribute__ ((__nothrow__)); extern long double roundl (long double __x) __asm__ ("" "round") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __asm__ ("" "__round") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double truncl (long double __x) __asm__ ("" "trunc") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __asm__ ("" "__trunc") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) __asm__ ("" "remquo") __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __asm__ ("" "__remquo") __attribute__ ((__nothrow__)); extern long int lrintl (long double __x) __asm__ ("" "lrint") __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __asm__ ("" "__lrint") __attribute__ ((__nothrow__)); extern long long int llrintl (long double __x) __asm__ ("" "llrint") __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __asm__ ("" "__llrint") __attribute__ ((__nothrow__)); extern long int lroundl (long double __x) __asm__ ("" "lround") __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __asm__ ("" "__lround") __attribute__ ((__nothrow__)); extern long long int llroundl (long double __x) __asm__ ("" "llround") __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __asm__ ("" "__llround") __attribute__ ((__nothrow__)); extern long double fdiml (long double __x, long double __y) __asm__ ("" "fdim") __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __asm__ ("" "__fdim") __attribute__ ((__nothrow__)); extern long double fmaxl (long double __x, long double __y) __asm__ ("" "fmax") __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __asm__ ("" "__fmax") __attribute__ ((__nothrow__)); extern long double fminl (long double __x, long double __y) __asm__ ("" "fmin") __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __asm__ ("" "__fmin") __attribute__ ((__nothrow__)); extern int __fpclassifyl (long double __value) __asm__ ("" "__fpclassify") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int __signbitl (long double __value) __asm__ ("" "__signbit") __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) __asm__ ("" "fma") __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __asm__ ("" "__fma") __attribute__ ((__nothrow__)); extern long double scalbl (long double __x, long double __n) __asm__ ("" "scalb") __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __asm__ ("" "__scalb") __attribute__ ((__nothrow__)); # 146 "/usr/include/math.h" 2 3 4 # 161 "/usr/include/math.h" 3 4 extern int signgam; # 202 "/usr/include/math.h" 3 4 enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL }; # 295 "/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 320 "/usr/include/math.h" 3 4 struct exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct exception *__exc); # 420 "/usr/include/math.h" 3 4 # 1 "/usr/include/arm-linux-gnueabihf/bits/mathinline.h" 1 3 4 # 421 "/usr/include/math.h" 2 3 4 # 476 "/usr/include/math.h" 3 4 # 42 "../src/headers/pari.h" 2 # 1 "/usr/include/memory.h" 1 3 4 # 43 "../src/headers/pari.h" 2 # 1 "/usr/include/ctype.h" 1 3 4 # 30 "/usr/include/ctype.h" 3 4 # 48 "/usr/include/ctype.h" 3 4 enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 81 "/usr/include/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) __attribute__ ((__nothrow__)) __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__nothrow__)) __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__nothrow__)) __attribute__ ((__const)); # 96 "/usr/include/ctype.h" 3 4 extern int isalnum (int) __attribute__ ((__nothrow__)); extern int isalpha (int) __attribute__ ((__nothrow__)); extern int iscntrl (int) __attribute__ ((__nothrow__)); extern int isdigit (int) __attribute__ ((__nothrow__)); extern int islower (int) __attribute__ ((__nothrow__)); extern int isgraph (int) __attribute__ ((__nothrow__)); extern int isprint (int) __attribute__ ((__nothrow__)); extern int ispunct (int) __attribute__ ((__nothrow__)); extern int isspace (int) __attribute__ ((__nothrow__)); extern int isupper (int) __attribute__ ((__nothrow__)); extern int isxdigit (int) __attribute__ ((__nothrow__)); extern int tolower (int __c) __attribute__ ((__nothrow__)); extern int toupper (int __c) __attribute__ ((__nothrow__)); extern int isblank (int) __attribute__ ((__nothrow__)); # 142 "/usr/include/ctype.h" 3 4 extern int isascii (int __c) __attribute__ ((__nothrow__)); extern int toascii (int __c) __attribute__ ((__nothrow__)); extern int _toupper (int) __attribute__ ((__nothrow__)); extern int _tolower (int) __attribute__ ((__nothrow__)); # 190 "/usr/include/ctype.h" 3 4 extern __inline int __attribute__ ((__nothrow__)) tolower (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } extern __inline int __attribute__ ((__nothrow__)) toupper (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } # 247 "/usr/include/ctype.h" 3 4 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); # 323 "/usr/include/ctype.h" 3 4 # 44 "../src/headers/pari.h" 2 # 1 "../src/headers/parisys.h" 1 # 49 "../src/headers/pari.h" 2 # 1 "../src/headers/parigen.h" 1 # 18 "../src/headers/parigen.h" typedef long *GEN; typedef unsigned long pari_ulong; # 143 "../src/headers/parigen.h" enum { t_INT = 1, t_REAL = 2, t_INTMOD = 3, t_FRAC = 4, t_FFELT = 5, t_COMPLEX= 6, t_PADIC = 7, t_QUAD = 8, t_POLMOD = 9, t_POL = 10, t_SER = 11, t_RFRAC = 13, t_QFR = 15, t_QFI = 16, t_VEC = 17, t_COL = 18, t_MAT = 19, t_LIST = 20, t_STR = 21, t_VECSMALL= 22, t_CLOSURE = 23 }; # 50 "../src/headers/pari.h" 2 # 1 "../src/headers/paricast.h" 1 # 51 "../src/headers/pari.h" 2 # 1 "../src/headers/paristio.h" 1 # 18 "../src/headers/paristio.h" typedef struct { long s, us; } pari_timer; typedef unsigned char *byteptr; typedef pari_ulong pari_sp; typedef struct GENbin { size_t len; GEN x; GEN base; int canon; } GENbin; struct pari_mainstack { pari_sp top, bot, avma; size_t memused; }; struct pari_thread { struct pari_mainstack st; GEN data; }; typedef struct pariFILE { FILE *file; int type; const char *name; struct pariFILE* prev; struct pariFILE* next; } pariFILE; enum { mf_IN = 1, mf_PIPE = 2, mf_FALSE = 4, mf_OUT = 8, mf_PERM = 16 }; typedef struct entree { const char *name; pari_ulong valence; void *value; long menu; const char *code; const char *help; void *pvalue; long arity; struct entree *next; } entree; struct pari_parsestate { long node; int once; long discarded; const char *lex_start, *unused_chars; GEN lasterror; }; struct pari_compilestate { long opcode, operand, data, localvars, frames, dbginfo; long offset; const char *dbgstart; }; struct pari_evalstate { pari_sp avma; long sp; long rp; long var; long lvars; long trace; struct pari_compilestate comp; }; struct gp_context { long listloc; long err_catch; struct pari_evalstate eval; struct pari_parsestate parse; pariFILE *file; void *err_data; }; typedef struct PariOUT { void (*putch)(char); void (*puts)(const char*); void (*flush)(void); } PariOUT; typedef struct hashentry { void *key, *val; pari_ulong hash; struct hashentry *next; } hashentry; typedef struct hashtable { pari_ulong len; hashentry **table; pari_ulong nb, maxnb; pari_ulong pindex; pari_ulong (*hash) (void *k); int (*eq) (void *k1, void *k2); } hashtable; typedef struct { long offset; long n; long alloc; size_t size; } pari_stack; extern PariOUT *pariOut, *pariErr; extern FILE *pari_outfile, *pari_logfile, *pari_infile, *pari_errfile; extern pari_ulong logstyle; enum logstyles { logstyle_none, logstyle_plain, logstyle_color, logstyle_TeX }; enum { c_ERR, c_HIST, c_PROMPT, c_INPUT, c_OUTPUT, c_HELP, c_TIME, c_LAST, c_NONE = 0xffffUL }; enum { TEXSTYLE_PAREN=2, TEXSTYLE_BREAK=4 }; extern pari_sp avma, bot, top; extern size_t memused; extern byteptr diffptr; extern const char *errmessage[]; extern char *current_psfile, *pari_datadir; # 52 "../src/headers/pari.h" 2 # 1 "../src/headers/paricom.h" 1 # 53 "../src/headers/paricom.h" extern const long CATCH_ALL; extern const double LOG2, LOG10_2, LOG2_10; extern int new_galois_format, factor_add_primes, factor_proven; extern pari_ulong DEBUGFILES, DEBUGLEVEL, DEBUGMEM, precdl; extern GEN bernzone; extern GEN primetab; extern GEN gen_m1,gen_1,gen_2,gen_m2,ghalf,gen_0,gnil; extern volatile int PARI_SIGINT_block, PARI_SIGINT_pending; extern const long lontyp[]; extern void* global_err_data; extern void (*cb_pari_ask_confirm)(const char *); extern int (*cb_pari_whatnow)(PariOUT *out, const char *, int); extern void (*cb_pari_sigint)(void); extern int (*cb_pari_handle_exception)(long); extern void (*cb_pari_err_recover)(long); enum manage_var_t { manage_var_create, manage_var_delete, manage_var_init, manage_var_next, manage_var_max_avail, manage_var_pop }; enum { INIT_JMPm = 1, INIT_SIGm = 2, INIT_DFTm = 4 }; # 53 "../src/headers/pari.h" 2 # 1 "../src/headers/pariold.h" 1 # 54 "../src/headers/pari.h" 2 # 1 "../src/headers/parierr.h" 1 # 16 "../src/headers/parierr.h" enum { syntaxer = 1, bugparier, alarmer, openfiler, talker, flagerr, impl, archer, notfuncer, precer, typeer, consister, user, errpile, overflower, matinv1, mattype1, arither1, primer1, invmoder, constpoler, notpoler, redpoler, zeropoler, operi, operf, gdiver, memer, negexper, sqrter5, noer }; enum { warner, warnprec, warnfile, warnmem }; # 55 "../src/headers/pari.h" 2 # 1 "../src/headers/paridecl.h" 1 # 21 "../src/headers/paridecl.h" # 1 "../src/headers/parinf.h" 1 # 17 "../src/headers/parinf.h" enum { typ_NULL = 0, typ_POL, typ_Q, typ_NF, typ_BNF, typ_BNR, typ_ELL, typ_QUA, typ_GAL, typ_BID, typ_RNF }; enum { id_PRINCIPAL = 0, id_PRIME, id_MAT }; typedef struct { GEN x; GEN bas; long r1; GEN dK; GEN index; GEN lead; GEN dx; GEN basden; } nfbasic_t; typedef struct { GEN dT; GEN dK; GEN index; GEN dTP, dTE; GEN dKP, dKE; GEN basis; } nfmaxord_t; typedef struct { GEN x; GEN ro; long r1; GEN basden; long prec; long extraprec; GEN M; GEN G; } nffp_t; struct bb_group { GEN (*mul)(void *E, GEN, GEN); GEN (*pow)(void *E, GEN, GEN); GEN (*rand)(void *E); pari_ulong (*hash)(GEN); int (*cmp)(GEN, GEN); int (*equal1)(GEN); }; struct qfr_data { GEN D, sqrtD, isqrtD; }; enum { nf_ORIG = 1, nf_GEN = 1, nf_ABSOLUTE = 2, nf_FORCE = 2, nf_ALL = 4, nf_GENMAT = 4, nf_INIT = 4, nf_RAW = 8, nf_RED = 8, nf_PARTIALFACT = 16, nf_ROUND2 = 64, nf_ADDZK = 256, nf_GEN_IF_PRINCIPAL = 512 }; enum { rnf_REL = 1, rnf_COND = 2 }; enum { LLL_KER = 1, LLL_IM = 2, LLL_ALL = 4, LLL_GRAM = 0x100, LLL_KEEP_FIRST = 0x200, LLL_INPLACE = 0x400 }; enum { hnf_MODID = 1, hnf_PART = 2, hnf_CENTER = 4 }; enum { min_ALL = 0, min_FIRST = 1, min_PERF = 2, min_VECSMALL = 3, min_VECSMALL2 = 4 }; typedef struct FP_chk_fun { GEN (*f)(void *,GEN); GEN (*f_init)(struct FP_chk_fun*,GEN,GEN); GEN (*f_post)(struct FP_chk_fun*,GEN,GEN); void *data; long skipfirst; } FP_chk_fun; typedef struct { GEN lists; GEN ind; GEN P, e; GEN archp; long n; GEN U; } zlog_S; GEN fincke_pohst(GEN a,GEN BOUND,long stockmax,long PREC, FP_chk_fun *CHECK); void remake_GM(GEN nf, nffp_t *F, long prec); GEN nfbasic_to_nf(nfbasic_t *T, GEN ro, long prec); void init_zlog_bid(zlog_S *S, GEN bid); GEN log_gen_arch(zlog_S *S, long index); GEN log_gen_pr(zlog_S *S, long index, GEN nf, long e); GEN zlog(GEN nf, GEN a, GEN sgn, zlog_S *S); GEN poltobasis(GEN nf,GEN x); GEN coltoalg(GEN nf,GEN x); GEN archstar_full_rk(GEN x, GEN bas, GEN v, GEN gen); GEN check_and_build_obj(GEN S, long tag, GEN (*build)(GEN)); GEN check_and_build_cycgen(GEN bnf); double check_bach(double cbach, double B); GEN checkbid_i(GEN bid); GEN checkbnf_i(GEN bnf); GEN checknf_i(GEN nf); GEN pow_ei_mod_p(GEN nf, long I, GEN n, GEN p); GEN eltabstorel(GEN x, GEN T, GEN pol, GEN k); GEN eltreltoabs(GEN rnfeq, GEN x); GEN galoisbig(GEN x, long prec); GEN get_arch_real(GEN nf,GEN x,GEN *emb,long prec); GEN get_bas_den(GEN bas); void nf_set_multable(GEN nf, GEN bas, GEN basden); GEN get_nfindex(GEN bas); GEN get_proj_modT(GEN basis, GEN T, GEN p); GEN get_roots(GEN x,long r1,long prec); GEN get_theta_abstorel(GEN T, GEN pol, GEN k); GEN idealsqrtn(GEN nf, GEN x, GEN gn, int strict); GEN init_unif_mod_fZ(GEN L); GEN init_units(GEN BNF); long int_elt_val(GEN nf, GEN x, GEN p, GEN bp, GEN *t); GEN make_integral(GEN nf, GEN L0, GEN f, GEN listpr); GEN maxord_i(GEN p, GEN f, long mf, GEN w, long flag); GEN nf_deg1_prime(GEN nf); GEN nfpol_to_Flx(GEN nf, GEN pol, pari_ulong *ptp); GEN nfroots_split(GEN nf, GEN pol); GEN norm_by_embed(long r1, GEN x); GEN pidealprimeinv(GEN nf, GEN x); GEN primedec_apply_kummer(GEN nf,GEN pol,long e,GEN p); GEN prodid(GEN nf, GEN I); GEN rnfallbase(GEN nf, GEN *ppol, GEN *pD, GEN *pd, GEN *pfi); GEN special_anti_uniformizer(GEN nf, GEN pr); GEN subgroupcondlist(GEN cyc, GEN bound, GEN listKer); GEN T2_from_embed_norm(GEN x, long r1); void testprimes(GEN bnf, GEN bound); GEN to_Fp_simple(GEN nf, GEN x, GEN ffproj); GEN unif_mod_fZ(GEN pr, GEN F); GEN unnf_minus_x(GEN x); GEN ideallog_sgn(GEN nf, GEN x, GEN sgn, GEN bid); GEN zlog_units(GEN nf, GEN U, GEN sgnU, GEN bid); GEN zlog_units_noarch(GEN nf, GEN U, GEN bid); GEN zeta_get_limx(long r1, long r2, long bit); long zeta_get_i0(long r1, long r2, long bit, GEN limx); long zeta_get_N0(GEN C, GEN limx); # 22 "../src/headers/paridecl.h" 2 GEN bernvec(long nomb); GEN buchimag(GEN D, GEN c1, GEN c2, GEN gCO); GEN buchreal(GEN D, GEN gsens, GEN c1, GEN c2, GEN gRELSUP, long prec); GEN zidealstar(GEN nf, GEN x); GEN zidealstarinit(GEN nf, GEN x); GEN zidealstarinitgen(GEN nf, GEN x); GEN rootmod(GEN f, GEN p); GEN rootmod2(GEN f, GEN p); GEN factmod(GEN f, GEN p); GEN simplefactmod(GEN f, GEN p); GEN listcreate(void); void listkill(GEN list); GEN discrayabs(GEN bnr,GEN subgroup); GEN discrayabscond(GEN bnr,GEN subgroup); GEN discrayrel(GEN bnr,GEN subgroup); GEN discrayrelcond(GEN bnr,GEN subgroup); GEN isprincipalforce(GEN bnf,GEN x); GEN isprincipalgen(GEN bnf, GEN x); GEN isprincipalgenforce(GEN bnf,GEN x); GEN F2c_to_ZC(GEN x); GEN F2m_to_ZM(GEN z); void F2v_add_inplace(GEN x, GEN y); GEN F2x_1_add(GEN y); GEN F2x_add(GEN x, GEN y); long F2x_degree(GEN x); GEN F2x_deriv(GEN x); GEN F2x_divrem(GEN x, GEN y, GEN *pr); GEN F2x_extgcd(GEN a, GEN b, GEN *ptu, GEN *ptv); GEN F2x_gcd(GEN a, GEN b); GEN F2x_mul(GEN x, GEN y); GEN F2x_rem(GEN x, GEN y); GEN F2x_sqr(GEN x); GEN F2x_to_F2v(GEN x, long n); GEN F2x_to_Flx(GEN x); GEN F2x_to_ZX(GEN x); GEN F2xC_to_ZXC(GEN x); GEN F2xV_to_F2m(GEN v, long n); GEN F2xq_conjvec(GEN x, GEN T); GEN F2xq_div(GEN x,GEN y,GEN T); GEN F2xq_inv(GEN x, GEN T); GEN F2xq_invsafe(GEN x, GEN T); GEN F2xq_log(GEN a, GEN g, GEN ord, GEN T); GEN F2xq_matrix_pow(GEN y, long n, long m, GEN P); GEN F2xq_mul(GEN x, GEN y, GEN pol); GEN F2xq_order(GEN a, GEN ord, GEN T); GEN F2xq_pow(GEN x, GEN n, GEN pol); GEN F2xq_powers(GEN x, long l, GEN T); GEN F2xq_sqr(GEN x,GEN pol); GEN F2xq_sqrt(GEN a, GEN T); GEN F2xq_sqrtn(GEN a, GEN n, GEN T, GEN *zeta); pari_ulong F2xq_trace(GEN x, GEN T); GEN Flm_to_F2m(GEN x); GEN Flv_to_F2v(GEN x); GEN Flx_to_F2x(GEN x); GEN Z_to_F2x(GEN x, long sv); GEN ZM_to_F2m(GEN x); GEN ZV_to_F2v(GEN x); GEN ZX_to_F2x(GEN x); GEN ZXX_to_F2xX(GEN B, long v); GEN gener_F2xq(GEN T, GEN *po); GEN random_F2x(long d, long vs); GEN Fl_to_Flx(pari_ulong x, long sv); GEN Flc_to_ZC(GEN z); GEN Flm_to_FlxV(GEN x, long sv); GEN Flm_to_FlxX(GEN x, long v,long w); GEN Flm_to_ZM(GEN z); GEN Flv_to_Flx(GEN x, long vs); GEN Flv_to_ZV(GEN z); GEN Flv_polint(GEN xa, GEN ya, pari_ulong p, long vs); GEN Flv_roots_to_pol(GEN a, pari_ulong p, long vs); GEN Fly_to_FlxY(GEN B, long v); GEN Flx_Fl_add(GEN y, pari_ulong x, pari_ulong p); GEN Flx_Fl_mul(GEN y, pari_ulong x, pari_ulong p); GEN Flx_Fl_mul_to_monic(GEN y, pari_ulong x, pari_ulong p); GEN Flx_add(GEN x, GEN y, pari_ulong p); GEN Flx_deflate(GEN x0, long d); GEN Flx_deriv(GEN z, pari_ulong p); GEN Flx_div_by_X_x(GEN a, pari_ulong x, pari_ulong p, pari_ulong *rem); GEN Flx_divrem(GEN x, GEN y, pari_ulong p, GEN *pr); pari_ulong Flx_eval(GEN x, pari_ulong y, pari_ulong p); GEN Flx_extgcd(GEN a, GEN b, pari_ulong p, GEN *ptu, GEN *ptv); pari_ulong Flx_extresultant(GEN a, GEN b, pari_ulong p, GEN *ptU, GEN *ptV); GEN Flx_gcd(GEN a, GEN b, pari_ulong p); GEN Flx_halfgcd(GEN a, GEN b, pari_ulong p); GEN Flx_inflate(GEN x0, long d); GEN Flx_invMontgomery(GEN T, pari_ulong p); int Flx_is_squarefree(GEN z, pari_ulong p); GEN Flx_mul(GEN x, GEN y, pari_ulong p); GEN Flx_neg(GEN x, pari_ulong p); GEN Flx_neg_inplace(GEN x, pari_ulong p); GEN Flx_normalize(GEN z, pari_ulong p); GEN Flx_pow(GEN x, long n, pari_ulong p); GEN Flx_recip(GEN x); GEN Flx_red(GEN z, pari_ulong p); GEN Flx_rem_Montgomery(GEN x, GEN mg, GEN T, pari_ulong p); GEN Flx_rem(GEN x, GEN y, pari_ulong p); GEN Flx_renormalize(GEN x, long l); pari_ulong Flx_resultant(GEN a, GEN b, pari_ulong p); GEN Flx_shift(GEN a, long n); GEN Flx_sqr(GEN x, pari_ulong p); GEN Flx_sub(GEN x, GEN y, pari_ulong p); GEN Flx_to_Flv(GEN x, long N); GEN Flx_to_ZX(GEN z); GEN Flx_to_ZX_inplace(GEN z); long Flx_val(GEN x); long Flx_valrem(GEN x, GEN *Z); GEN FlxC_to_ZXC(GEN x); GEN FlxM_to_ZXM(GEN z); GEN FlxV_Flc_mul(GEN V, GEN W, pari_ulong p); GEN FlxV_to_Flm(GEN v, long n); GEN FlxX_add(GEN P, GEN Q, pari_ulong p); GEN FlxX_renormalize(GEN x, long lx); GEN FlxX_shift(GEN a, long n); GEN FlxX_to_Flm(GEN v, long n); GEN FlxX_to_ZXX(GEN B); GEN FlxY_Flx_div(GEN x, GEN y, pari_ulong p); GEN FlxYqQ_pow(GEN x, GEN n, GEN S, GEN T, pari_ulong p); GEN Flxq_charpoly(GEN x, GEN T, pari_ulong p); GEN Flxq_conjvec(GEN x, GEN T, pari_ulong p); GEN Flxq_div(GEN x, GEN y, GEN T, pari_ulong p); GEN Flxq_inv(GEN x,GEN T,pari_ulong p); GEN Flxq_invsafe(GEN x, GEN T, pari_ulong p); int Flxq_issquare(GEN x, GEN T, pari_ulong p); GEN Flxq_log(GEN a, GEN g, GEN ord, GEN T, pari_ulong p); GEN Flxq_matrix_pow(GEN y, long n, long m, GEN P, pari_ulong l); GEN Flxq_minpoly(GEN x, GEN T, pari_ulong p); GEN Flxq_mul(GEN x, GEN y, GEN T, pari_ulong p); pari_ulong Flxq_norm(GEN x, GEN T, pari_ulong p); GEN Flxq_order(GEN a, GEN ord, GEN T, pari_ulong p); GEN Flxq_pow(GEN x, GEN n, GEN T, pari_ulong p); GEN Flxq_powers(GEN x, long l, GEN T, pari_ulong p); GEN Flxq_sqr(GEN y,GEN T,pari_ulong p); GEN Flxq_sqrtn(GEN a, GEN n, GEN T, pari_ulong p, GEN *zetan); pari_ulong Flxq_trace(GEN x, GEN T, pari_ulong p); GEN FlxqV_roots_to_pol(GEN V, GEN T, pari_ulong p, long v); GEN FlxqX_Flxq_mul(GEN P, GEN U, GEN T, pari_ulong p); GEN FlxqX_Flxq_mul_to_monic(GEN P, GEN U, GEN T, pari_ulong p); GEN FlxqX_divrem(GEN x, GEN y, GEN T, pari_ulong p, GEN *pr); GEN FlxqX_extgcd(GEN a, GEN b, GEN T, pari_ulong p, GEN *ptu, GEN *ptv); GEN FlxqX_gcd(GEN P, GEN Q, GEN T, pari_ulong p); GEN FlxqX_mul(GEN x, GEN y, GEN T, pari_ulong p); GEN FlxqX_normalize(GEN z, GEN T, pari_ulong p); GEN FlxqX_red(GEN z, GEN T, pari_ulong p); GEN FlxqX_safegcd(GEN P, GEN Q, GEN T, pari_ulong p); GEN FlxqX_sqr(GEN x, GEN T, pari_ulong p); GEN FlxqXQ_inv(GEN x, GEN S, GEN T, pari_ulong p); GEN FlxqXQ_invsafe(GEN x, GEN S, GEN T, pari_ulong p); GEN FlxqXQ_mul(GEN x, GEN y, GEN S, GEN T, pari_ulong p); GEN FlxqXQ_pow(GEN x, GEN n, GEN S, GEN T, pari_ulong p); GEN FlxqXQ_sqr(GEN x, GEN S, GEN T, pari_ulong p); GEN FlxqXV_prod(GEN V, GEN T, pari_ulong p); GEN RgX_to_Flx(GEN x, pari_ulong p); GEN Z_to_Flx(GEN x, pari_ulong p, long v); GEN ZX_to_Flx(GEN x, pari_ulong p); GEN ZXV_to_FlxV(GEN v, pari_ulong p); GEN ZXX_to_FlxX(GEN B, pari_ulong p, long v); GEN ZXXV_to_FlxXV(GEN V, pari_ulong p, long v); GEN gener_Flxq(GEN T, pari_ulong p, GEN *o); GEN pol1_FlxX(long v, long sv); GEN random_Flx(long d1, long v, pari_ulong p); GEN FpE_add(GEN P, GEN Q, GEN a4, GEN p); GEN FpE_dbl(GEN P, GEN a4, GEN p); GEN FpE_neg(GEN P, GEN p); GEN FpE_order(GEN z, GEN o, GEN a4, GEN p); GEN FpE_mul(GEN P, GEN n, GEN a4, GEN p); GEN FpE_sub(GEN P, GEN Q, GEN a4, GEN p); GEN FpE_tatepairing(GEN t, GEN s, GEN m, GEN a4, GEN p); GEN FpE_weilpairing(GEN t, GEN s, GEN m, GEN a4, GEN p); GEN random_FpE(GEN a4, GEN a6, GEN p); GEN Fp_FpX_sub(GEN x, GEN y, GEN p); GEN Fp_FpXQ_log(GEN a, GEN g, GEN ord, GEN T, GEN p); GEN FpV_inv(GEN x, GEN p); GEN FpV_roots_to_pol(GEN V, GEN p, long v); GEN FpX_Fp_add(GEN x, GEN y, GEN p); GEN FpX_Fp_add_shallow(GEN y,GEN x,GEN p); GEN FpX_Fp_mul(GEN x, GEN y, GEN p); GEN FpX_Fp_mul_to_monic(GEN y,GEN x,GEN p); GEN FpX_Fp_sub(GEN x, GEN y, GEN p); GEN FpX_Fp_sub_shallow(GEN y,GEN x,GEN p); GEN FpX_add(GEN x, GEN y, GEN p); GEN FpX_center(GEN x, GEN p, GEN pov2); GEN FpX_chinese_coprime(GEN x,GEN y,GEN Tx,GEN Ty,GEN Tz,GEN p); GEN FpX_deriv(GEN x, GEN p); GEN FpX_divrem(GEN x, GEN y, GEN p, GEN *pr); GEN FpX_div_by_X_x(GEN a, GEN x, GEN p, GEN *r); GEN FpX_eval(GEN x,GEN y,GEN p); GEN FpX_extgcd(GEN x, GEN y, GEN p, GEN *ptu, GEN *ptv); GEN FpX_gcd(GEN x, GEN y, GEN p); GEN FpX_halfgcd(GEN x, GEN y, GEN p); GEN FpX_invMontgomery(GEN T, GEN p); int FpX_is_squarefree(GEN f, GEN p); GEN FpX_mul(GEN x, GEN y, GEN p); GEN FpX_neg(GEN x, GEN p); GEN FpX_normalize(GEN z, GEN p); GEN FpX_red(GEN z, GEN p); GEN FpX_rem(GEN x, GEN y, GEN p); GEN FpX_rem_Montgomery(GEN x, GEN mg, GEN T, GEN p); GEN FpX_rescale(GEN P, GEN h, GEN p); GEN FpX_resultant(GEN a, GEN b, GEN p); GEN FpX_sqr(GEN x, GEN p); GEN FpX_sub(GEN x, GEN y, GEN p); long FpX_valrem(GEN x0, GEN t, GEN p, GEN *py); GEN FpXQ_charpoly(GEN x, GEN T, GEN p); GEN FpXQ_conjvec(GEN x, GEN T, GEN p); GEN FpXQ_div(GEN x,GEN y,GEN T,GEN p); GEN FpXQ_inv(GEN x,GEN T,GEN p); GEN FpXQ_invsafe(GEN x, GEN T, GEN p); int FpXQ_issquare(GEN x, GEN T, GEN p); GEN FpXQ_log(GEN a, GEN g, GEN ord, GEN T, GEN p); GEN FpXQ_matrix_pow(GEN y, long n, long m, GEN P, GEN l); GEN FpXQ_minpoly(GEN x, GEN T, GEN p); GEN FpXQ_mul(GEN y,GEN x,GEN T,GEN p); GEN FpXQ_norm(GEN x, GEN T, GEN p); GEN FpXQ_order(GEN a, GEN ord, GEN T, GEN p); GEN FpXQ_pow(GEN x, GEN n, GEN T, GEN p); GEN FpXQ_powers(GEN x, long l, GEN T, GEN p); GEN FpXQ_red(GEN x, GEN T, GEN p); GEN FpXQ_sqr(GEN y, GEN T, GEN p); GEN FpXQ_sqrtn(GEN a, GEN n, GEN T, GEN p, GEN *zetan); GEN FpXQ_trace(GEN x, GEN T, GEN p); GEN FpXQC_to_mod(GEN z, GEN T, GEN p); GEN FpXV_prod(GEN V, GEN p); GEN FpXV_red(GEN z, GEN p); GEN FqV_inv(GEN x, GEN T, GEN p); GEN gener_FpXQ(GEN T, GEN p, GEN *o); GEN random_FpX(long d, long v, GEN p); GEN Flc_Fl_div(GEN x, pari_ulong y, pari_ulong p); void Flc_Fl_div_inplace(GEN x, pari_ulong y, pari_ulong p); GEN Flc_Fl_mul(GEN x, pari_ulong y, pari_ulong p); void Flc_Fl_mul_inplace(GEN x, pari_ulong y, pari_ulong p); GEN Flm_Fl_mul(GEN y, pari_ulong x, pari_ulong p); void Flm_Fl_mul_inplace(GEN y, pari_ulong x, pari_ulong p); GEN Flm_Flc_mul(GEN x, GEN y, pari_ulong p); GEN Flm_mul(GEN x, GEN y, pari_ulong p); GEN Flm_transpose(GEN x); GEN Flv_add(GEN x, GEN y, pari_ulong p); void Flv_add_inplace(GEN x, GEN y, pari_ulong p); pari_ulong Flv_dotproduct(GEN x, GEN y, pari_ulong p); GEN Flv_sub(GEN x, GEN y, pari_ulong p); void Flv_sub_inplace(GEN x, GEN y, pari_ulong p); pari_ulong Flv_sum(GEN x, pari_ulong p); GEN Fp_to_mod(GEN z, GEN p); GEN FpC_FpV_mul(GEN x, GEN y, GEN p); GEN FpC_Fp_mul(GEN x, GEN y, GEN p); GEN FpC_center(GEN z, GEN p, GEN pov2); GEN FpC_red(GEN z, GEN p); GEN FpC_to_mod(GEN z, GEN p); GEN FpM_FpC_mul(GEN x, GEN y, GEN p); GEN FpM_FpC_mul_FpX(GEN x, GEN y, GEN p, long v); GEN FpM_center(GEN z, GEN p, GEN pov2); GEN FpM_mul(GEN x, GEN y, GEN p); GEN FpM_red(GEN z, GEN p); GEN FpM_to_mod(GEN z, GEN p); GEN FpC_add(GEN x, GEN y, GEN p); GEN FpC_sub(GEN x, GEN y, GEN p); GEN FpV_add(GEN x, GEN y, GEN p); GEN FpV_sub(GEN x, GEN y, GEN p); GEN FpV_dotproduct(GEN x, GEN y, GEN p); GEN FpV_dotsquare(GEN x, GEN p); GEN FpV_red(GEN z, GEN p); GEN FpV_to_mod(GEN z, GEN p); GEN FpX_to_mod(GEN z, GEN p); GEN RgC_Rg_add(GEN x, GEN y); GEN RgC_Rg_div(GEN x, GEN y); GEN RgC_Rg_mul(GEN x, GEN y); GEN RgC_RgM_mul(GEN x, GEN y); GEN RgC_RgV_mul(GEN x, GEN y); GEN RgC_add(GEN x, GEN y); GEN RgC_neg(GEN x); GEN RgC_sub(GEN x, GEN y); GEN RgM_Rg_add(GEN x, GEN y); GEN RgM_Rg_add_shallow(GEN x, GEN y); GEN RgM_Rg_div(GEN x, GEN y); GEN RgM_Rg_mul(GEN x, GEN y); GEN RgM_RgC_mul(GEN x, GEN y); GEN RgM_RgV_mul(GEN x, GEN y); GEN RgM_add(GEN x, GEN y); GEN RgM_det_triangular(GEN x); int RgM_isdiagonal(GEN x); int RgM_isidentity(GEN x); int RgM_isscalar(GEN x, GEN s); GEN RgM_mul(GEN x, GEN y); GEN RgM_neg(GEN x); GEN RgM_powers(GEN x, long l); GEN RgM_sqr(GEN x); GEN RgM_sub(GEN x, GEN y); GEN RgM_zc_mul(GEN x, GEN y); GEN RgM_zm_mul(GEN x, GEN y); GEN RgV_RgM_mul(GEN x, GEN y); GEN RgV_RgC_mul(GEN x, GEN y); GEN RgV_Rg_mul(GEN x, GEN y); GEN RgV_add(GEN x, GEN y); GEN RgV_dotproduct(GEN x, GEN y); GEN RgV_dotsquare(GEN x); long RgV_isin(GEN v, GEN x); GEN RgV_neg(GEN x); GEN RgV_sub(GEN x, GEN y); GEN RgV_sum(GEN v); GEN RgV_sumpart(GEN v, long n); GEN RgV_sumpart2(GEN v, long m, long n); GEN RgV_zc_mul(GEN x, GEN y); GEN RgV_zm_mul(GEN x, GEN y); int isdiagonal(GEN x); GEN matid(long n); GEN matid_Flm(long n); GEN scalarcol(GEN x, long n); GEN scalarcol_shallow(GEN x, long n); GEN scalarmat(GEN x, long n); GEN scalarmat_shallow(GEN x, long n); GEN scalarmat_s(long x, long n); GEN QX_ZXQV_eval(GEN P, GEN V, GEN dV); GEN QXQ_powers(GEN a, long n, GEN T); GEN QXQV_to_mod(GEN V, GEN T); GEN QXQXV_to_mod(GEN V, GEN T); GEN RgM_to_RgXV(GEN x, long v); GEN RgM_to_RgXX(GEN x, long v,long w); GEN RgV_to_RgX(GEN x, long v); GEN RgXQC_red(GEN P, GEN T); GEN RgXQV_red(GEN P, GEN T); GEN RgXQX_RgXQ_mul(GEN x, GEN y, GEN T); GEN RgXQX_divrem(GEN x,GEN y,GEN T,GEN *r); GEN RgXQX_mul(GEN x,GEN y,GEN T); GEN RgXQX_pseudodivrem(GEN x, GEN y, GEN T, GEN *ptr); GEN RgXQX_pseudorem(GEN x, GEN y, GEN T); GEN RgXQX_red(GEN P, GEN T); GEN RgXQX_sqr(GEN x, GEN T); GEN RgXQX_translate(GEN P, GEN c, GEN T); GEN RgXQ_matrix_pow(GEN y, long n, long m, GEN P); GEN RgXQ_norm(GEN x, GEN T); GEN RgXQ_pow(GEN x, GEN n, GEN T); GEN RgXQ_powu(GEN x, pari_ulong n, GEN T); GEN RgXQ_powers(GEN x, long l, GEN T); GEN RgXV_to_RgM(GEN v, long n); GEN RgXV_unscale(GEN v, GEN h); GEN RgXX_to_RgM(GEN v, long n); GEN RgXY_swap(GEN x, long n, long w); GEN RgX_RgXQ_eval(GEN f, GEN x, GEN T); GEN RgX_RgXQV_eval(GEN P, GEN V, GEN T); GEN RgX_Rg_add(GEN y, GEN x); GEN RgX_Rg_add_shallow(GEN y, GEN x); GEN RgX_Rg_div(GEN y, GEN x); GEN RgX_Rg_divexact(GEN x, GEN y); GEN RgX_Rg_mul(GEN y, GEN x); GEN RgX_Rg_sub(GEN y, GEN x); GEN RgX_add(GEN x, GEN y); GEN RgX_deflate(GEN x0, long d); GEN RgX_deriv(GEN x); GEN RgX_div_by_X_x(GEN a, GEN x, GEN *r); GEN RgX_divrem(GEN x,GEN y,GEN *r); GEN RgX_divs(GEN y, long x); long RgX_equal(GEN x, GEN y); long RgX_equal_var(GEN x, GEN y); GEN RgX_get_0(GEN x); GEN RgX_get_1(GEN x); GEN RgX_inflate(GEN x0, long d); GEN RgX_modXn_shallow(GEN a, long n); GEN RgX_mul(GEN x,GEN y); GEN RgX_mulXn(GEN x, long d); GEN RgX_muls(GEN y, long x); GEN RgX_mulspec(GEN a, GEN b, long na, long nb); GEN RgX_neg(GEN x); GEN RgX_pseudodivrem(GEN x, GEN y, GEN *ptr); GEN RgX_pseudorem(GEN x, GEN y); GEN RgX_recip(GEN x); GEN RgX_recip_shallow(GEN x); GEN RgX_renormalize(GEN x); GEN RgX_rescale(GEN P, GEN h); GEN RgX_shift(GEN a, long n); GEN RgX_shift_shallow(GEN x, long n); GEN RgX_sqr(GEN x); GEN RgX_sqrspec(GEN a, long na); GEN RgX_sub(GEN x, GEN y); GEN RgX_to_RgV(GEN x, long N); GEN RgX_translate(GEN P, GEN c); GEN RgX_unscale(GEN P, GEN h); GEN Rg_RgX_sub(GEN x, GEN y); GEN ZC_ZV_mul(GEN x, GEN y); GEN ZC_Z_add(GEN x, GEN y); GEN ZC_Z_divexact(GEN X, GEN c); GEN ZC_Z_mul(GEN X, GEN c); GEN ZC_Z_sub(GEN x, GEN y); GEN ZC_add(GEN x, GEN y); GEN ZC_copy(GEN x); GEN ZC_hnfremdiv(GEN x, GEN y, GEN *Q); GEN ZC_lincomb(GEN u, GEN v, GEN X, GEN Y); void ZC_lincomb1_inplace(GEN X, GEN Y, GEN v); GEN ZC_neg(GEN M); GEN ZC_reducemodlll(GEN x,GEN y); GEN ZC_reducemodmatrix(GEN v, GEN y); GEN ZM_reducemodlll(GEN x,GEN y); GEN ZM_reducemodmatrix(GEN v, GEN y); GEN ZC_sub(GEN x, GEN y); GEN ZC_z_mul(GEN X, long c); GEN ZM_ZC_mul(GEN x, GEN y); GEN ZM_Z_divexact(GEN X, GEN c); GEN ZM_Z_mul(GEN X, GEN c); GEN ZM_add(GEN x, GEN y); GEN ZM_copy(GEN x); GEN ZM_det_triangular(GEN mat); int ZM_equal(GEN A, GEN B); GEN ZM_hnfremdiv(GEN x, GEN y, GEN *Q); long ZM_max_lg(GEN x); GEN ZM_mul(GEN x, GEN y); GEN ZM_neg(GEN x); GEN ZM_pow(GEN x, GEN n); GEN ZM_sub(GEN x, GEN y); GEN ZM_supnorm(GEN x); GEN ZM_to_Flm(GEN x, pari_ulong p); GEN ZM_to_zm(GEN z); GEN ZM_zc_mul(GEN x, GEN y); GEN ZM_zm_mul(GEN x, GEN y); GEN ZMrow_ZC_mul(GEN x, GEN y, long i); GEN ZV_ZM_mul(GEN x, GEN y); int ZV_abscmp(GEN x, GEN y); int ZV_cmp(GEN x, GEN y); int ZV_equal0(GEN V); GEN ZV_content(GEN x); GEN ZV_dotproduct(GEN x,GEN y); GEN ZV_dotsquare(GEN x); int ZV_equal(GEN V, GEN W); long ZV_max_lg(GEN x); void ZV_neg_inplace(GEN M); GEN ZV_prod(GEN v); GEN ZV_sum(GEN v); GEN ZV_to_Flv(GEN x, pari_ulong p); GEN ZV_to_nv(GEN z); void ZV_togglesign(GEN M); GEN zm_to_ZM(GEN z); int zv_cmp0(GEN V); long zv_content(GEN x); int zv_equal(GEN V, GEN W); GEN zv_neg(GEN x); long zv_prod(GEN v); long zv_sum(GEN v); int ZM_ishnf(GEN x); int ZM_isidentity(GEN x); void RgM_check_ZM(GEN A, const char *s); void RgV_check_ZV(GEN A, const char *s); void RgX_check_ZX(GEN x, const char *s); void RgX_check_ZXY(GEN x, const char *s); GEN ZXV_Z_mul(GEN y, GEN x); long ZXY_max_lg(GEN x); GEN ZX_Z_add(GEN y,GEN x); GEN ZX_Z_divexact(GEN y,GEN x); GEN ZX_Z_mul(GEN y,GEN x); GEN ZX_Z_sub(GEN y, GEN x); GEN ZX_add(GEN x, GEN y); GEN ZX_copy(GEN x); GEN ZX_deriv(GEN x); int ZX_equal(GEN V, GEN W); long ZX_max_lg(GEN x); GEN ZX_mul(GEN x, GEN y); GEN ZX_mulspec(GEN a, GEN b, long na, long nb); GEN ZX_neg(GEN x); GEN ZX_rem(GEN x, GEN y); GEN ZX_renormalize(GEN x, long lx); GEN ZX_rescale(GEN P, GEN h); GEN ZX_sqr(GEN x); GEN ZX_sqrspec(GEN a, long na); GEN ZX_sub(GEN x, GEN y); long ZX_val(GEN x); long ZX_valrem(GEN x, GEN *Z); GEN Z_ZX_sub(GEN x, GEN y); GEN scalar_ZX(GEN x, long v); GEN scalar_ZX_shallow(GEN x, long v); GEN zx_to_ZX(GEN z); GEN F2m_deplin(GEN x); pari_ulong F2m_det(GEN x); pari_ulong F2m_det_sp(GEN x); GEN F2m_ker(GEN x); GEN F2m_ker_sp(GEN x, long deplin); GEN Flm_deplin(GEN x, pari_ulong p); pari_ulong Flm_det(GEN x, pari_ulong p); pari_ulong Flm_det_sp(GEN x, pari_ulong p); GEN Flm_gauss(GEN a, GEN b, pari_ulong p); GEN Flm_image(GEN x, pari_ulong p); GEN Flm_indexrank(GEN x, pari_ulong p); GEN Flm_inv(GEN x, pari_ulong p); GEN Flm_ker(GEN x, pari_ulong p); GEN Flm_ker_sp(GEN x, pari_ulong p, long deplin); long Flm_rank(GEN x, pari_ulong p); GEN FlxqM_ker(GEN x, GEN T, pari_ulong p); GEN FpM_deplin(GEN x, GEN p); GEN FpM_det(GEN x, GEN p); GEN FpM_gauss(GEN a, GEN b, GEN p); GEN FpM_image(GEN x, GEN p); GEN FpM_indexrank(GEN x, GEN p); GEN FpM_intersect(GEN x, GEN y, GEN p); GEN FpM_inv(GEN x, GEN p); GEN FpM_invimage(GEN m, GEN v, GEN p); GEN FpM_ker(GEN x, GEN p); long FpM_rank(GEN x, GEN p); GEN FpM_suppl(GEN x, GEN p); GEN FqM_gauss(GEN a, GEN b, GEN T, GEN p); GEN FqM_ker(GEN x, GEN T, GEN p); GEN FqM_suppl(GEN x, GEN T, GEN p); GEN QM_inv(GEN M, GEN dM); GEN RgM_diagonal(GEN m); GEN RgM_diagonal_shallow(GEN m); GEN RgM_inv_upper(GEN a); GEN RgM_solve(GEN a, GEN b); GEN RgM_solve_realimag(GEN x, GEN y); GEN ZM_detmult(GEN A); GEN ZM_inv(GEN M, GEN dM); GEN apply0(GEN f, GEN A); GEN closemodinvertible(GEN x, GEN y); GEN deplin(GEN x); GEN det(GEN a); GEN det0(GEN a,long flag); GEN det2(GEN a); GEN detint(GEN x); GEN diagonal(GEN x); GEN diagonal_shallow(GEN x); GEN eigen(GEN x, long prec); GEN extract0(GEN x, GEN l1, GEN l2); GEN gauss(GEN a, GEN b); GEN gaussmodulo(GEN M, GEN D, GEN Y); GEN gaussmodulo2(GEN M, GEN D, GEN Y); GEN genapply(void *E, GEN (*f)(void *E, GEN x), GEN A); GEN genselect(void *E, long (*f)(void *E, GEN x), GEN A); GEN gtomat(GEN x); GEN gtrans(GEN x); GEN image(GEN x); GEN image2(GEN x); GEN imagecompl(GEN x); GEN indexrank(GEN x); GEN inverseimage(GEN mat, GEN y); GEN ker(GEN x); GEN keri(GEN x); GEN matimage0(GEN x,long flag); GEN matker0(GEN x, long flag); GEN matmuldiagonal(GEN x, GEN d); GEN matmultodiagonal(GEN x, GEN y); GEN matsolvemod0(GEN M, GEN D, GEN Y,long flag); long rank(GEN x); GEN reducemodinvertible(GEN x, GEN y); GEN reducemodlll(GEN x,GEN y); GEN select0(GEN A, GEN f); GEN shallowextract(GEN x, GEN L); GEN shallowtrans(GEN x); GEN split_realimag(GEN x, long r1, long r2); GEN suppl(GEN x); GEN Flm_charpoly(GEN x, long p); GEN Flm_hess(GEN x, pari_ulong p); GEN QM_minors_coprime(GEN x, GEN pp); GEN QM_ImZ_hnf(GEN x); GEN QM_ImQ_hnf(GEN x); GEN gnorml1_fake(GEN x); GEN ZM_charpoly(GEN x); GEN adj(GEN x); GEN adjsafe(GEN x); GEN caract(GEN x, long v); GEN caradj(GEN x, long v, GEN *py); GEN carberkowitz(GEN x, long v); GEN carhess(GEN x, long v); GEN charpoly0(GEN x, long v,long flag); GEN gnorm(GEN x); GEN gnorml1(GEN x,long prec); GEN gnorml2(GEN x); GEN gsupnorm(GEN x, long prec); void gsupnorm_aux(GEN x, GEN *m, GEN *msq); GEN gtrace(GEN x); GEN hess(GEN x); GEN intersect(GEN x, GEN y); GEN jacobi(GEN a, long prec); GEN matadjoint0(GEN x, long flag); GEN matcompanion(GEN x); GEN matrixqz0(GEN x, GEN pp); GEN minpoly(GEN x, long v); GEN qfgaussred(GEN a); GEN qfgaussred_positive(GEN a); GEN qfsign(GEN a); void addhelp(const char *e, char *s); void alias0(const char *s, const char *old); GEN compile_str(const char *s); GEN chartoGENstr(char c); long delete_var(void); entree* fetch_named_var(const char *s); long fetch_user_var(const char *s); long fetch_var(void); GEN fetch_var_value(long vx, GEN t); GEN gp_read_str(const char *t); entree* install(void *f, char *name, char *code); entree* is_entry(const char *s); void kill0(const char *e); long manage_var(long n, entree *ep); void pari_var_init(void); long pari_var_next(void); long pari_var_next_temp(void); void pari_var_create(entree *ep); void name_var(long n, const char *s); GEN readseq(char *t); GEN strntoGENstr(const char *s, long n0); GEN strtoGENstr(const char *s); GEN strtoi(const char *s); GEN strtor(const char *s, long prec); GEN type0(GEN x); long isprimeAPRCL(GEN N); GEN Qfb0(GEN x, GEN y, GEN z, GEN d, long prec); void check_quaddisc(GEN x, long *s, long *r, const char *f); void check_quaddisc_imag(GEN x, long *r, const char *f); void check_quaddisc_real(GEN x, long *r, const char *f); long cornacchia(GEN d, GEN p, GEN *px, GEN *py); long cornacchia2(GEN d, GEN p, GEN *px, GEN *py); GEN nucomp(GEN x, GEN y, GEN l); GEN nudupl(GEN x, GEN l); GEN nupow(GEN x, GEN n); GEN primeform(GEN x, GEN p, long prec); GEN primeform_u(GEN x, pari_ulong p); GEN qfbcompraw(GEN x, GEN y); GEN qfbpowraw(GEN x, long n); GEN qfbred0(GEN x, long flag, GEN D, GEN isqrtD, GEN sqrtD); GEN qfbsolve(GEN Q, GEN n); GEN qfi(GEN x, GEN y, GEN z); GEN qfi_1(GEN x); GEN qficomp(GEN x, GEN y); GEN qficompraw(GEN x, GEN y); GEN qfipowraw(GEN x, long n); GEN qfisolvep(GEN Q, GEN p); GEN qfisqr(GEN x); GEN qfisqrraw(GEN x); GEN qfr(GEN x, GEN y, GEN z, GEN d); GEN qfr3_comp(GEN x, GEN y, struct qfr_data *S); GEN qfr3_pow(GEN x, GEN n, struct qfr_data *S); GEN qfr3_red(GEN x, struct qfr_data *S); GEN qfr3_rho(GEN x, struct qfr_data *S); GEN qfr3_to_qfr(GEN x, GEN z); GEN qfr5_comp(GEN x, GEN y, struct qfr_data *S); GEN qfr5_dist(GEN e, GEN d, long prec); GEN qfr5_pow(GEN x, GEN n, struct qfr_data *S); GEN qfr5_red(GEN x, struct qfr_data *S); GEN qfr5_rho(GEN x, struct qfr_data *S); GEN qfr5_to_qfr(GEN x, GEN d0); GEN qfr_1(GEN x); void qfr_data_init(GEN D, long prec, struct qfr_data *S); GEN qfr_to_qfr5(GEN x, long prec); GEN qfrcomp(GEN x, GEN y); GEN qfrcompraw(GEN x, GEN y); GEN qfrpow(GEN x, GEN n); GEN qfrpowraw(GEN x, long n); GEN qfrsolvep(GEN Q, GEN p); GEN qfrsqr(GEN x); GEN qfrsqrraw(GEN x); GEN quadgen(GEN x); GEN quadpoly(GEN x); GEN quadpoly0(GEN x, long v); GEN redimag(GEN x); GEN redreal(GEN x); GEN redrealnod(GEN x, GEN isqrtD); GEN rhoreal(GEN x); GEN rhorealnod(GEN x, GEN isqrtD); pari_ulong Fl_order(pari_ulong a, pari_ulong o, pari_ulong p); pari_ulong Fl_powu(pari_ulong x, pari_ulong n, pari_ulong p); pari_ulong Fl_sqrt(pari_ulong a, pari_ulong p); GEN Fp_log(GEN a, GEN g, GEN ord, GEN p); GEN Fp_order(GEN a, GEN o, GEN p); GEN Fp_pow(GEN a, GEN n, GEN m); GEN Fp_pows(GEN A, long k, GEN N); GEN Fp_powu(GEN x, pari_ulong k, GEN p); GEN Fp_sqrt(GEN a, GEN p); GEN Fp_sqrtn(GEN a, GEN n, GEN p, GEN *zetan); GEN Z_chinese(GEN a, GEN b, GEN A, GEN B); GEN Z_chinese_all(GEN a, GEN b, GEN A, GEN B, GEN *pC); GEN Z_chinese_coprime(GEN a, GEN b, GEN A, GEN B, GEN C); GEN Z_chinese_post(GEN a, GEN b, GEN C, GEN U, GEN d); void Z_chinese_pre(GEN A, GEN B, GEN *pC, GEN *pU, GEN *pd); long Z_isanypower(GEN x, GEN *y); long Z_isfundamental(GEN x); long Z_ispowerall(GEN x, pari_ulong k, GEN *pt); long Z_issquareall(GEN x, GEN *pt); long Zp_issquare(GEN a, GEN p); GEN bestappr0(GEN x, GEN a, GEN b); GEN bestappr(GEN x, GEN k); long cgcd(long a,long b); pari_ulong ugcd(pari_ulong a,pari_ulong b); GEN chinese1(GEN x); GEN chinese1_coprime_Z(GEN x); GEN chinese(GEN x, GEN y); GEN classno2(GEN x); GEN classno(GEN x); long clcm(long a,long b); GEN contfrac0(GEN x, GEN b, long flag); GEN fibo(long n); GEN gboundcf(GEN x, long k); GEN gcf2(GEN b, GEN x); GEN gcf(GEN x); pari_ulong pgener_Fl_local(pari_ulong p, GEN L); pari_ulong pgener_Fl(pari_ulong p); GEN pgener_Fp_local(GEN p, GEN L); GEN pgener_Fp(GEN p); pari_ulong pgener_Zl(pari_ulong p); GEN pgener_Zp(GEN p); long gisanypower(GEN x, GEN *pty); GEN gisfundamental(GEN x); GEN gissquareall(GEN x, GEN *pt); GEN gissquare(GEN x); GEN gkronecker(GEN x, GEN y); GEN hclassno(GEN x); long hilbert(GEN x, GEN y, GEN p); long hilbertii(GEN x, GEN y, GEN p); long ispower(GEN x, GEN k, GEN *pty); long krois(GEN x, long y); long kronecker(GEN x, GEN y); long krosi(long s, GEN x); long kross(long x, long y); long krouu(pari_ulong x, pari_ulong y); GEN lcmii(GEN a, GEN b); GEN mpfact(long n); GEN order(GEN x); GEN pnqn(GEN x); GEN qfbclassno0(GEN x,long flag); GEN quaddisc(GEN x); GEN quadregulator(GEN x, long prec); GEN quadunit(GEN x); GEN sqrtint(GEN a); GEN mulu_interval(pari_ulong a, pari_ulong b); long uissquareall(pari_ulong A, pari_ulong *sqrtA); GEN znorder(GEN x, GEN o); GEN znlog(GEN x, GEN g, GEN o); GEN znprimroot(GEN m); GEN znprimroot0(GEN m); GEN znstar(GEN x); long Z_issquarefree(GEN x); GEN Z_factor_limit(GEN n, pari_ulong all); GEN Z_factor_until(GEN n, GEN limit); GEN Z_smoothen(GEN N, GEN L, GEN *pP, GEN *pe); long bigomega(GEN n); GEN boundfact(GEN n, pari_ulong lim); GEN core(GEN n); GEN corepartial(GEN n, long l); GEN core0(GEN n,long flag); GEN core2(GEN n); GEN core2partial(GEN n, long l); GEN coredisc(GEN n); GEN coredisc0(GEN n,long flag); GEN coredisc2(GEN n); GEN divisors(GEN n); GEN divisorsu(pari_ulong n); GEN factor_pn_1(GEN p, long n); GEN factorint(GEN n, long flag); GEN factoru(pari_ulong n); GEN factoru_pow(pari_ulong n); GEN gbigomega(GEN n); GEN gissquarefree(GEN x); GEN gmoebius(GEN n); GEN gnumbdiv(GEN n); GEN gomega(GEN n); GEN geulerphi(GEN n); GEN gsumdiv(GEN n); GEN gsumdivk(GEN n,long k); byteptr initprimes(pari_ulong maxnum); pari_ulong init_primepointer(pari_ulong a, pari_ulong p, byteptr *ptr); long issquarefree(GEN x); pari_ulong maxprime(void); void maxprime_check(pari_ulong c); long moebius(GEN n); GEN numbdiv(GEN n); long omega(GEN n); GEN eulerphi(GEN n); GEN sumdiv(GEN n); GEN sumdivk(GEN n,long k); pari_ulong eulerphiu(pari_ulong n); GEN Z_factor(GEN n); GEN glambdak(GEN nfz, GEN s, long prec); GEN gzetak(GEN nfz, GEN s, long prec); GEN gzetakall(GEN nfz, GEN s, long flag, long prec); GEN initzeta(GEN pol, long prec); GEN dirzetak(GEN nf, GEN b); GEN FpX_FpC_nfpoleval(GEN nf, GEN pol, GEN a, GEN p); GEN Polred(GEN x, long flag, GEN fa); GEN T2_from_embed(GEN x, long r1); void check_ZKmodule(GEN x, const char *s); void checkbid(GEN bid); GEN checkbnf(GEN bnf); void checkbnr(GEN bnr); void checkbnrgen(GEN bnr); void checksqmat(GEN x, long N); GEN checknf(GEN nf); GEN checknfelt_mod(GEN nf, GEN x, const char *s); void checkprid(GEN bid); void checkrnf(GEN rnf); GEN factoredpolred(GEN x, GEN fa); GEN factoredpolred2(GEN x, GEN fa); GEN galoisapply(GEN nf, GEN aut, GEN x); GEN get_bnf(GEN x, long *t); GEN get_bnfpol(GEN x, GEN *bnf, GEN *nf); GEN get_nf(GEN x, long *t); GEN get_nfpol(GEN x, GEN *nf); GEN get_prid(GEN x); GEN idealfrobenius(GEN nf, GEN gal, GEN pr); GEN idealramgroups(GEN nf, GEN gal, GEN pr); GEN nf_get_allroots(GEN nf); long nf_get_prec(GEN x); GEN nfgaloismatrix(GEN nf, GEN s); GEN nfinit(GEN x, long prec); GEN nfinit0(GEN x, long flag, long prec); GEN nfinitall(GEN x, long flag, long prec); GEN nfinitred(GEN x, long prec); GEN nfinitred2(GEN x, long prec); GEN nfisincl(GEN a, GEN b); GEN nfisisom(GEN a, GEN b); GEN nfnewprec(GEN nf, long prec); GEN nfnewprec_shallow(GEN nf, long prec); GEN nfpoleval(GEN nf, GEN pol, GEN a); long nftyp(GEN x); GEN ordred(GEN x); GEN polgalois(GEN x, long prec); GEN polred(GEN x); GEN polred0(GEN x, long flag, GEN p); GEN polred2(GEN x); GEN polredabs(GEN x); GEN polredabs0(GEN x, long flag); GEN polredabs2(GEN x); GEN polredabsall(GEN x, long flun); GEN smallpolred(GEN x); GEN smallpolred2(GEN x); GEN tschirnhaus(GEN x); GEN ZX_Q_normalize(GEN pol, GEN *ptlc); GEN ZX_Z_normalize(GEN pol, GEN *ptk); GEN ZX_to_monic(GEN pol, GEN *lead); GEN ZX_primitive_to_monic(GEN pol, GEN *lead); GEN Fq_to_nf(GEN x, GEN modpr); GEN FqM_to_nfM(GEN z, GEN modpr); GEN FqV_to_nfV(GEN z, GEN modpr); GEN FqX_to_nfX(GEN x, GEN modpr); long ZpX_disc_val(GEN f, GEN p); GEN ZpX_gcd(GEN f1,GEN f2,GEN pm); GEN ZpX_reduced_resultant(GEN x, GEN y, GEN pm); GEN ZpX_reduced_resultant_fast(GEN f, GEN g, GEN p, long M); void checkmodpr(GEN modpr); GEN ZX_compositum_disjoint(GEN A, GEN B); GEN compositum(GEN P, GEN Q); GEN compositum2(GEN P, GEN Q); GEN nfdisc(GEN x); GEN rnf_fix_pol(GEN nf, GEN x, int lift); GEN indexpartial(GEN P, GEN DP); GEN modpr_genFq(GEN modpr); GEN nf_to_Fq_init(GEN nf, GEN *pr, GEN *T, GEN *p); GEN nf_to_Fq(GEN nf, GEN x, GEN modpr); GEN nfM_to_FqM(GEN z, GEN nf,GEN modpr); GEN nfV_to_FqV(GEN z, GEN nf,GEN modpr); GEN nfX_to_FqX(GEN x, GEN nf,GEN modpr); GEN nfbasis(GEN x, GEN *y,long flag,GEN p); GEN nfbasis0(GEN x,long flag,GEN p); GEN nfdisc0(GEN x,long flag, GEN p); void nfmaxord(nfmaxord_t *S, GEN f, long flag, GEN w); GEN nfmodprinit(GEN nf, GEN pr); GEN nfreducemodpr(GEN nf, GEN x, GEN modpr); GEN polcompositum0(GEN P, GEN Q,long flag); GEN idealprimedec(GEN nf,GEN p); GEN rnfbasis(GEN bnf, GEN order); GEN rnfdedekind(GEN nf, GEN T, GEN pr, long flag); GEN rnfdet(GEN nf, GEN order); GEN rnfdiscf(GEN nf, GEN pol); GEN rnfequation(GEN nf, GEN pol); GEN rnfequation0(GEN nf, GEN pol, long flall); GEN rnfequation2(GEN nf, GEN pol); GEN rnfequationall(GEN A, GEN B, long *pk, GEN *pLPRS); GEN rnfhnfbasis(GEN bnf, GEN order); long rnfisfree(GEN bnf, GEN order); GEN rnflllgram(GEN nf, GEN pol, GEN order,long prec); GEN rnfpolred(GEN nf, GEN pol, long prec); GEN rnfpolredabs(GEN nf, GEN pol, long flag); GEN rnfpseudobasis(GEN nf, GEN pol); GEN rnfsimplifybasis(GEN bnf, GEN order); GEN rnfsteinitz(GEN nf, GEN order); long factorial_lval(pari_ulong n, pari_ulong p); GEN zk_to_Fq_init(GEN nf, GEN *pr, GEN *T, GEN *p); GEN zk_to_Fq(GEN x, GEN modpr); GEN zkmodprinit(GEN nf, GEN pr); GEN Idealstar(GEN nf, GEN x,long flun); GEN RgC_to_nfC(GEN nf,GEN x); GEN RgM_to_nfM(GEN nf,GEN x); GEN RgX_to_nfX(GEN nf,GEN pol); GEN algtobasis(GEN nf, GEN x); GEN basistoalg(GEN nf, GEN x); GEN ideallist(GEN nf,long bound); GEN ideallist0(GEN nf,long bound, long flag); GEN ideallistarch(GEN nf, GEN list, GEN arch); GEN idealstar0(GEN nf, GEN x,long flag); GEN indices_to_vec01(GEN archp, long r); GEN matalgtobasis(GEN nf, GEN x); GEN matbasistoalg(GEN nf, GEN x); GEN nf_to_scalar_or_alg(GEN nf, GEN x); GEN nf_to_scalar_or_basis(GEN nf, GEN x); GEN nfadd(GEN nf, GEN x, GEN y); GEN nfarchstar(GEN nf,GEN x,GEN arch); GEN nfdiv(GEN nf, GEN x, GEN y); GEN nfdiveuc(GEN nf, GEN a, GEN b); GEN nfdivrem(GEN nf, GEN a, GEN b); GEN nfinv(GEN nf, GEN x); GEN nfinvmodideal(GEN nf, GEN x, GEN ideal); GEN nfmod(GEN nf, GEN a, GEN b); GEN nfmul(GEN nf,GEN x,GEN y); GEN nfmuli(GEN nf,GEN x,GEN y); GEN nfnorm(GEN nf, GEN x); GEN nfpow(GEN nf,GEN x,GEN k); GEN nfpow_u(GEN nf, GEN z, pari_ulong n); GEN nfpowmodideal(GEN nf,GEN x,GEN k,GEN ideal); GEN nfsign(GEN nf,GEN alpha); GEN nfsign_arch(GEN nf,GEN alpha,GEN arch); GEN nfsign_from_logarch(GEN Larch, GEN invpi, GEN archp); GEN nfsqr(GEN nf,GEN x); GEN nfsqri(GEN nf, GEN x); GEN nftrace(GEN nf, GEN x); long nfval(GEN nf, GEN x, GEN vp); GEN rnfalgtobasis(GEN rnf, GEN x); GEN rnfbasistoalg(GEN rnf, GEN x); GEN set_sign_mod_divisor(GEN nf, GEN x, GEN y, GEN idele, GEN sarch); GEN vec01_to_indices(GEN arch); GEN vecmodii(GEN a, GEN b); GEN ideallog(GEN nf,GEN x,GEN bigideal); GEN multable(GEN nf, GEN x); GEN tablemul(GEN TAB, GEN x, GEN y); GEN tablemul_ei(GEN M, GEN x, long i); GEN tablemul_ei_ej(GEN M, long i, long j); GEN tablemulvec(GEN M, GEN x, GEN v); GEN tablesqr(GEN tab, GEN x); GEN zk_multable(GEN nf, GEN x); GEN ei_multable(GEN nf, long i); GEN zk_scalar_or_multable(GEN, GEN x); GEN RM_round_maxrank(GEN G); GEN famat_inv(GEN f); GEN famat_makecoprime(GEN nf, GEN g, GEN e, GEN pr, GEN prk, GEN EX); GEN famat_mul(GEN f, GEN g); GEN famat_pow(GEN f, GEN n); GEN famat_sqr(GEN f); GEN famat_reduce(GEN fa); GEN famat_to_nf(GEN nf, GEN f); GEN famat_to_nf_modideal_coprime(GEN nf, GEN g, GEN e, GEN id, GEN EX); GEN famat_to_nf_moddivisor(GEN nf, GEN g, GEN e, GEN bid); GEN idealtwoelt(GEN nf, GEN ix); GEN idealtwoelt0(GEN nf, GEN ix, GEN a); GEN idealtwoelt2(GEN nf, GEN x, GEN a); GEN idealadd(GEN nf, GEN x, GEN y); GEN idealaddmultoone(GEN nf, GEN list); GEN idealaddtoone(GEN nf, GEN x, GEN y); GEN idealaddtoone_i(GEN nf, GEN x, GEN y); GEN idealaddtoone0(GEN nf, GEN x, GEN y); GEN idealappr(GEN nf, GEN x); GEN idealappr0(GEN nf, GEN x, long fl); GEN idealapprfact(GEN nf, GEN x); GEN idealchinese(GEN nf, GEN x, GEN y); GEN idealcoprime(GEN nf, GEN x, GEN y); GEN idealcoprimefact(GEN nf, GEN x, GEN fy); GEN idealdiv(GEN nf, GEN x, GEN y); GEN idealdiv0(GEN nf, GEN x, GEN y,long flag); GEN idealdivexact(GEN nf, GEN x, GEN y); GEN idealdivpowprime(GEN nf, GEN x, GEN vp, GEN n); GEN idealmulpowprime(GEN nf, GEN x, GEN vp, GEN n); GEN idealfactor(GEN nf, GEN x); GEN idealhnf(GEN nf, GEN x); GEN idealhnf_principal(GEN nf, GEN x); GEN idealhnf_shallow(GEN nf, GEN x); GEN idealhnf_two(GEN nf, GEN vp); GEN idealhnf0(GEN nf, GEN a, GEN b); GEN idealintersect(GEN nf, GEN x, GEN y); GEN idealinv(GEN nf, GEN ix); GEN idealred0(GEN nf, GEN I,GEN vdir); GEN idealmul(GEN nf, GEN ix, GEN iy); GEN idealmul0(GEN nf, GEN ix, GEN iy, long flag); GEN idealmul_HNF(GEN nf, GEN ix, GEN iy); GEN idealmulred(GEN nf, GEN ix, GEN iy); GEN idealnorm(GEN nf, GEN x); GEN idealpow(GEN nf, GEN ix, GEN n); GEN idealpow0(GEN nf, GEN ix, GEN n, long flag); GEN idealpowred(GEN nf, GEN ix, GEN n); GEN idealpows(GEN nf, GEN ideal, long iexp); GEN idealprodprime(GEN nf, GEN L); GEN idealsqr(GEN nf, GEN x); long idealtyp(GEN *ideal, GEN *arch); long idealval(GEN nf,GEN ix,GEN vp); long isideal(GEN nf,GEN x); GEN idealmin(GEN nf,GEN ix,GEN vdir); GEN nf_get_Gtwist(GEN nf, GEN vdir); GEN nf_get_Gtwist1(GEN nf, long i); GEN nfC_nf_mul(GEN nf, GEN v, GEN x); GEN nfdetint(GEN nf,GEN pseudo); GEN nfdivmodpr(GEN nf, GEN x, GEN y, GEN modpr); GEN nfhnf(GEN nf, GEN x); GEN nfhnfmod(GEN nf, GEN x, GEN d); GEN nfkermodpr(GEN nf, GEN x, GEN modpr); GEN nfmulmodpr(GEN nf, GEN x, GEN y, GEN modpr); GEN nfpowmodpr(GEN nf, GEN x, GEN k, GEN modpr); GEN nfreduce(GEN nf, GEN x, GEN ideal); GEN nfsnf(GEN nf, GEN x); GEN nfsolvemodpr(GEN nf, GEN a, GEN b, GEN modpr); GEN to_famat(GEN x, GEN y); GEN to_famat_shallow(GEN x, GEN y); GEN vecdiv(GEN x, GEN y); GEN vecinv(GEN x); GEN vecmul(GEN x, GEN y); GEN vecpow(GEN x, GEN n); GEN rnfelementabstorel(GEN rnf, GEN x); GEN rnfelementdown(GEN rnf, GEN x); GEN rnfelementreltoabs(GEN rnf, GEN x); GEN rnfelementup(GEN rnf, GEN x); GEN rnfidealabstorel(GEN rnf, GEN x); GEN rnfidealdown(GEN rnf, GEN x); GEN rnfidealhermite(GEN rnf, GEN x); GEN rnfidealmul(GEN rnf,GEN x,GEN y); GEN rnfidealnormabs(GEN rnf, GEN x); GEN rnfidealnormrel(GEN rnf, GEN x); GEN rnfidealreltoabs(GEN rnf, GEN x); GEN rnfidealtwoelement(GEN rnf,GEN x); GEN rnfidealup(GEN rnf, GEN x); GEN rnfinit(GEN nf,GEN pol); GEN dlog_get_ordfa(GEN o); GEN dlog_get_ord(GEN o); GEN gen_PH_log(GEN a, GEN g, GEN ord, void *E, const struct bb_group *grp, GEN easy(void *E, GEN, GEN, GEN)); GEN gen_Shanks_sqrtn(GEN a, GEN n, GEN q, GEN *zetan, void *E, const struct bb_group *grp); GEN gen_eltorder(GEN x, GEN o, void *E, const struct bb_group *grp); GEN gen_plog(GEN x,GEN g0,GEN q, void *E, const struct bb_group *grp, GEN easy(void*E, GEN, GEN, GEN)); GEN gen_pow(GEN x, GEN n, void *E, GEN (*sqr)(void*,GEN), GEN (*mul)(void*,GEN,GEN)); GEN gen_powu(GEN x, pari_ulong n, void *E, GEN (*sqr)(void*,GEN), GEN (*mul)(void*,GEN,GEN)); GEN Q_from_QR(GEN x, long prec); GEN R_from_QR(GEN x, long prec); GEN algdep(GEN x, long n); GEN algdep0(GEN x, long n, long bit); GEN gram_matrix(GEN M); GEN lindep(GEN x); GEN lindep0(GEN x, long flag); GEN lindep2(GEN x, long bit); GEN minim(GEN a, GEN borne, GEN stockmax); GEN qfrep0(GEN a, GEN borne, long flag); GEN qfminim0(GEN a, GEN borne, GEN stockmax,long flag, long prec); GEN minim2(GEN a, GEN borne, GEN stockmax); GEN perf(GEN a); char* stackmalloc(size_t N); GEN zncoppersmith(GEN P0, GEN N, GEN X, GEN B) ; GEN QXQ_reverse(GEN a, GEN T); GEN binomial(GEN x, long k); GEN binomialuu(pari_ulong n, pari_ulong k); int cmp_nodata(void *data, GEN x, GEN y); int cmp_prime_ideal(GEN x, GEN y); int cmp_prime_over_p(GEN x, GEN y); int cmp_RgX(GEN x, GEN y); int cmp_universal(GEN x, GEN y); GEN convol(GEN x, GEN y); int gen_cmp_RgX(void *data, GEN x, GEN y); GEN polcyclo(long n, long v); GEN polcyclo_eval(long n, GEN x); GEN dirdiv(GEN x, GEN y); GEN dirmul(GEN x, GEN y); GEN gen_indexsort(GEN x, void *E, int (*cmp)(void*,GEN,GEN)); GEN gen_indexsort_uniq(GEN x, void *E, int (*cmp)(void*,GEN,GEN)); long gen_search(GEN x, GEN y, long flag, void *data, int (*cmp)(void*,GEN,GEN)); GEN gen_setminus(GEN set1, GEN set2, int (*cmp)(GEN,GEN)); GEN gen_sort(GEN x, void *E, int (*cmp)(void*,GEN,GEN)); void gen_sort_inplace(GEN x, void *E, int (*cmp)(void*,GEN,GEN), GEN *perm); GEN gen_sort_uniq(GEN x, void *E, int (*cmp)(void*,GEN,GEN)); long getstack(void); long gettime(void); GEN gprec(GEN x, long l); GEN gprec_wtrunc(GEN x, long pr); GEN gprec_w(GEN x, long pr); GEN gtoset(GEN x); GEN indexlexsort(GEN x); GEN indexsort(GEN x); GEN indexvecsort(GEN x, GEN k); GEN laplace(GEN x); GEN lexsort(GEN x); GEN mathilbert(long n); GEN matqpascal(long n, GEN q); GEN merge_factor(GEN fx, GEN fy, void *data, int (*cmp)(void *,GEN,GEN)); GEN modreverse(GEN x); GEN RgXQ_reverse(GEN a, GEN T); GEN numtoperm(long n, GEN x); GEN permtonum(GEN x); GEN polhermite(long n, long v); GEN polhermite_eval(long n, GEN x); GEN pollegendre(long n, long v); GEN pollegendre_eval(long n, GEN x); GEN polint(GEN xa, GEN ya, GEN x, GEN *dy); GEN polchebyshev(long n, long kind, long v); GEN polchebyshev_eval(long n, long kind, GEN x); GEN polchebyshev1(long n, long v); GEN polchebyshev2(long n, long v); GEN polrecip(GEN x); GEN setintersect(GEN x, GEN y); long setisset(GEN x); GEN setminus(GEN x, GEN y); long setsearch(GEN x, GEN y, long flag); GEN setunion(GEN x, GEN y); GEN sort(GEN x); GEN sort_factor(GEN y, void *data, int (*cmp)(void*,GEN,GEN)); GEN stirling(long n, long m, long flag); GEN stirling1(pari_ulong n, pari_ulong m); GEN stirling2(pari_ulong n, pari_ulong m); long tablesearch(GEN T, GEN x, int (*cmp)(GEN,GEN)); GEN vecbinome(long n); GEN vecsort(GEN x, GEN k); GEN vecsort0(GEN x, GEN k, long flag); GEN ZV_indexsort(GEN L); long ZV_search(GEN x, GEN y); GEN ZV_sort(GEN L); GEN ZV_sort_uniq(GEN L); GEN ZV_union_shallow(GEN x, GEN y); GEN binaire(GEN x); long bittest(GEN x, long n); GEN gbitand(GEN x, GEN y); GEN gbitneg(GEN x, long n); GEN gbitnegimply(GEN x, GEN y); GEN gbitor(GEN x, GEN y); GEN gbittest(GEN x, long n); GEN gbitxor(GEN x, GEN y); GEN ibitand(GEN x, GEN y); GEN ibitnegimply(GEN x, GEN y); GEN ibitor(GEN x, GEN y); GEN ibitxor(GEN x, GEN y); GEN Buchquad(GEN D, double c1, double c2, long prec); GEN quadclassunit0(GEN x, long flag,GEN data, long prec); GEN quadhilbert(GEN D, long prec); GEN quadray(GEN bnf, GEN f, long prec); GEN bnfcompress(GEN bnf); GEN bnfinit0(GEN P,long flag,GEN data,long prec); GEN bnfnewprec(GEN nf, long prec); GEN bnfnewprec_shallow(GEN nf, long prec); GEN bnrnewprec(GEN bnr, long prec); GEN bnrnewprec_shallow(GEN bnr, long prec); GEN Buchall(GEN P, long flag, long prec); GEN Buchall_param(GEN P, double bach, double bach2, long nbrelpid, long flun, long prec); GEN isprincipal(GEN bnf, GEN x); GEN bnfisprincipal0(GEN bnf, GEN x,long flall); GEN isprincipalfact(GEN bnf, GEN C, GEN L, GEN f, long flag); GEN isprincipalfact_or_fail(GEN bnf, GEN C, GEN P, GEN e); GEN bnfisunit(GEN bignf, GEN x); GEN signunits(GEN bignf); GEN nfsign_units(GEN bnf, GEN archp, int add_zu); GEN ABC_to_bnr(GEN A, GEN B, GEN C, GEN *H, int gen); GEN Buchray(GEN bnf, GEN module, long flag); GEN bnrclassno(GEN bignf,GEN ideal); GEN bnrclassnolist(GEN bnf,GEN listes); GEN bnrconductor0(GEN A, GEN B, GEN C, long flag); GEN bnrconductor(GEN bnr, GEN H0, long flag); GEN bnrconductorofchar(GEN bnr,GEN chi); GEN bnrdisc0(GEN A, GEN B, GEN C, long flag); GEN bnrdisc(GEN bnr, GEN H, long flag); GEN bnrdisclist0(GEN bnf,GEN borne, GEN arch); GEN bnrinit0(GEN bignf,GEN ideal,long flag); long bnrisconductor0(GEN A, GEN B, GEN C); long bnrisconductor(GEN bnr, GEN H); GEN bnrisprincipal(GEN bnf, GEN x,long flag); GEN bnrsurjection(GEN bnr1, GEN bnr2); GEN buchnarrow(GEN bignf); long bnfcertify(GEN bnf); long bnfcertify0(GEN bnf, long flag); GEN decodemodule(GEN nf, GEN fa); GEN discrayabslist(GEN bnf,GEN listes); GEN discrayabslistarch(GEN bnf, GEN arch, long bound); GEN discrayabslistlong(GEN bnf, long bound); GEN idealmoddivisor(GEN bnr, GEN x); GEN isprincipalray(GEN bnf, GEN x); GEN isprincipalraygen(GEN bnf, GEN x); GEN rnfconductor(GEN bnf, GEN polrel, long flag); long rnfisabelian(GEN nf, GEN pol); GEN rnfnormgroup(GEN bnr, GEN polrel); GEN subgrouplist0(GEN bnr, GEN indexbound, long all); GEN bnfisnorm(GEN bnf,GEN x,long flag); GEN rnfisnorm(GEN S, GEN x, long flag); GEN rnfisnorminit(GEN bnf, GEN relpol, int polgalois); GEN bnfissunit(GEN bnf,GEN suni,GEN x); GEN bnfsunit(GEN bnf,GEN s,long PREC); long nfhilbert(GEN bnf,GEN a,GEN b); long nfhilbert0(GEN bnf,GEN a,GEN b,GEN p); long hyperell_locally_soluble(GEN pol,GEN p); long nf_hyperell_locally_soluble(GEN nf,GEN pol,GEN p); GEN closure_deriv(GEN G); long localvars_find(GEN pack, entree *ep); GEN localvars_read_str(const char *str, GEN pack); GEN snm_closure(entree *ep, GEN data); GEN strtoclosure(const char *s, long n, ...); GEN strtofunction(const char *s); GEN concat(GEN x, GEN y); GEN concat1(GEN x); GEN shallowconcat(GEN x, GEN y); GEN shallowconcat1(GEN x); GEN vconcat(GEN A, GEN B); enum { d_SILENT = 0, d_ACKNOWLEDGE, d_INITRC, d_RETURN }; GEN default0(const char *a, const char *b); long getrealprecision(void); int pari_is_default(const char *s); GEN sd_TeXstyle(const char *v, long flag); GEN sd_colors(const char *v, long flag); GEN sd_compatible(const char *v, long flag); GEN sd_datadir(const char *v, long flag); GEN sd_debug(const char *v, long flag); GEN sd_debugfiles(const char *v, long flag); GEN sd_debugmem(const char *v, long flag); GEN sd_factor_add_primes(const char *v, long flag); GEN sd_factor_proven(const char *v, long flag); GEN sd_format(const char *v, long flag); GEN sd_histsize(const char *v, long flag); GEN sd_log(const char *v, long flag); GEN sd_logfile(const char *v, long flag); GEN sd_new_galois_format(const char *v, long flag); GEN sd_output(const char *v, long flag); GEN sd_parisize(const char *v, long flag); GEN sd_path(const char *v, long flag); GEN sd_prettyprinter(const char *v, long flag); GEN sd_primelimit(const char *v, long flag); GEN sd_realprecision(const char *v, long flag); GEN sd_secure(const char *v, long flag); GEN sd_seriesprecision(const char *v, long flag); GEN sd_simplify(const char *v, long flag); GEN sd_strictmatch(const char *v, long flag); GEN sd_toggle(const char *v, long flag, const char *s, int *ptn); GEN sd_string(const char *v, long flag, const char *s, char **f); GEN sd_ulong(const char *v, long flag, const char *s, pari_ulong *ptn, pari_ulong Min, pari_ulong Max, const char **msg); GEN setdefault(const char *s, const char *v, long flag); long setrealprecision(long n, long *prec); GEN ellanalyticrank(GEN e, GEN eps, long prec); GEN ellL1(GEN e, long r, long prec); GEN ellconvertname(GEN s); GEN ellgenerators(GEN E); GEN ellidentify(GEN E); GEN ellsearch(GEN A); GEN ellsearchcurve(GEN name); void forell(void *E, long call(void*, GEN), long a, long b); GEN addell(GEN e, GEN z1, GEN z2); GEN akell(GEN e, GEN n); GEN anell(GEN e, long n); GEN bilhell(GEN e, GEN z1, GEN z2, long prec); void checkell(GEN e); void checkell_real(GEN e); void checkell_padic(GEN e); void checksmallell(GEN e); void checkellpt(GEN z); void checkell5(GEN e); GEN ell_to_small_red(GEN e, GEN *N); GEN ellap(GEN e, GEN p); GEN ellchangecurve(GEN e, GEN ch); GEN elldivpol(GEN e, long n, long v); GEN elleisnum(GEN om, long k, long flag, long prec); GEN elleta(GEN om, long prec); GEN ellglobalred(GEN e1); GEN ellgroup(GEN E, GEN p); GEN ellheight0(GEN e, GEN a, long flag,long prec); GEN ellinit(GEN x, long prec); GEN ellinit0(GEN x,long flag,long prec); GEN ellinit_padic(GEN x, GEN p, long prec); GEN ellinit_real(GEN x, long prec); GEN ellisoncurve(GEN e, GEN z); GEN elllseries(GEN e, GEN s, GEN A, long prec); GEN elllocalred(GEN e, GEN p1); GEN elllog(GEN e, GEN a, GEN g, GEN o); GEN ellminimalmodel(GEN E, GEN *ptv); GEN ellorder(GEN e, GEN p, GEN o); GEN ellordinate(GEN e, GEN x, long prec); GEN ellrandom(GEN e); long ellrootno(GEN e, GEN p); long ellrootno_global(GEN e, GEN N); GEN ellsigma(GEN om, GEN z, long flag, long prec); GEN elltaniyama(GEN e, long prec); GEN elltatepairing(GEN E, GEN t, GEN s, GEN m); GEN elltors0(GEN e, long flag); GEN ellweilpairing(GEN E, GEN t, GEN s, GEN m); GEN ellwp0(GEN e, GEN z, long flag, long prec, long PREC); GEN ellzeta(GEN om, GEN z, long prec); GEN ghell(GEN e, GEN a, long prec); GEN mathell(GEN e, GEN x, long prec); int oncurve(GEN e, GEN z); GEN orderell(GEN e, GEN p); GEN ellchangepoint(GEN x, GEN ch); GEN ellchangepointinv(GEN x, GEN ch); GEN pointell(GEN e, GEN z, long prec); GEN powell(GEN e, GEN z, GEN n); GEN smallellinit(GEN x); GEN subell(GEN e, GEN z1, GEN z2); GEN elltors(GEN e); GEN weipell(GEN e, long precdl); GEN zell(GEN e, GEN z, long prec); GEN ellmodulareqn(long l, long vx, long vy); GEN ellsea(GEN E, GEN p, long early_abort); GEN GENtoGENstr_nospace(GEN x); GEN GENtoGENstr(GEN x); char* GENtoTeXstr(GEN x); char* GENtostr(GEN x); GEN Str(GEN g); GEN Strchr(GEN g); GEN Strexpand(GEN g); GEN Strtex(GEN g); void brute(GEN g, char format, long dec); void dbgGEN(GEN x, long nb); void error0(GEN g); void dbg_pari_heap(void); int file_is_binary(FILE *f); void err_flush(void); void err_printf(const char* pat, ...); GEN gp_read_file(char *s); GEN gp_read_stream(FILE *f); GEN gp_readvec_file(char *s); GEN gp_readvec_stream(FILE *f); char* itostr(GEN x); void matbrute(GEN g, char format, long dec); char* os_getenv(const char *s); void (*os_signal(int sig, void (*f)(int)))(int); void outmat(GEN x); void output(GEN x); char* RgV_to_str(GEN g, long flag); GEN pari_add_hist(GEN z); void pari_ask_confirm(const char *s); void pari_fclose(pariFILE *f); void pari_flush(void); pariFILE* pari_fopen(const char *s, const char *mode); pariFILE* pari_fopen_or_fail(const char *s, const char *mode); pariFILE* pari_fopengz(const char *s); void pari_fprintf(FILE *file, const char *fmt, ...); GEN pari_get_hist(long p); char* pari_get_homedir(const char *user); int pari_is_dir(const char *name); int pari_is_file(const char *name); int pari_last_was_newline(void); void pari_set_last_newline(int last); pari_ulong pari_nb_hist(void); void pari_printf(const char *fmt, ...); void pari_putc(char c); void pari_puts(const char *s); pariFILE* pari_safefopen(const char *s, const char *mode); char* pari_sprintf(const char *fmt, ...); int pari_stdin_isatty(void); char* pari_strdup(const char *s); char* pari_strndup(const char *s, long n); char* pari_unique_dir(const char *s); char* pari_unique_filename(const char *s); void pari_unlink(const char *s); void pari_vfprintf(FILE *file, const char *fmt, va_list ap); void pari_vprintf(const char *fmt, va_list ap); char* pari_vsprintf(const char *fmt, va_list ap); char* path_expand(const char *s); void out_print0(PariOUT *out, GEN g, long flag); void out_printf(PariOUT *out, const char *fmt, ...); void out_putc(PariOUT *out, char c); void out_puts(PariOUT *out, const char *s); void out_term_color(PariOUT *out, long c); void out_vprintf(PariOUT *out, const char *fmt, va_list ap); void print(GEN g); enum { f_RAW = 0, f_PRETTYMAT = 1, f_PRETTY = 3, f_TEX = 4 }; void print0(GEN g, long flag); void print1(GEN g); void printf0(const char *fmt, GEN args); void printtex(GEN g); char* stack_strdup(const char *s); void strftime_expand(const char *s, char *buf, long max); GEN Strprintf(const char *fmt, GEN args); FILE* switchin(const char *name); void switchout(const char *name); void term_color(long c); char* term_get_color(char *s, long c); void texe(GEN g, char format, long dec); const char* type_name(long t); void warning0(GEN g); void write0(const char *s, GEN g); void write1(const char *s, GEN g); void writebin(const char *name, GEN x); void writetex(const char *s, GEN g); GEN break0(long n); GEN closure_callgen1(GEN C, GEN x); GEN closure_callgen2(GEN C, GEN x, GEN y); GEN closure_callgenall(GEN C, long n, ...); GEN closure_callgenvec(GEN C, GEN args); void closure_callvoid1(GEN C, GEN x); long closure_context(long start); void closure_disassemble(GEN n); void closure_err(void); GEN closure_evalbrk(GEN C, long *status); GEN closure_evalgen(GEN C); GEN closure_evalnobrk(GEN C); GEN closure_evalres(GEN C); void closure_evalvoid(GEN C); GEN closure_trapgen(GEN C, long numerr); GEN get_lex(long vn); GEN gp_call(void *E, GEN x); long gp_callbool(void *E, GEN x); long gp_callvoid(void *E, GEN x); GEN gp_eval(void *E, GEN x); long gp_evalvoid(void *E, GEN x); long loop_break(void); GEN next0(long n); void pop_lex(long n); void push_lex(GEN a, GEN C); GEN return0(GEN x); void set_lex(long vn, GEN x); GEN FF_1(GEN a); GEN FF_Z_Z_muldiv(GEN x, GEN y, GEN z); GEN FF_Q_add(GEN x, GEN y); GEN FF_Z_add(GEN a, GEN b); GEN FF_Z_mul(GEN a, GEN b); GEN FF_add(GEN a, GEN b); GEN FF_charpoly(GEN x); int FF_equal0(GEN x); int FF_equal1(GEN x); int FF_equalm1(GEN x); GEN FF_conjvec(GEN x); GEN FF_div(GEN a, GEN b); int FF_equal(GEN a, GEN b); GEN FF_inv(GEN a); long FF_issquare(GEN x); long FF_issquareall(GEN x, GEN *pt); long FF_ispower(GEN x, GEN K, GEN *pt); GEN FF_log(GEN a, GEN b, GEN o); GEN FF_minpoly(GEN x); GEN FF_mod(GEN x); GEN FF_mul(GEN a, GEN b); GEN FF_mul2n(GEN a, long n); GEN FF_neg(GEN a); GEN FF_neg_i(GEN a); GEN FF_norm(GEN x); GEN FF_order(GEN x, GEN o); GEN FF_p(GEN x); GEN FF_p_i(GEN x); GEN FF_pow(GEN x, GEN n); GEN FF_primroot(GEN x, GEN *o); int FF_samefield(GEN x, GEN y); GEN FF_sqr(GEN a); GEN FF_sqrt(GEN a); GEN FF_sqrtn(GEN x, GEN n, GEN *zetan); GEN FF_sub(GEN x, GEN y); GEN FF_to_FpXQ(GEN x); GEN FF_to_FpXQ_i(GEN x); GEN FF_trace(GEN x); GEN FF_zero(GEN a); GEN FFX_factor(GEN f, GEN x); GEN FFX_roots(GEN f, GEN x); GEN Z_FF_div(GEN a, GEN b); GEN ffgen(GEN T, long v); GEN fflog(GEN x, GEN g, GEN o); GEN fforder(GEN x, GEN o); GEN ffprimroot(GEN x, GEN *o); GEN ffrandom(GEN ff); int is_Z_factor(GEN f); GEN checkgal(GEN gal); GEN checkgroup(GEN g, GEN *S); GEN galois_group(GEN gal); GEN galoisconj(GEN nf, GEN d); GEN galoisconj0(GEN nf, long flag, GEN d, long prec); GEN galoisexport(GEN gal, long format); GEN galoisfixedfield(GEN gal, GEN v, long flag, long y); GEN galoisidentify(GEN gal); GEN galoisinit(GEN nf, GEN den); GEN galoisisabelian(GEN gal, long flag); long galoisisnormal(GEN gal, GEN sub); GEN galoispermtopol(GEN gal, GEN perm); GEN galoissubgroups(GEN G); GEN galoissubfields(GEN G, long flag, long v); long numberofconjugates(GEN T, long pdepart); GEN vandermondeinverse(GEN L, GEN T, GEN den, GEN prep); GEN conjvec(GEN x,long prec); GEN gadd(GEN x, GEN y); GEN gaddsg(long x, GEN y); GEN gconj(GEN x); GEN gdiv(GEN x, GEN y); GEN gdivgs(GEN x, long s); GEN ginv(GEN x); GEN gmul(GEN x, GEN y); GEN gmul2n(GEN x, long n); GEN gmulsg(long s, GEN y); GEN gsqr(GEN x); GEN gsub(GEN x, GEN y); GEN gsubsg(long x, GEN y); GEN inv_ser(GEN b); GEN mulcxI(GEN x); GEN mulcxmI(GEN x); GEN galoisnbpol(long a); GEN galoisgetpol(long a, long b, long s); GEN gassoc_proto(GEN f(GEN,GEN),GEN,GEN); GEN map_proto_G(GEN f(GEN), GEN x); GEN map_proto_GG(GEN f(GEN,GEN), GEN x, GEN n); GEN map_proto_GL(GEN f(GEN,long), GEN x, long y); GEN map_proto_lG(long f(GEN), GEN x); GEN map_proto_lGG(long f(GEN,GEN), GEN x, GEN n); GEN map_proto_lGL(long f(GEN,long), GEN x, long y); long Q_pval(GEN x, GEN p); long RgX_val(GEN x); long RgX_valrem(GEN x, GEN *z); long RgX_valrem_inexact(GEN x, GEN *Z); long ZV_pval(GEN x, GEN p); long ZV_pvalrem(GEN x, GEN p, GEN *px); long ZV_lval(GEN x, pari_ulong p); long ZV_lvalrem(GEN x, pari_ulong p, GEN *px); long ZX_lvalrem(GEN x, pari_ulong p, GEN *px); long ZX_lval(GEN x, pari_ulong p); long ZX_pval(GEN x, GEN p); long ZX_pvalrem(GEN x, GEN p, GEN *px); long Z_lval(GEN n, pari_ulong p); long Z_lvalrem(GEN n, pari_ulong p, GEN *py); long Z_pval(GEN n, GEN p); long Z_pvalrem(GEN x, GEN p, GEN *py); GEN cgetp(GEN x); GEN cvstop2(long s, GEN y); GEN cvtop(GEN x, GEN p, long l); GEN cvtop2(GEN x, GEN y); GEN gabs(GEN x, long prec); void gaffect(GEN x, GEN y); void gaffsg(long s, GEN x); int gcmp(GEN x, GEN y); int gequal0(GEN x); int gequal1(GEN x); int gcmpX(GEN x); int gequalm1(GEN x); int gcmpsg(long x, GEN y); GEN gcvtop(GEN x, GEN p, long r); int gequal(GEN x, GEN y); int gequalsg(long s, GEN x); long gexpo(GEN x); long ggval(GEN x, GEN p); int gidentical(GEN x, GEN y); long glength(GEN x); GEN gmax(GEN x, GEN y); GEN gmaxgs(GEN x, long y); GEN gmin(GEN x, GEN y); GEN gmings(GEN x, long y); GEN gneg(GEN x); GEN gneg_i(GEN x); GEN RgX_to_ser(GEN x, long l); GEN RgX_to_ser_inexact(GEN x, long l); int gsigne(GEN x); GEN gtolist(GEN x); long gtolong(GEN x); int lexcmp(GEN x, GEN y); GEN listinsert(GEN list, GEN object, long index); void listpop(GEN L, long index); GEN listput(GEN list, GEN object, long index); void listsort(GEN list, long flag); GEN matsize(GEN x); GEN mklistcopy(GEN x); GEN normalize(GEN x); GEN normalizepol(GEN x); GEN normalizepol_approx(GEN x, long lx); GEN normalizepol_lg(GEN x, long lx); pari_ulong padic_to_Fl(GEN x, pari_ulong p); GEN padic_to_Fp(GEN x, GEN Y); GEN quadtofp(GEN x, long l); long sizedigit(GEN x); long u_lval(pari_ulong x, pari_ulong p); long u_lvalrem(pari_ulong x, pari_ulong p, pari_ulong *py); long u_pval(pari_ulong x, GEN p); long u_pvalrem(pari_ulong x, GEN p, pari_ulong *py); GEN vecmax(GEN x); GEN vecmin(GEN x); long z_lval(long s, pari_ulong p); long z_lvalrem(long s, pari_ulong p, long *py); long z_pval(long n, GEN p); long z_pvalrem(long n, GEN p, long *py); GEN RgM_mulreal(GEN x, GEN y); GEN RgX_RgM_eval(GEN x, GEN y); GEN RgX_RgM_eval_col(GEN x, GEN M, long c); GEN RgX_RgMV_eval(GEN x, GEN y); GEN RgX_deflate_max(GEN x0, long *m); GEN ceil_safe(GEN x); GEN ceilr(GEN x); GEN centerlift(GEN x); GEN centerlift0(GEN x,long v); GEN compo(GEN x, long n); GEN deg1pol(GEN x1, GEN x0,long v); GEN deg1pol_shallow(GEN x1, GEN x0,long v); long degree(GEN x); GEN denom(GEN x); GEN deriv(GEN x, long v); GEN derivser(GEN x); GEN diffop(GEN x, GEN v, GEN dv); GEN diffop0(GEN x, GEN v, GEN dv, long n); GEN diviiround(GEN x, GEN y); GEN divrem(GEN x, GEN y, long v); GEN floor_safe(GEN x); GEN gand(GEN x, GEN y); GEN gceil(GEN x); GEN gcvtoi(GEN x, long *e); GEN gdeflate(GEN x, long v, long d); GEN gdivent(GEN x, GEN y); GEN gdiventgs(GEN x, long y); GEN gdiventsg(long x, GEN y); GEN gdiventres(GEN x, GEN y); GEN gdivmod(GEN x, GEN y, GEN *pr); GEN gdivround(GEN x, GEN y); int gdvd(GEN x, GEN y); GEN geq(GEN x, GEN y); GEN geval(GEN x); GEN gfloor(GEN x); GEN gtrunc2n(GEN x, long s); GEN gfrac(GEN x); GEN gge(GEN x, GEN y); GEN ggrando(GEN x, long n); GEN ggt(GEN x, GEN y); GEN gimag(GEN x); GEN gle(GEN x, GEN y); GEN glt(GEN x, GEN y); GEN gmod(GEN x, GEN y); GEN gmodgs(GEN x, long y); GEN gmodsg(long x, GEN y); GEN gmodulo(GEN x,GEN y); GEN gmodulsg(long x, GEN y); GEN gmodulss(long x, long y); GEN gne(GEN x, GEN y); GEN gnot(GEN x); GEN gor(GEN x, GEN y); GEN gpolvar(GEN y); long gprecision(GEN x); GEN greal(GEN x); GEN grndtoi(GEN x, long *e); GEN ground(GEN x); GEN gshift(GEN x, long n); GEN gsubst(GEN x, long v, GEN y); GEN gsubstpol(GEN x, GEN v, GEN y); GEN gsubstvec(GEN x, GEN v, GEN y); GEN gtocol(GEN x); GEN gtopoly(GEN x, long v); GEN gtopolyrev(GEN x, long v); GEN gtoser(GEN x, long v, long precdl); GEN gtovec(GEN x); GEN gtovecrev(GEN x); GEN gtovecsmall(GEN x); GEN gtrunc(GEN x); long gvar(GEN x); long gvar2(GEN x); GEN hqfeval(GEN q, GEN x); GEN imag_i(GEN x); GEN integ(GEN x, long v); int iscomplex(GEN x); int isexactzero(GEN g); int isrationalzeroscalar(GEN g); int isinexact(GEN x); int isinexactreal(GEN x); int isint(GEN n, GEN *ptk); int isrationalzero(GEN g); int issmall(GEN n, long *ptk); GEN lift(GEN x); GEN lift0(GEN x,long v); GEN mkcoln(long n, ...); GEN mkintn(long n, ...); GEN mkpoln(long n, ...); GEN mkvecn(long n, ...); GEN mkvecsmalln(long n, ...); GEN mulreal(GEN x, GEN y); GEN numer(GEN x); long padicprec(GEN x, GEN p); GEN polcoeff0(GEN x,long n,long v); GEN polcoeff_i(GEN x, long n, long v); long poldegree(GEN x,long v); GEN poleval(GEN x, GEN y); GEN pollead(GEN x,long v); long precision(GEN x); GEN precision0(GEN x,long n); GEN qf_apply_RgM(GEN q, GEN M); GEN qf_apply_ZM(GEN q, GEN M); GEN qfeval(GEN q, GEN x); GEN qfevalb(GEN q, GEN x, GEN y); GEN real_i(GEN x); GEN recip(GEN x); GEN round0(GEN x, GEN *pte); GEN roundr(GEN x); GEN roundr_safe(GEN x); GEN scalarpol(GEN x, long v); GEN scalarser(GEN x, long v, long prec); GEN simplify(GEN x); GEN simplify_shallow(GEN x); GEN tayl(GEN x, long v, long precdl); GEN toser_i(GEN x); GEN trunc0(GEN x, GEN *pte); GEN uu32toi(pari_ulong a, pari_ulong b); long group_ident(GEN G, GEN S); long group_ident_trans(GEN G, GEN S); hashtable *hash_create(pari_ulong minsize, pari_ulong (*hash)(void*), int (*eq)(void*,void*)); void hash_insert(hashtable *h, void *k, void *v); hashentry *hash_search(hashtable *h, void *k); hashentry *hash_remove(hashtable *h, void *k); void hash_destroy(hashtable *h); pari_ulong hash_str(const char *str); pari_ulong hash_str2(const char *s); pari_ulong hash_GEN(GEN x); GEN Frobeniusform(GEN V, long n); GEN ZM_hnf(GEN x); GEN ZM_hnfall(GEN A, GEN *ptB, long remove); GEN ZM_hnfcenter(GEN M); GEN ZM_hnflll(GEN A, GEN *ptB, int remove); GEN ZM_hnfmod(GEN x, GEN d); GEN ZM_hnfmodall(GEN x, GEN dm, long flag); GEN ZM_hnfmodid(GEN x, GEN d); GEN ZM_hnfperm(GEN A, GEN *ptU, GEN *ptperm); void ZM_snfclean(GEN d, GEN u, GEN v); GEN ZM_snf(GEN x); GEN ZM_snf_group(GEN H, GEN *newU, GEN *newUi); GEN ZM_snfall(GEN x, GEN *ptU, GEN *ptV); GEN ZM_snfall_i(GEN x, GEN *ptU, GEN *ptV, int return_vec); GEN gsmith(GEN x); GEN gsmithall(GEN x); GEN hnf(GEN x); GEN hnf_divscale(GEN A, GEN B,GEN t); GEN hnf_solve(GEN A, GEN B); GEN hnf_invimage(GEN A, GEN b); GEN hnfall(GEN x); int hnfdivide(GEN A, GEN B); GEN hnflll(GEN x); GEN hnfmerge_get_1(GEN A, GEN B); GEN hnfmod(GEN x, GEN d); GEN hnfmodid(GEN x,GEN p); GEN hnfperm(GEN x); GEN matfrobenius(GEN M, long flag, long v); GEN mathnf0(GEN x, long flag); GEN matsnf0(GEN x, long flag); GEN smith(GEN x); GEN smithall(GEN x); GEN smithclean(GEN z); GEN gnextprime(GEN n); GEN gprecprime(GEN n); int is_357_power(GEN x, GEN *pt, pari_ulong *mask); int is_pth_power(GEN x, GEN *pt, pari_ulong *curexp, pari_ulong cutoffbits); GEN nextprime(GEN n); GEN precprime(GEN n); pari_ulong unextprime(pari_ulong n); void allocatemem(pari_ulong newsize); long timer_delay(pari_timer *T); long timer_get(pari_timer *T); void timer_start(pari_timer *T); int chk_gerepileupto(GEN x); GENbin* copy_bin(GEN x); GENbin* copy_bin_canon(GEN x); void dbg_block(void); void dbg_gerepile(pari_sp av); void dbg_gerepileupto(GEN q); void dbg_release(void); long err_catch(long errnum, jmp_buf *penv); void err_leave(long n); GEN gclone(GEN x); void gclone_refc(GEN x); GEN gcopy(GEN x); GEN gcopy_avma(GEN x, pari_sp *AVMA); GEN gcopy_lg(GEN x, long lx); GEN gerepile(pari_sp ltop, pari_sp lbot, GEN q); void gerepileallsp(pari_sp av, pari_sp tetpil, int n, ...); void gerepilecoeffssp(pari_sp av, pari_sp tetpil, long *g, int n); void gerepilemanysp(pari_sp av, pari_sp tetpil, GEN* g[], int n); GEN getheap(void); void gp_context_save(struct gp_context* rec); void gp_context_restore(struct gp_context* rec); long gsizeword(GEN x); long gsizebyte(GEN x); void gunclone(GEN x); void gunclone_deep(GEN x); GEN listcopy(GEN x); void timer_printf(pari_timer *T, const char *format, ...); void msgtimer(const char *format, ...); GEN newblock(size_t n); void pari_add_function(entree *ep); void pari_add_module(entree *ep); void pari_add_defaults_module(entree *ep); void pari_add_oldmodule(entree *ep); void pari_close(void); void pari_close_opts(pari_ulong init_opts); int pari_daemon(void); void pari_err(int numerr, ...); void pari_init_opts(size_t parisize, pari_ulong maxprime, pari_ulong init_opts); void pari_init(size_t parisize, pari_ulong maxprime); void pari_stackcheck_init(void *stack_base); void pari_sig_init(void (*f)(int)); void pari_thread_alloc(struct pari_thread *t, size_t s, GEN arg); void pari_thread_close(void); void pari_thread_free(struct pari_thread *t); void pari_thread_init(void); GEN pari_thread_start(struct pari_thread *t); GEN pari_version(void); void pari_warn(int numerr, ...); GEN trap0(const char *e, GEN f, GEN r); void shiftaddress(GEN x, long dec); void shiftaddress_canon(GEN x, long dec); long timer(void); long timer2(void); void traverseheap( void(*f)(GEN, void *), void *data ); GEN intcirc(void *E, GEN (*eval) (void *, GEN), GEN a, GEN R, GEN tab, long prec); GEN intfouriercos(void *E, GEN (*eval) (void *, GEN), GEN a, GEN b, GEN x, GEN tab, long prec); GEN intfourierexp(void *E, GEN (*eval)(void *, GEN), GEN a, GEN b, GEN x, GEN tab, long prec); GEN intfouriersin(void *E, GEN (*eval) (void *, GEN), GEN a, GEN b, GEN x, GEN tab, long prec); GEN intfuncinit(void *E, GEN (*eval) (void *, GEN), GEN a, GEN b, long m, long flag, long prec); GEN intlaplaceinv(void *E, GEN (*eval) (void *, GEN), GEN sig, GEN x, GEN tab, long prec); GEN intmellininv(void *E, GEN (*eval) (void *, GEN), GEN sig, GEN x, GEN tab, long prec); GEN intmellininvshort(GEN sig, GEN x, GEN tab, long prec); GEN intnum(void *E, GEN (*eval) (void *, GEN), GEN a, GEN b, GEN tab, long prec); GEN intnuminit(GEN a, GEN b, long m, long prec); GEN intnuminitgen(void *E, GEN (*eval) (void *, GEN), GEN a, GEN b, long m, long flext, long prec); GEN intnumromb(void *E, GEN (*eval) (void *, GEN), GEN a, GEN b, long flag, long prec); long intnumstep(long prec); GEN sumnum(void *E, GEN (*f) (void *, GEN), GEN a, GEN sig, GEN tab, long flag, long prec); GEN sumnumalt(void *E, GEN (*f) (void *, GEN), GEN a, GEN s, GEN tab, long flag, long prec); GEN sumnuminit(GEN sig, long m, long sgn, long prec); GEN padicfields0(GEN p, GEN n, long flag); GEN padicfields(GEN p, long m, long d, long flag); GEN rnfkummer(GEN bnr, GEN subgroup, long all, long prec); GEN ZM_lll_norms(GEN x, double D, long flag, GEN *B); GEN kerint(GEN x); GEN lll(GEN x); GEN lllfp(GEN x, double D, long flag); GEN lllgen(GEN x); GEN lllgram(GEN x); GEN lllgramgen(GEN x); GEN lllgramint(GEN x); GEN lllgramkerim(GEN x); GEN lllgramkerimgen(GEN x); GEN lllint(GEN x); GEN lllintpartial(GEN mat); GEN lllintpartial_inplace(GEN mat); GEN lllkerim(GEN x); GEN lllkerimgen(GEN x); GEN matkerint0(GEN x,long flag); GEN qflll0(GEN x, long flag); GEN qflllgram0(GEN x, long flag); GEN member_a1(GEN x); GEN member_a2(GEN x); GEN member_a3(GEN x); GEN member_a4(GEN x); GEN member_a6(GEN x); GEN member_area(GEN x); GEN member_b2(GEN x); GEN member_b4(GEN x); GEN member_b6(GEN x); GEN member_b8(GEN x); GEN member_bid(GEN x); GEN member_bnf(GEN x); GEN member_c4(GEN x); GEN member_c6(GEN x); GEN member_clgp(GEN x); GEN member_codiff(GEN x); GEN member_cyc(GEN clg); GEN member_diff(GEN x); GEN member_disc(GEN x); GEN member_e(GEN x); GEN member_eta(GEN x); GEN member_f(GEN x); GEN member_fu(GEN x); GEN member_futu(GEN x); GEN member_gen(GEN x); GEN member_group(GEN x); GEN member_index(GEN x); GEN member_j(GEN x); GEN member_mod(GEN x); GEN member_nf(GEN x); GEN member_no(GEN clg); GEN member_omega(GEN x); GEN member_orders(GEN x); GEN member_p(GEN x); GEN member_pol(GEN x); GEN member_reg(GEN x); GEN member_r1(GEN x); GEN member_r2(GEN x); GEN member_roots(GEN x); GEN member_sign(GEN x); GEN member_t2(GEN x); GEN member_tate(GEN x); GEN member_tufu(GEN x); GEN member_tu(GEN x); GEN member_w(GEN x); GEN member_zk(GEN x); GEN member_zkst(GEN bid); pari_ulong Fl_inv(pari_ulong x, pari_ulong p); int Fp_ratlift(GEN x, GEN m, GEN amax, GEN bmax, GEN *a, GEN *b); int absi_cmp(GEN x, GEN y); int absi_equal(GEN x, GEN y); int absr_cmp(GEN x, GEN y); GEN addii_sign(GEN x, long sx, GEN y, long sy); GEN addir_sign(GEN x, long sx, GEN y, long sy); GEN addrr_sign(GEN x, long sx, GEN y, long sy); GEN addsi_sign(long x, GEN y, long sy); GEN addsr(long x, GEN y); GEN addumului(pari_ulong a, pari_ulong b, GEN Y); void affir(GEN x, GEN y); void affrr(GEN x, GEN y); GEN bezout(GEN a, GEN b, GEN *u, GEN *v); long cbezout(long a,long b,long *uu,long *vv); int cmpii(GEN x, GEN y); int cmprr(GEN x, GEN y); long dblexpo(double x); pari_ulong dblmantissa(double x); GEN dbltor(double x); GEN diviiexact(GEN x, GEN y); GEN divir(GEN x, GEN y); GEN divis(GEN y, long x); GEN divis_rem(GEN x, long y, long *rem); GEN diviu_rem(GEN y, pari_ulong x, pari_ulong *rem); GEN diviuexact(GEN x, pari_ulong y); GEN divri(GEN x, GEN y); GEN divrr(GEN x, GEN y); GEN divrs(GEN x, long y); GEN divru(GEN x, pari_ulong y); GEN divsi(long x, GEN y); GEN divsr(long x, GEN y); GEN divur(pari_ulong x, GEN y); GEN dvmdii(GEN x, GEN y, GEN *z); int equalii(GEN x, GEN y); int equalrr(GEN x, GEN y); GEN floorr(GEN x); GEN gcdii(GEN x, GEN y); GEN int2n(long n); GEN int2u(pari_ulong n); GEN int_normalize(GEN x, long known_zero_words); int invmod(GEN a, GEN b, GEN *res); pari_ulong invmod2BIL(pari_ulong b); GEN invr(GEN b); GEN mantissa_real(GEN x, long *e); GEN modii(GEN x, GEN y); void modiiz(GEN x, GEN y, GEN z); GEN mulii(GEN x, GEN y); GEN mulir(GEN x, GEN y); GEN mulrr(GEN x, GEN y); GEN mulsi(long x, GEN y); GEN mulsr(long x, GEN y); GEN mulss(long x, long y); GEN mului(pari_ulong x, GEN y); GEN mulur(pari_ulong x, GEN y); GEN muluu(pari_ulong x, pari_ulong y); int ratlift(GEN x, GEN m, GEN amax, GEN bmax, GEN *a, GEN *b); GEN remi2n(GEN x, long n); double rtodbl(GEN x); GEN shifti(GEN x, long n); GEN sqri(GEN x); GEN sqrr(GEN x); GEN sqrs(long x); GEN sqrtr_abs(GEN x); GEN sqrtremi(GEN S, GEN *R); GEN sqru(pari_ulong x); GEN subsr(long x, GEN y); GEN truedvmdii(GEN x, GEN y, GEN *z); GEN truedvmdis(GEN x, long y, GEN *z); GEN truedvmdsi(long x, GEN y, GEN *z); GEN trunc2nr(GEN x, long n); GEN trunc2nr_lg(GEN x, long lx, long n); GEN truncr(GEN x); pari_ulong umodiu(GEN y, pari_ulong x); long vals(pari_ulong x); GEN FpM_ratlift(GEN M, GEN mod, GEN amax, GEN bmax, GEN denom); GEN FpX_ratlift(GEN P, GEN mod, GEN amax, GEN bmax, GEN denom); GEN nffactor(GEN nf,GEN x); GEN nffactormod(GEN nf,GEN pol,GEN pr); GEN nfgcd(GEN P, GEN Q, GEN nf, GEN den); GEN nfgcd_all(GEN P, GEN Q, GEN T, GEN den, GEN *Pnew); GEN nfroots(GEN nf,GEN pol); GEN polfnf(GEN a, GEN t); GEN rootsof1(GEN x); GEN rootsof1_kannan(GEN nf); extern const char *paricfg_datadir; extern const char *paricfg_version; extern const char *paricfg_buildinfo; extern const long paricfg_version_code; extern const char *paricfg_vcsversion; GEN numbpart(GEN x); GEN partitions(long n, long amax); GEN abelian_group(GEN G); GEN cyclicgroup(GEN g, long s); GEN cyc_pow(GEN cyc, long exp); GEN cyc_pow_perm(GEN cyc, long exp); GEN dicyclicgroup(GEN g1, GEN g2, long s1, long s2); GEN group_abelianHNF(GEN G, GEN L); GEN group_abelianSNF(GEN G, GEN L); long group_domain(GEN G); GEN group_elts(GEN G, long n); GEN group_export(GEN G, long format); long group_isA4S4(GEN G); long group_isabelian(GEN G); GEN group_leftcoset(GEN G, GEN g); long group_order(GEN G); long group_perm_normalize(GEN N, GEN g); GEN group_quotient(GEN G, GEN H); GEN group_rightcoset(GEN G, GEN g); GEN group_set(GEN G, long n); long group_subgroup_isnormal(GEN G, GEN H); GEN group_subgroups(GEN G); GEN groupelts_abelian_group(GEN S); GEN groupelts_center(GEN S); GEN groupelts_set(GEN G, long n); int perm_commute(GEN p, GEN q); GEN perm_cycles(GEN v); long perm_order(GEN perm); GEN perm_pow(GEN perm, long exp); GEN quotient_group(GEN C, GEN G); GEN quotient_perm(GEN C, GEN p); GEN quotient_subgroup_lift(GEN C, GEN H, GEN S); GEN subgroups_tableset(GEN S, long n); long tableset_find_index(GEN tbl, GEN set); GEN trivialgroup(void); GEN vecperm_orbits(GEN v, long n); int vec_is1to1(GEN v); int vec_isconst(GEN v); long vecsmall_duplicate(GEN x); long vecsmall_duplicate_sorted(GEN x); GEN vecsmall_indexsort(GEN V); void vecsmall_sort(GEN V); GEN vecsmall_uniq(GEN V); GEN vecsmall_uniq_sorted(GEN V); GEN vecvecsmall_indexsort(GEN x); GEN vecvecsmall_sort(GEN x); long vecvecsmall_search(GEN x, GEN y, long flag); long Flx_nbfact(GEN z, pari_ulong p); GEN Flx_nbfact_by_degree(GEN z, long *nb, pari_ulong p); long Flx_nbroots(GEN f, pari_ulong p); GEN FpX_degfact(GEN f, GEN p); int FpX_is_irred(GEN f, GEN p); int FpX_is_totally_split(GEN f, GEN p); GEN FpX_factor(GEN f, GEN p); GEN FpX_factorff(GEN P, GEN p, GEN T); long FpX_nbfact(GEN f, GEN p); long FpX_nbroots(GEN f, GEN p); GEN FpX_oneroot(GEN f, GEN p); GEN FpX_roots(GEN f, GEN p); GEN FpX_rootsff(GEN P, GEN p, GEN T); GEN FqX_deriv(GEN f, GEN T, GEN p); GEN FqX_factor(GEN x, GEN T, GEN p); long FqX_is_squarefree(GEN P, GEN T, GEN p); long FqX_nbfact(GEN u, GEN T, GEN p); long FqX_nbroots(GEN f, GEN T, GEN p); GEN FqX_roots(GEN f, GEN T, GEN p); GEN factcantor(GEN x, GEN p); GEN factorff(GEN f, GEN p, GEN a); GEN factormod0(GEN f, GEN p,long flag); GEN factorpadic0(GEN f,GEN p,long r,long flag); GEN factorpadic(GEN x, GEN p, long r); GEN gdeuc(GEN x, GEN y); GEN grem(GEN x, GEN y); GEN padicappr(GEN f, GEN a); GEN poldivrem(GEN x, GEN y, GEN *pr); GEN polrootsff(GEN f, GEN p, GEN T); GEN rootmod0(GEN f, GEN p,long flag); GEN rootpadic(GEN f, GEN p, long r); GEN rootpadicfast(GEN f, GEN p, long e); GEN Zp_sqrtlift(GEN b, GEN a, GEN p, long e); GEN Zp_sqrtnlift(GEN b, GEN n, GEN a, GEN p, long e); GEN ZpX_liftroot(GEN f, GEN a, GEN p, long e); GEN ZpX_liftroots(GEN f, GEN S, GEN q, long e); GEN ZpXQX_liftroot(GEN f, GEN a, GEN T, GEN p, long e); GEN ZpXQ_sqrtnlift(GEN b, GEN n, GEN a, GEN T, GEN p, long e); GEN ZpX_liftfact(GEN pol, GEN Q, GEN T, GEN p, long e, GEN pe); GEN polhensellift(GEN pol, GEN fct, GEN p, long exp); pari_ulong quadratic_prec_mask(long n); GEN QX_factor(GEN x); GEN ZX_factor(GEN x); long ZX_is_irred(GEN x); GEN ZX_squff(GEN f, GEN *ex); GEN Q_content(GEN x); GEN Q_denom(GEN x); GEN Q_div_to_int(GEN x, GEN c); GEN Q_gcd(GEN x, GEN y); GEN Q_mul_to_int(GEN x, GEN c); GEN Q_muli_to_int(GEN x, GEN d); GEN Q_primitive_part(GEN x, GEN *ptc); GEN Q_primpart(GEN x); GEN Q_remove_denom(GEN x, GEN *ptd); GEN RgXQ_charpoly(GEN x, GEN T, long v); GEN RgXQ_inv(GEN x, GEN y); GEN RgX_disc(GEN x); GEN RgX_extgcd(GEN x, GEN y, GEN *U, GEN *V); GEN RgX_extgcd_simple(GEN a, GEN b, GEN *pu, GEN *pv); GEN RgX_gcd(GEN x, GEN y); GEN RgX_gcd_simple(GEN x, GEN y); int RgXQ_ratlift(GEN y, GEN x, long amax, long bmax, GEN *P, GEN *Q); GEN RgX_resultant_all(GEN P, GEN Q, GEN *sol); long RgX_type(GEN x, GEN *ptp, GEN *ptpol, long *ptpa); void RgX_type_decode(long x, long *t1, long *t2); int RgX_type_is_composite(long t); GEN ZX_content(GEN x); GEN centermod(GEN x, GEN p); GEN centermod_i(GEN x, GEN p, GEN ps2); GEN centermodii(GEN x, GEN p, GEN po2); GEN content(GEN x); GEN deg1_from_roots(GEN L, long v); GEN divide_conquer_assoc(GEN x, void *data, GEN (*mul)(void*,GEN,GEN)); GEN divide_conquer_prod(GEN x, GEN (*mul)(GEN,GEN)); GEN factor(GEN x); GEN factor0(GEN x,long flag); GEN factorback(GEN fa); GEN factorback2(GEN fa,GEN e); GEN famat_mul_shallow(GEN f, GEN g); GEN gbezout(GEN x, GEN y, GEN *u, GEN *v); GEN gdivexact(GEN x, GEN y); GEN gen_factorback(GEN L, GEN e, GEN (*_mul)(void*,GEN,GEN), GEN (*_pow)(void*,GEN,GEN), void *data); GEN ggcd(GEN x, GEN y); GEN ggcd0(GEN x, GEN y); GEN ginvmod(GEN x, GEN y); GEN gisirreducible(GEN x); GEN glcm(GEN x, GEN y); GEN glcm0(GEN x, GEN y); GEN gp_factor0(GEN x, GEN flag); GEN idealfactorback(GEN nf, GEN L, GEN e, int red); GEN leftright_pow_fold(GEN x, GEN n, void *data, GEN (*sqr)(void*,GEN), GEN (*msqr)(void*,GEN)); GEN leftright_pow_u_fold(GEN x, pari_ulong n, void *data, GEN (*sqr)(void*,GEN), GEN (*msqr)(void*,GEN)); GEN newtonpoly(GEN x, GEN p); GEN nffactorback(GEN nf, GEN L, GEN e); GEN nfrootsQ(GEN x); GEN poldisc0(GEN x, long v); GEN polresultant0(GEN x, GEN y,long v,long flag); GEN polsym(GEN x, long n); GEN primitive_part(GEN x, GEN *c); GEN primpart(GEN x); GEN reduceddiscsmith(GEN pol); GEN resultant2(GEN x, GEN y); GEN resultant_all(GEN u, GEN v, GEN *sol); GEN rnfcharpoly(GEN nf, GEN T, GEN alpha, long v); GEN roots_from_deg1(GEN x); GEN roots_to_pol(GEN a, long v); GEN roots_to_pol_r1(GEN a, long v, long r1); long sturmpart(GEN x, GEN a, GEN b); GEN subresext(GEN x, GEN y, GEN *U, GEN *V); GEN sylvestermatrix(GEN x,GEN y); GEN vecbezout(GEN x, GEN y); GEN vecbezoutres(GEN x, GEN y); GEN FlxX_resultant(GEN u, GEN v, pari_ulong p, long sx); GEN Flx_FlxY_resultant(GEN a, GEN b, pari_ulong pp); GEN Flx_roots_naive(GEN f, pari_ulong p); GEN FpV_polint(GEN xa, GEN ya, GEN p, long v); GEN FpX_FpXQ_eval(GEN f,GEN x,GEN T,GEN p); GEN FpX_FpXQV_eval(GEN f,GEN x,GEN T,GEN p); GEN FpX_FpXY_resultant(GEN a, GEN b0, GEN p); GEN FpX_factorff_irred(GEN P, GEN Q, GEN l); void FpX_ffintersect(GEN P,GEN Q,long n,GEN l,GEN *SP,GEN *SQ,GEN MA,GEN MB); GEN FpX_ffisom(GEN P,GEN Q,GEN l); GEN FpXQ_ffisom_inv(GEN S,GEN Tp, GEN p); GEN FpXQX_gcd(GEN P, GEN Q, GEN T, GEN p); GEN FpXQX_mul(GEN x, GEN y, GEN T, GEN p); GEN FpXQX_red(GEN z, GEN T, GEN p); GEN FpXQX_sqr(GEN x, GEN T, GEN p); GEN FpXQX_extgcd(GEN x, GEN y, GEN T, GEN p, GEN *ptu, GEN *ptv); GEN FpXQX_divrem(GEN x, GEN y, GEN T, GEN p, GEN *pr); GEN FpXQX_FpXQ_mul(GEN P, GEN U, GEN T, GEN p); GEN FpXQXQ_div(GEN x,GEN y,GEN S, GEN T,GEN p); GEN FpXQXQ_inv(GEN x, GEN S, GEN T,GEN p); GEN FpXQXQ_invsafe(GEN x, GEN S, GEN T, GEN p); GEN FpXQXQ_mul(GEN x, GEN y, GEN S, GEN T, GEN p); GEN FpXQXQ_pow(GEN x, GEN n, GEN S, GEN T, GEN p); GEN FpXQXQ_sqr(GEN x, GEN S, GEN T, GEN p); GEN FpXQXV_prod(GEN V, GEN Tp, GEN p); GEN FpXV_FpC_mul(GEN V, GEN W, GEN p); GEN FpXX_Fp_mul(GEN x, GEN y, GEN p); GEN FpXX_add(GEN x, GEN y, GEN p); GEN FpXX_red(GEN z, GEN p); GEN FpXX_sub(GEN x, GEN y, GEN p); GEN FpXY_eval(GEN Q, GEN y, GEN x, GEN p); GEN FpXY_evalx(GEN Q, GEN x, GEN p); GEN FpXY_evaly(GEN Q, GEN y, GEN p, long vy); GEN FpXYQQ_pow(GEN x, GEN n, GEN S, GEN T, GEN p); GEN Fq_inv(GEN x, GEN T, GEN p); GEN Fq_invsafe(GEN x, GEN T, GEN p); GEN Fq_add(GEN x, GEN y, GEN T , GEN p); GEN Fq_Fp_mul(GEN x, GEN y, GEN T, GEN p); GEN Fq_mul(GEN x, GEN y, GEN T, GEN p); GEN Fq_neg(GEN x, GEN T, GEN p); GEN Fq_neg_inv(GEN x, GEN T, GEN p); GEN Fq_pow(GEN x, GEN n, GEN T, GEN p); GEN Fq_sub(GEN x, GEN y, GEN T , GEN p); GEN Fq_sqr(GEN x, GEN T, GEN p); GEN Fq_sqrt(GEN x, GEN T, GEN p); GEN FqC_to_FlxC(GEN v, GEN T, GEN pp); GEN FqM_to_FlxM(GEN x, GEN T, GEN pp); GEN FqV_roots_to_pol(GEN V, GEN T, GEN p, long v); GEN FqV_red(GEN z, GEN T, GEN p); GEN FqV_to_FlxV(GEN v, GEN T, GEN pp); GEN FqX_Fq_mul_to_monic(GEN P, GEN U, GEN T, GEN p); GEN FqX_eval(GEN x, GEN y, GEN T, GEN p); GEN FqX_normalize(GEN z, GEN T, GEN p); GEN FqX_translate(GEN P, GEN c, GEN T, GEN p); GEN QX_disc(GEN x); GEN QX_gcd(GEN a,GEN b); GEN QX_resultant(GEN A, GEN B); GEN QXQ_intnorm(GEN A, GEN B); GEN QXQ_inv(GEN A, GEN B); GEN QXQ_norm(GEN A, GEN B); int Rg_is_Fp(GEN x, GEN *p); int Rg_is_FpXQ(GEN x, GEN *pT, GEN *pp); pari_ulong Rg_to_Fl(GEN x, pari_ulong p); GEN Rg_to_Fp(GEN x, GEN p); GEN Rg_to_FpXQ(GEN x, GEN T, GEN p); GEN RgC_to_FpC(GEN x, GEN p); int RgM_is_FpM(GEN x, GEN *p); GEN RgM_to_FpM(GEN x, GEN p); int RgV_is_FpV(GEN x, GEN *p); GEN RgV_to_FpV(GEN x, GEN p); int RgX_is_FpX(GEN x, GEN *p); GEN RgX_to_FpX(GEN x, GEN p); int RgX_is_FpXQX(GEN x, GEN *pT, GEN *pp); GEN RgX_to_FpXQX(GEN x, GEN T, GEN p); GEN RgX_to_FqX(GEN x, GEN T, GEN p); GEN ZX_ZXY_rnfequation(GEN A, GEN B, long *lambda); GEN ZXQ_charpoly(GEN A, GEN T, long v); GEN ZX_disc(GEN x); int ZX_is_squarefree(GEN x); GEN ZX_gcd(GEN A, GEN B); GEN ZX_gcd_all(GEN A, GEN B, GEN *Anew); GEN ZX_resultant(GEN A, GEN B); int Z_incremental_CRT(GEN *H, pari_ulong Hp, GEN q, GEN qp, pari_ulong p); GEN Z_init_CRT(pari_ulong Hp, pari_ulong p); int ZM_incremental_CRT(GEN *H, GEN Hp, GEN q, GEN qp, pari_ulong p); GEN ZM_init_CRT(GEN Hp, pari_ulong p); int ZX_incremental_CRT(GEN *ptH, GEN Hp, GEN q, GEN qp, pari_ulong p); GEN ZX_init_CRT(GEN Hp, pari_ulong p, long v); long brent_kung_optpow(long d, long n); GEN ffinit(GEN p, long n, long v); GEN Kronecker_to_mod(GEN z, GEN pol); GEN init_Fq(GEN p, long n, long v); GEN pol_x_powers(long N, long v); GEN mod_to_Kronecker(GEN P, GEN Q); long BPSW_isprime(GEN x); long BPSW_psp(GEN N); GEN addprimes(GEN primes); GEN gisprime(GEN x, long flag); GEN gispseudoprime(GEN x, long flag); long isprime(GEN x); long ispseudoprime(GEN x, long flag); long millerrabin(GEN n, long k); GEN prime(long n); GEN primepi(GEN x); GEN primes(long n); GEN primes_zv(long m); GEN removeprimes(GEN primes); int uisprime(pari_ulong n); pari_ulong uprime(long n); pari_ulong uprimepi(pari_ulong n); GEN genrand(GEN N); GEN getrand(void); pari_ulong pari_rand(void); GEN randomi(GEN x); GEN randomr(long prec); pari_ulong random_Fl(pari_ulong n); void setrand(GEN seed); GEN cleanroots(GEN x,long l); int isrealappr(GEN x, long l); GEN roots(GEN x,long l); GEN roots0(GEN x,long flag,long l); GEN factor_Aurifeuille(GEN p, long n); GEN factor_Aurifeuille_prime(GEN p, long n); GEN galoissubcyclo(GEN N, GEN sg, long flag, long v); GEN polsubcyclo(long n, long d, long v); GEN nfsubfields(GEN nf, long d); GEN subgrouplist(GEN cyc, GEN bound); void forsubgroup(void *E, long fun(void*,GEN), GEN cyc, GEN B); GEN bnrL1(GEN bnr, GEN sbgrp, long flag, long prec); GEN bnrrootnumber(GEN bnr, GEN chi, long flag, long prec); GEN bnrstark(GEN bnr, GEN subgroup, long prec); GEN derivnum(void *E, GEN (*eval)(void *, GEN), GEN x, long prec); GEN derivfun(void *E, GEN (*eval)(void *, GEN), GEN x, long prec); GEN direuler(void *E, GEN (*eval)(void *, GEN), GEN ga, GEN gb, GEN c); GEN forvec_start(GEN x, long flag, GEN *d, GEN (**next)(GEN,GEN)); GEN polzag(long n, long m); GEN prodeuler(void *E, GEN (*eval)(void *, GEN), GEN ga, GEN gb, long prec); GEN prodinf(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN prodinf1(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN sumalt(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN sumalt2(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN sumpos(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN sumpos2(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN suminf(void *E, GEN (*eval)(void *, GEN), GEN a, long prec); GEN zbrent(void *E, GEN (*eval)(void *, GEN), GEN a, GEN b, long prec); GEN bnfisintnorm(GEN x, GEN y); GEN bnfisintnormabs(GEN bnf, GEN a); GEN thue(GEN thueres, GEN rhs, GEN ne); GEN thueinit(GEN pol, long flag, long prec); GEN Pi2n(long n, long prec); GEN PiI2(long prec); GEN PiI2n(long n, long prec); GEN Qp_exp(GEN x); GEN Qp_log(GEN x); GEN Qp_sqrt(GEN x); GEN Qp_sqrtn(GEN x, GEN n, GEN *zetan); long Zn_issquare(GEN x, GEN n); GEN Zn_sqrt(GEN x, GEN n); GEN agm(GEN x, GEN y, long prec); GEN consteuler(long prec); GEN constlog2(long prec); GEN constpi(long prec); GEN exp_Ir(GEN x); GEN exp1r_abs(GEN x); GEN gcos(GEN x, long prec); GEN gcotan(GEN x, long prec); GEN gexp(GEN x, long prec); GEN glog(GEN x, long prec); GEN gpow(GEN x, GEN n, long prec); GEN gpowgs(GEN x, long n); GEN gsin(GEN x, long prec); void gsincos(GEN x, GEN *s, GEN *c, long prec); GEN gsqrt(GEN x, long prec); GEN gsqrtn(GEN x, GEN n, GEN *zetan, long prec); GEN gtan(GEN x, long prec); GEN logr_abs(GEN x); GEN mpcos(GEN x); GEN mpeuler(long prec); GEN mpexp(GEN x); GEN mpexp1(GEN x); GEN mplog(GEN x); GEN mplog2(long prec); GEN mppi(long prec); GEN mpsin(GEN x); void mpsincos(GEN x, GEN *s, GEN *c); GEN powis(GEN x, long n); GEN powiu(GEN p, pari_ulong k); GEN powrfrac(GEN x, long n, long d); GEN powrs(GEN x, long n); GEN powrshalf(GEN x, long s); GEN powru(GEN x, pari_ulong n); GEN powruhalf(GEN x, pari_ulong s); GEN powuu(pari_ulong p, pari_ulong k); GEN powgi(GEN x, GEN n); GEN teich(GEN x); pari_ulong upowuu(pari_ulong p, pari_ulong k); GEN Qp_gamma(GEN x); GEN bernfrac(long n); GEN bernreal(long n, long prec); GEN gach(GEN x, long prec); GEN gacos(GEN x, long prec); GEN garg(GEN x, long prec); GEN gash(GEN x, long prec); GEN gasin(GEN x, long prec); GEN gatan(GEN x, long prec); GEN gath(GEN x, long prec); GEN gch(GEN x, long prec); GEN ggamd(GEN x, long prec); GEN ggamma(GEN x, long prec); GEN glngamma(GEN x, long prec); GEN gpsi(GEN x, long prec); GEN gsh(GEN x, long prec); GEN gth(GEN x, long prec); void mpbern(long nomb, long prec); GEN mpfactr(long n, long prec); GEN dilog(GEN x, long prec); GEN eint1(GEN x, long prec); GEN eta(GEN x, long prec); GEN eta0(GEN x, long flag,long prec); GEN gerfc(GEN x, long prec); GEN gpolylog(long m, GEN x, long prec); GEN gzeta(GEN x, long prec); GEN hyperu(GEN a, GEN b, GEN gx, long prec); GEN incgam(GEN a, GEN x, long prec); GEN incgam0(GEN a, GEN x, GEN z,long prec); GEN incgamc(GEN a, GEN x, long prec); GEN hbessel1(GEN n, GEN z, long prec); GEN hbessel2(GEN n, GEN z, long prec); GEN ibessel(GEN n, GEN z, long prec); GEN jbessel(GEN n, GEN z, long prec); GEN jbesselh(GEN n, GEN z, long prec); GEN mpeint1(GEN x, GEN expx); GEN mpveceint1(GEN C, GEN eC, long n); GEN mpvecpow(GEN e, long n); GEN nbessel(GEN n, GEN z, long prec); GEN jell(GEN x, long prec); GEN kbessel(GEN nu, GEN gx, long prec); GEN polylog0(long m, GEN x, long flag, long prec); GEN sumdedekind_coprime(GEN h, GEN k); GEN sumdedekind(GEN h, GEN k); GEN szeta(long x, long prec); GEN theta(GEN q, GEN z, long prec); GEN thetanullk(GEN q, long k, long prec); GEN trueeta(GEN x, long prec); GEN veceint1(GEN nmax, GEN C, long prec); GEN vecthetanullk(GEN q, long k, long prec); GEN weber0(GEN x, long flag,long prec); GEN weberf(GEN x, long prec); GEN weberf1(GEN x, long prec); GEN weberf2(GEN x, long prec); __inline__ static pari_ulong Fl_add(pari_ulong a, pari_ulong b, pari_ulong p); __inline__ static long Fl_center(pari_ulong u, pari_ulong p, pari_ulong ps2); __inline__ static pari_ulong Fl_div(pari_ulong a, pari_ulong b, pari_ulong p); __inline__ static pari_ulong Fl_mul(pari_ulong a, pari_ulong b, pari_ulong p); __inline__ static pari_ulong Fl_neg(pari_ulong x, pari_ulong p); __inline__ static pari_ulong Fl_sqr(pari_ulong a, pari_ulong p); __inline__ static pari_ulong Fl_sub(pari_ulong a, pari_ulong b, pari_ulong p); __inline__ static GEN absi(GEN x); __inline__ static GEN absr(GEN x); __inline__ static int absrnz_equal1(GEN x); __inline__ static int absrnz_equal2n(GEN x); __inline__ static GEN addii(GEN x, GEN y); __inline__ static void addiiz(GEN x, GEN y, GEN z); __inline__ static GEN addir(GEN x, GEN y); __inline__ static void addirz(GEN x, GEN y, GEN z); __inline__ static GEN addis(GEN x, long s); __inline__ static GEN addri(GEN x, GEN y); __inline__ static void addriz(GEN x, GEN y, GEN z); __inline__ static GEN addrr(GEN x, GEN y); __inline__ static void addrrz(GEN x, GEN y, GEN z); __inline__ static GEN addrs(GEN x, long s); __inline__ static GEN addsi(long x, GEN y); __inline__ static void addsiz(long s, GEN y, GEN z); __inline__ static void addsrz(long s, GEN y, GEN z); __inline__ static GEN addss(long x, long y); __inline__ static void addssz(long s, long y, GEN z); __inline__ static GEN adduu(pari_ulong x, pari_ulong y); __inline__ static void affgr(GEN x, GEN y); __inline__ static void affii(GEN x, GEN y); __inline__ static void affiz(GEN x, GEN y); __inline__ static void affrr_fixlg(GEN y, GEN z); __inline__ static void affsi(long s, GEN x); __inline__ static void affsr(long s, GEN x); __inline__ static void affsz(long x, GEN y); __inline__ static void affui(pari_ulong s, GEN x); __inline__ static void affur(pari_ulong s, GEN x); __inline__ static GEN cgetg(long x, long y); __inline__ static GEN cgetg_copy(GEN x, long *plx); __inline__ static GEN cgeti(long x); __inline__ static GEN cgetineg(long x); __inline__ static GEN cgetipos(long x); __inline__ static GEN cgetr(long x); __inline__ static int cmpir(GEN x, GEN y); __inline__ static int cmpis(GEN x, long y); __inline__ static int cmpiu(GEN x, pari_ulong y); __inline__ static int cmpri(GEN x, GEN y); __inline__ static int cmprs(GEN x, long y); __inline__ static int cmpsi(long x, GEN y); __inline__ static int cmpsr(long x, GEN y); __inline__ static int cmpui(pari_ulong x, GEN y); __inline__ static GEN cxtofp(GEN x, long prec); __inline__ static GEN divii(GEN a, GEN b); __inline__ static void diviiz(GEN x, GEN y, GEN z); __inline__ static void divirz(GEN x, GEN y, GEN z); __inline__ static void divisz(GEN x, long s, GEN z); __inline__ static void divriz(GEN x, GEN y, GEN z); __inline__ static void divrrz(GEN x, GEN y, GEN z); __inline__ static void divrsz(GEN y, long s, GEN z); __inline__ static GEN divsi_rem(long x, GEN y, long *rem); __inline__ static void divsiz(long x, GEN y, GEN z); __inline__ static void divsrz(long s, GEN y, GEN z); __inline__ static GEN divss(long x, long y); __inline__ static GEN divss_rem(long x, long y, long *rem); __inline__ static void divssz(long x, long y, GEN z); __inline__ static int dvdii(GEN x, GEN y); __inline__ static int dvdiiz(GEN x, GEN y, GEN z); __inline__ static int dvdis(GEN x, long y); __inline__ static int dvdisz(GEN x, long y, GEN z); __inline__ static int dvdiu(GEN x, pari_ulong y); __inline__ static int dvdiuz(GEN x, pari_ulong y, GEN z); __inline__ static int dvdsi(long x, GEN y); __inline__ static int dvdui(pari_ulong x, GEN y); __inline__ static void dvmdiiz(GEN x, GEN y, GEN z, GEN t); __inline__ static GEN dvmdis(GEN x, long y, GEN *z); __inline__ static void dvmdisz(GEN x, long y, GEN z, GEN t); __inline__ static long dvmdsBIL(long n, long *r); __inline__ static GEN dvmdsi(long x, GEN y, GEN *z); __inline__ static void dvmdsiz(long x, GEN y, GEN z, GEN t); __inline__ static GEN dvmdss(long x, long y, GEN *z); __inline__ static void dvmdssz(long x, long y, GEN z, GEN t); __inline__ static pari_ulong dvmduBIL(pari_ulong n, pari_ulong *r); __inline__ static int equalis(GEN x, long y); __inline__ static int equaliu(GEN x, pari_ulong y); __inline__ static int equalsi(long x, GEN y); __inline__ static int equalui(pari_ulong x, GEN y); __inline__ static long evalexpo(long x); __inline__ static long evallg(long x); __inline__ static long evalvalp(long x); __inline__ static long expi(GEN x); __inline__ static long expu(pari_ulong x); __inline__ static void fixlg(GEN z, long ly); __inline__ static GEN fractor(GEN x, long prec); __inline__ static GEN icopy(GEN x); __inline__ static GEN icopy_avma(GEN x, pari_sp av); __inline__ static GEN itor(GEN x, long prec); __inline__ static long itos(GEN x); __inline__ static long itos_or_0(GEN x); __inline__ static pari_ulong itou(GEN x); __inline__ static pari_ulong itou_or_0(GEN x); __inline__ static GEN leafcopy(GEN x); __inline__ static double maxdd(double x, double y); __inline__ static long maxss(long x, long y); __inline__ static long maxuu(pari_ulong x, pari_ulong y); __inline__ static double mindd(double x, double y); __inline__ static long minss(long x, long y); __inline__ static long minuu(pari_ulong x, pari_ulong y); __inline__ static long mod16(GEN x); __inline__ static long mod2(GEN x); __inline__ static pari_ulong mod2BIL(GEN x); __inline__ static long mod32(GEN x); __inline__ static long mod4(GEN x); __inline__ static long mod64(GEN x); __inline__ static long mod8(GEN x); __inline__ static GEN modis(GEN x, long y); __inline__ static void modisz(GEN y, long s, GEN z); __inline__ static GEN modsi(long x, GEN y); __inline__ static void modsiz(long s, GEN y, GEN z); __inline__ static GEN modss(long x, long y); __inline__ static void modssz(long s, long y, GEN z); __inline__ static GEN mpabs(GEN x); __inline__ static GEN mpadd(GEN x, GEN y); __inline__ static void mpaddz(GEN x, GEN y, GEN z); __inline__ static void mpaff(GEN x, GEN y); __inline__ static GEN mpceil(GEN x); __inline__ static int mpcmp(GEN x, GEN y); __inline__ static GEN mpcopy(GEN x); __inline__ static GEN mpdiv(GEN x, GEN y); __inline__ static long mpexpo(GEN x); __inline__ static GEN mpfloor(GEN x); __inline__ static GEN mpmul(GEN x, GEN y); __inline__ static void mpmulz(GEN x, GEN y, GEN z); __inline__ static GEN mpneg(GEN x); __inline__ static int mpodd(GEN x); __inline__ static GEN mpround(GEN x); __inline__ static GEN mpshift(GEN x,long s); __inline__ static GEN mpsqr(GEN x); __inline__ static GEN mpsub(GEN x, GEN y); __inline__ static void mpsubz(GEN x, GEN y, GEN z); __inline__ static GEN mptrunc(GEN x); __inline__ static void muliiz(GEN x, GEN y, GEN z); __inline__ static void mulirz(GEN x, GEN y, GEN z); __inline__ static GEN mulis(GEN x, long s); __inline__ static GEN muliu(GEN x, pari_ulong s); __inline__ static GEN mulri(GEN x, GEN s); __inline__ static void mulriz(GEN x, GEN y, GEN z); __inline__ static void mulrrz(GEN x, GEN y, GEN z); __inline__ static GEN mulrs(GEN x, long s); __inline__ static GEN mulru(GEN x, pari_ulong s); __inline__ static void mulsiz(long s, GEN y, GEN z); __inline__ static void mulsrz(long s, GEN y, GEN z); __inline__ static void mulssz(long s, long y, GEN z); __inline__ static GEN negi(GEN x); __inline__ static GEN negr(GEN x); __inline__ static GEN new_chunk(size_t x); __inline__ static GEN rcopy(GEN x); __inline__ static GEN rdivii(GEN x, GEN y, long prec); __inline__ static void rdiviiz(GEN x, GEN y, GEN z); __inline__ static GEN rdivis(GEN x, long y, long prec); __inline__ static GEN rdivsi(long x, GEN y, long prec); __inline__ static GEN rdivss(long x, long y, long prec); __inline__ static GEN real2n(long n, long prec); __inline__ static GEN real_0(long prec); __inline__ static GEN real_0_bit(long bitprec); __inline__ static GEN real_1(long prec); __inline__ static GEN real_m1(long prec); __inline__ static GEN remii(GEN a, GEN b); __inline__ static void remiiz(GEN x, GEN y, GEN z); __inline__ static GEN remis(GEN x, long y); __inline__ static void remisz(GEN y, long s, GEN z); __inline__ static GEN remsi(long x, GEN y); __inline__ static void remsiz(long s, GEN y, GEN z); __inline__ static GEN remss(long x, long y); __inline__ static void remssz(long s, long y, GEN z); __inline__ static GEN rtor(GEN x, long prec); __inline__ static long sdivsi(long x, GEN y); __inline__ static long sdivsi_rem(long x, GEN y, long *rem); __inline__ static long sdivss_rem(long x, long y, long *rem); __inline__ static void setabssign(GEN x); __inline__ static void shift_left(GEN z2, GEN z1, long min, long M, pari_ulong f, pari_ulong sh); __inline__ static void shift_right(GEN z2, GEN z1, long min, long M, pari_ulong f, pari_ulong sh); __inline__ static pari_ulong shiftl(pari_ulong x, pari_ulong y); __inline__ static pari_ulong shiftlr(pari_ulong x, pari_ulong y); __inline__ static GEN shiftr(GEN x, long n); __inline__ static long smodis(GEN x, long y); __inline__ static long smodss(long x, long y); __inline__ static void stackdummy(pari_sp av, pari_sp ltop); __inline__ static GEN stoi(long x); __inline__ static GEN stor(long x, long prec); __inline__ static GEN subii(GEN x, GEN y); __inline__ static void subiiz(GEN x, GEN y, GEN z); __inline__ static GEN subir(GEN x, GEN y); __inline__ static void subirz(GEN x, GEN y, GEN z); __inline__ static GEN subis(GEN x, long y); __inline__ static void subisz(GEN y, long s, GEN z); __inline__ static GEN subri(GEN x, GEN y); __inline__ static void subriz(GEN x, GEN y, GEN z); __inline__ static GEN subrr(GEN x, GEN y); __inline__ static void subrrz(GEN x, GEN y, GEN z); __inline__ static GEN subrs(GEN x, long y); __inline__ static void subrsz(GEN y, long s, GEN z); __inline__ static GEN subsi(long x, GEN y); __inline__ static void subsiz(long s, GEN y, GEN z); __inline__ static void subsrz(long s, GEN y, GEN z); __inline__ static GEN subss(long x, long y); __inline__ static void subssz(long x, long y, GEN z); __inline__ static GEN subuu(pari_ulong x, pari_ulong y); __inline__ static void togglesign(GEN x); __inline__ static void togglesign_safe(GEN *px); __inline__ static void affectsign(GEN x, GEN y); __inline__ static void affectsign_safe(GEN x, GEN *py); __inline__ static GEN truedivii(GEN a,GEN b); __inline__ static GEN truedivis(GEN a, long b); __inline__ static GEN truedivsi(long a, GEN b); __inline__ static pari_ulong udivui_rem(pari_ulong x, GEN y, pari_ulong *rem); __inline__ static pari_ulong umodui(pari_ulong x, GEN y); __inline__ static GEN utoi(pari_ulong x); __inline__ static GEN utoineg(pari_ulong x); __inline__ static GEN utoipos(pari_ulong x); __inline__ static GEN utor(pari_ulong s, long prec); __inline__ static GEN uutoi(pari_ulong x, pari_ulong y); __inline__ static GEN uutoineg(pari_ulong x, pari_ulong y); __inline__ static long vali(GEN x); __inline__ static GEN bid_get_arch(GEN bid); __inline__ static GEN bid_get_cyc(GEN bid); __inline__ static GEN bid_get_gen(GEN bid); __inline__ static GEN bid_get_gen_nocheck(GEN bid); __inline__ static GEN bid_get_ideal(GEN bid); __inline__ static GEN bid_get_mod(GEN bid); __inline__ static GEN bnf_get_clgp(GEN bnf); __inline__ static GEN bnf_get_cyc(GEN bnf); __inline__ static GEN bnf_get_fu(GEN bnf); __inline__ static GEN bnf_get_fu_nocheck(GEN bnf); __inline__ static GEN bnf_get_gen(GEN bnf); __inline__ static GEN bnf_get_logfu(GEN bnf); __inline__ static GEN bnf_get_nf(GEN bnf); __inline__ static GEN bnf_get_no(GEN bnf); __inline__ static GEN bnf_get_reg(GEN bnf); __inline__ static GEN bnf_get_tuU(GEN bnf); __inline__ static long bnf_get_tuN(GEN bnf); __inline__ static GEN bnr_get_bnf(GEN bnr); __inline__ static GEN bnr_get_clgp(GEN bnr); __inline__ static GEN bnr_get_cyc(GEN bnr); __inline__ static GEN bnr_get_gen(GEN bnr); __inline__ static GEN bnr_get_gen_nocheck(GEN bnr); __inline__ static GEN bnr_get_no(GEN bnr); __inline__ static GEN bnr_get_bid(GEN bnr); __inline__ static GEN bnr_get_mod(GEN bnr); __inline__ static GEN bnr_get_nf(GEN bnr); __inline__ static GEN ell_get_a1(GEN e); __inline__ static GEN ell_get_a2(GEN e); __inline__ static GEN ell_get_a3(GEN e); __inline__ static GEN ell_get_a4(GEN e); __inline__ static GEN ell_get_a6(GEN e); __inline__ static GEN ell_get_b2(GEN e); __inline__ static GEN ell_get_b4(GEN e); __inline__ static GEN ell_get_b6(GEN e); __inline__ static GEN ell_get_b8(GEN e); __inline__ static GEN ell_get_c4(GEN e); __inline__ static GEN ell_get_c6(GEN e); __inline__ static GEN ell_get_disc(GEN e); __inline__ static GEN ell_get_j(GEN e); __inline__ static GEN ell_get_roots(GEN e); __inline__ static int ell_is_inf(GEN z); __inline__ static int ell_is_padic(GEN e); __inline__ static int ell_is_real(GEN e); __inline__ static GEN ellinf(void); __inline__ static GEN gal_get_pol(GEN gal); __inline__ static GEN gal_get_p(GEN gal); __inline__ static GEN gal_get_e(GEN gal); __inline__ static GEN gal_get_mod(GEN gal); __inline__ static GEN gal_get_roots(GEN gal); __inline__ static GEN gal_get_invvdm(GEN gal); __inline__ static GEN gal_get_den(GEN gal); __inline__ static GEN gal_get_group(GEN gal); __inline__ static GEN gal_get_gen(GEN gal); __inline__ static GEN gal_get_orders(GEN gal); __inline__ static GEN idealpseudomin(GEN I, GEN G); __inline__ static GEN idealpseudomin_nonscalar(GEN I, GEN G); __inline__ static GEN idealred_elt(GEN nf, GEN I); __inline__ static GEN idealred(GEN nf, GEN I); __inline__ static GEN nf_get_M(GEN nf); __inline__ static GEN nf_get_G(GEN nf); __inline__ static GEN nf_get_Tr(GEN nf); __inline__ static GEN nf_get_diff(GEN nf); __inline__ static long nf_get_degree(GEN nf); __inline__ static GEN nf_get_disc(GEN nf); __inline__ static GEN nf_get_index(GEN nf); __inline__ static GEN nf_get_invzk(GEN nf); __inline__ static GEN nf_get_pol(GEN nf); __inline__ static long nf_get_r1(GEN nf); __inline__ static long nf_get_r2(GEN nf); __inline__ static GEN nf_get_roots(GEN nf); __inline__ static GEN nf_get_roundG(GEN nf); __inline__ static void nf_get_sign(GEN nf, long *r1, long *r2); __inline__ static long nf_get_varn(GEN nf); __inline__ static GEN nf_get_zk(GEN nf); __inline__ static long pr_get_e(GEN pr); __inline__ static long pr_get_f(GEN pr); __inline__ static GEN pr_get_gen(GEN pr); __inline__ static GEN pr_get_p(GEN pr); __inline__ static GEN pr_get_tau(GEN pr); __inline__ static int pr_is_inert(GEN P); __inline__ static GEN pr_norm(GEN pr); __inline__ static long rnf_get_degree(GEN rnf); __inline__ static GEN FpXQ_add(GEN x,GEN y,GEN T,GEN p); __inline__ static GEN FpXQ_sub(GEN x,GEN y,GEN T,GEN p); __inline__ static GEN Flxq_add(GEN x,GEN y,GEN T,pari_ulong p); __inline__ static GEN Flxq_sub(GEN x,GEN y,GEN T,pari_ulong p); __inline__ static GEN FpXQX_div(GEN x, GEN y, GEN T, GEN p); __inline__ static GEN FpXQX_rem(GEN x, GEN y, GEN T, GEN p); __inline__ static GEN FlxqX_div(GEN x, GEN y, GEN T, pari_ulong p); __inline__ static GEN FlxqX_rem(GEN x, GEN y, GEN T, pari_ulong p); __inline__ static GEN Fq_red(GEN x, GEN T, GEN p); __inline__ static GEN FqX_Fp_mul(GEN P, GEN U, GEN T, GEN p); __inline__ static GEN FqX_Fq_mul(GEN P, GEN U, GEN T, GEN p); __inline__ static GEN FqX_add(GEN x,GEN y,GEN T,GEN p); __inline__ static GEN FqX_div(GEN x, GEN y, GEN T, GEN p); __inline__ static GEN FqX_divrem(GEN x, GEN y, GEN T, GEN p, GEN *z); __inline__ static GEN FqX_extgcd(GEN P,GEN Q,GEN T,GEN p, GEN *U, GEN *V); __inline__ static GEN FqX_gcd(GEN P, GEN Q, GEN T, GEN p); __inline__ static GEN FqX_mul(GEN x, GEN y, GEN T, GEN p); __inline__ static GEN FqX_red(GEN z, GEN T, GEN p); __inline__ static GEN FqX_rem(GEN x, GEN y, GEN T, GEN p); __inline__ static GEN FqX_sqr(GEN x, GEN T, GEN p); __inline__ static GEN FqX_sub(GEN x,GEN y,GEN T,GEN p); __inline__ static GEN FqXQ_add(GEN x, GEN y, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_div(GEN x, GEN y, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_inv(GEN x, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_invsafe(GEN x, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_mul(GEN x, GEN y, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_pow(GEN x, GEN n, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_sqr(GEN x, GEN S, GEN T, GEN p); __inline__ static GEN FqXQ_sub(GEN x, GEN y, GEN S, GEN T, GEN p); __inline__ static pari_ulong F2m_coeff(GEN x, long a, long b); __inline__ static void F2m_clear(GEN x, long a, long b); __inline__ static void F2m_flip(GEN x, long a, long b); __inline__ static void F2m_set(GEN x, long a, long b); __inline__ static void F2v_clear(GEN x,long v); __inline__ static pari_ulong F2v_coeff(GEN x,long v); __inline__ static void F2v_flip(GEN x,long v); __inline__ static void F2v_set(GEN x,long v); __inline__ static void F2x_clear(GEN x,long v); __inline__ static pari_ulong F2x_coeff(GEN x,long v); __inline__ static void F2x_flip(GEN x,long v); __inline__ static void F2x_set(GEN x,long v); __inline__ static int F2x_equal1(GEN x); __inline__ static GEN F2x_div(GEN x, GEN y); __inline__ static GEN F2x_renormalize(GEN x, long lx); __inline__ static GEN F2m_copy(GEN x); __inline__ static GEN Flm_copy(GEN x); __inline__ static GEN Flv_copy(GEN x); __inline__ static int Flx_equal1(GEN x); __inline__ static GEN Flx_copy(GEN x); __inline__ static GEN Flx_div(GEN x, GEN y, pari_ulong p); __inline__ static GEN FpV_FpC_mul(GEN x, GEN y, GEN p); __inline__ static GEN FpXQX_renormalize(GEN x, long lx); __inline__ static GEN FpXX_renormalize(GEN x, long lx); __inline__ static GEN FpX_div(GEN x, GEN y, GEN p); __inline__ static GEN FpX_renormalize(GEN x, long lx); __inline__ static GEN Fp_add(GEN a, GEN b, GEN m); __inline__ static GEN Fp_center(GEN u, GEN p, GEN ps2); __inline__ static GEN Fp_div(GEN a, GEN b, GEN m); __inline__ static GEN Fp_inv(GEN a, GEN m); __inline__ static GEN Fp_invsafe(GEN a, GEN m); __inline__ static GEN Fp_mul(GEN a, GEN b, GEN m); __inline__ static GEN Fp_mulu(GEN a, pari_ulong b, GEN m); __inline__ static GEN Fp_neg(GEN b, GEN m); __inline__ static GEN Fp_red(GEN x, GEN p); __inline__ static GEN Fp_sqr(GEN a, GEN m); __inline__ static GEN Fp_sub(GEN a, GEN b, GEN m); __inline__ static GEN GENbinbase(GENbin *p); __inline__ static GEN Q_abs(GEN x); __inline__ static int QV_isscalar(GEN x); __inline__ static GEN RgC_fpnorml2(GEN x, long prec); __inline__ static GEN RgC_gtofp(GEN x, long prec); __inline__ static GEN RgM_fpnorml2(GEN x, long prec); __inline__ static GEN RgM_gtofp(GEN x, long prec); __inline__ static GEN RgM_inv(GEN a); __inline__ static int RgM_is_ZM(GEN x); __inline__ static GEN RgM_minor(GEN a, long i, long j); __inline__ static GEN RgM_shallowcopy(GEN x); __inline__ static int RgV_isscalar(GEN x); __inline__ static int RgX_is_monomial(GEN x); __inline__ static int RgX_is_rational(GEN x); __inline__ static int RgX_is_ZX(GEN x); __inline__ static int RgX_isscalar(GEN x); __inline__ static GEN RgX_shift_inplace(GEN x, long v); __inline__ static void RgX_shift_inplace_init(long v); __inline__ static GEN RgXQ_mul(GEN x,GEN y,GEN T); __inline__ static GEN RgXQ_sqr(GEN x,GEN T); __inline__ static GEN RgXQX_div(GEN x, GEN y, GEN T); __inline__ static GEN RgXQX_rem(GEN x, GEN y, GEN T); __inline__ static GEN RgX_div(GEN x, GEN y); __inline__ static GEN RgX_fpnorml2(GEN x, long prec); __inline__ static GEN RgX_gtofp(GEN x, long prec); __inline__ static GEN RgX_rem(GEN x, GEN y); __inline__ static GEN Rg_col_ei(GEN x, long n, long i); __inline__ static GEN ZC_hnfrem(GEN x, GEN y); __inline__ static GEN ZM_hnfrem(GEN x, GEN y); __inline__ static GEN ZM_lll(GEN x, double D, long f); __inline__ static int ZV_dvd(GEN x, GEN y); __inline__ static int ZV_isscalar(GEN x); __inline__ static GEN ZV_to_zv(GEN x); __inline__ static GEN ZX_ZXY_resultant(GEN a, GEN b); __inline__ static GEN ZXQ_mul(GEN x,GEN y,GEN T); __inline__ static GEN ZXQ_sqr(GEN x,GEN T); __inline__ static long Z_ispower(GEN x, pari_ulong k); __inline__ static long Z_issquare(GEN x); __inline__ static GEN absfrac(GEN x); __inline__ static GEN affc_fixlg(GEN x, GEN res); __inline__ static GEN bin_copy(GENbin *p); __inline__ static long bit_accuracy(long x); __inline__ static double bit_accuracy_mul(long x, double y); __inline__ static int both_odd(long x, long y); __inline__ static GEN cgetc(long x); __inline__ static GEN cgetalloc(long t, size_t l); __inline__ static GEN cxcompotor(GEN z, long prec); __inline__ static void cgiv(GEN x); __inline__ static GEN col_ei(long n, long i); __inline__ static GEN const_col(long n, GEN x); __inline__ static GEN const_vec(long n, GEN x); __inline__ static GEN const_vecsmall(long n, long c); __inline__ static GEN constant_term(GEN x); __inline__ static GEN cxnorm(GEN x); __inline__ static GEN cyclic_perm(long l, long d); __inline__ static double dbllog2r(GEN x); __inline__ static long degpol(GEN x); __inline__ static long divsBIL(long n); __inline__ static void gabsz(GEN x, long prec, GEN z); __inline__ static GEN gaddgs(GEN y, long s); __inline__ static void gaddz(GEN x, GEN y, GEN z); __inline__ static int gcmpgs(GEN y, long s); __inline__ static void gdiventz(GEN x, GEN y, GEN z); __inline__ static GEN gdivsg(long s, GEN y); __inline__ static void gdivz(GEN x, GEN y, GEN z); __inline__ static GEN gen_I(void); __inline__ static void gerepileall(pari_sp av, int n, ...); __inline__ static void gerepilecoeffs(pari_sp av, GEN x, int n); __inline__ static GEN gerepilecopy(pari_sp av, GEN x); __inline__ static void gerepilemany(pari_sp av, GEN* g[], int n); __inline__ static int gequalgs(GEN y, long s); __inline__ static GEN gerepileupto(pari_sp av, GEN q); __inline__ static GEN gerepileuptoint(pari_sp av, GEN q); __inline__ static GEN gerepileuptoleaf(pari_sp av, GEN q); __inline__ static GEN gmaxsg(long s, GEN y); __inline__ static GEN gminsg(long s, GEN y); __inline__ static void gmodz(GEN x, GEN y, GEN z); __inline__ static void gmul2nz(GEN x, long s, GEN z); __inline__ static GEN gmulgs(GEN y, long s); __inline__ static void gmulz(GEN x, GEN y, GEN z); __inline__ static void gnegz(GEN x, GEN z); __inline__ static void gshiftz(GEN x, long s, GEN z); __inline__ static GEN gsubgs(GEN y, long s); __inline__ static void gsubz(GEN x, GEN y, GEN z); __inline__ static double gtodouble(GEN x); __inline__ static GEN gtofp(GEN z, long prec); __inline__ static long gtos(GEN x); __inline__ static long gval(GEN x, long v); __inline__ static GEN identity_perm(long l); __inline__ static int equali1(GEN n); __inline__ static int equalim1(GEN n); __inline__ static int is_bigint(GEN n); __inline__ static int is_const_t(long t); __inline__ static int is_extscalar_t(long t); __inline__ static int is_intreal_t(long t); __inline__ static int is_matvec_t(long t); __inline__ static int is_noncalc_t(long tx); __inline__ static int is_pm1(GEN n); __inline__ static int is_rational_t(long t); __inline__ static int is_recursive_t(long t); __inline__ static int is_scalar_t(long t); __inline__ static int is_universal_constant(GEN x); __inline__ static int is_vec_t(long t); __inline__ static int isint1(GEN x); __inline__ static int isintm1(GEN x); __inline__ static int isintzero(GEN x); __inline__ static int ismpzero(GEN x); __inline__ static int isonstack(GEN x); __inline__ static void killblock(GEN x); __inline__ static GEN leading_term(GEN x); __inline__ static long lgpol(GEN x); __inline__ static GEN matpascal(long n); __inline__ static GEN mkcol(GEN x); __inline__ static GEN mkcol2(GEN x, GEN y); __inline__ static GEN mkcolcopy(GEN x); __inline__ static GEN mkcomplex(GEN x, GEN y); __inline__ static GEN mkfrac(GEN x, GEN y); __inline__ static GEN mkfraccopy(GEN x, GEN y); __inline__ static GEN mkintmod(GEN x, GEN y); __inline__ static GEN mkintmodu(pari_ulong x, pari_ulong y); __inline__ static GEN mkmat(GEN x); __inline__ static GEN mkmat2(GEN x, GEN y); __inline__ static GEN mkmatcopy(GEN x); __inline__ static GEN mkpolmod(GEN x, GEN y); __inline__ static GEN mkquad(GEN n, GEN x, GEN y); __inline__ static GEN mkrfrac(GEN x, GEN y); __inline__ static GEN mkvec(GEN x); __inline__ static GEN mkvec2(GEN x, GEN y); __inline__ static GEN mkvec2copy(GEN x, GEN y); __inline__ static GEN mkvec2s(long x, long y); __inline__ static GEN mkvec3(GEN x, GEN y, GEN z); __inline__ static GEN mkvec3s(long x, long y, long z); __inline__ static GEN mkvec4(GEN x, GEN y, GEN z, GEN t); __inline__ static GEN mkvec5(GEN x, GEN y, GEN z, GEN t, GEN u); __inline__ static GEN mkveccopy(GEN x); __inline__ static GEN mkvecs(long x); __inline__ static GEN mkvecsmall(long x); __inline__ static GEN mkvecsmall2(long x,long y); __inline__ static GEN mkvecsmall3(long x,long y,long z); __inline__ static GEN mkvecsmall4(long x,long y,long z,long t); __inline__ static void mpcosz(GEN x, GEN z); __inline__ static void mpexpz(GEN x, GEN z); __inline__ static void mplogz(GEN x, GEN z); __inline__ static void mpsinz(GEN x, GEN z); __inline__ static GEN mul_content(GEN cx, GEN cy); __inline__ static GEN mul_denom(GEN cx, GEN cy); __inline__ static long nbits2nlong(long x); __inline__ static long nbits2prec(long x); __inline__ static long nchar2nlong(long x); __inline__ static long ndec2nlong(long x); __inline__ static long ndec2prec(long x); __inline__ static void normalize_frac(GEN z); __inline__ static int odd(long x); __inline__ static void pari_free(void *pointer); __inline__ static void* pari_calloc(size_t size); __inline__ static void* pari_malloc(size_t bytes); __inline__ static void* pari_realloc(void *pointer,size_t size); __inline__ static GEN perm_conj(GEN s, GEN t); __inline__ static GEN perm_inv(GEN x); __inline__ static GEN perm_mul(GEN s, GEN t); __inline__ static GEN pol_0(long v); __inline__ static GEN pol_1(long v); __inline__ static GEN pol_x(long v); __inline__ static GEN pol0_F2x(long sv); __inline__ static GEN pol1_F2x(long sv); __inline__ static GEN polx_F2x(long sv); __inline__ static GEN pol0_Flx(long sv); __inline__ static GEN pol1_Flx(long sv); __inline__ static GEN polx_Flx(long sv); __inline__ static GEN polx_zx(long sv); __inline__ static GEN powii(GEN x, GEN n); __inline__ static GEN powIs(long n); __inline__ static long prec2ndec(long x); __inline__ static GEN quad_disc(GEN x); __inline__ static GEN qfb_disc(GEN x); __inline__ static GEN qfb_disc3(GEN x, GEN y, GEN z); __inline__ static GEN quadnorm(GEN q); __inline__ static long random_bits(long k); __inline__ static long remsBIL(long n); __inline__ static GEN resultant(GEN x, GEN y); __inline__ static GEN row(GEN A, long x1); __inline__ static GEN row_Flm(GEN A, long x0); __inline__ static GEN row_i(GEN A, long x0, long x1, long x2); __inline__ static GEN row_zm(GEN x, long i); __inline__ static GEN rowcopy(GEN A, long x0); __inline__ static GEN rowpermute(GEN A, GEN p); __inline__ static GEN rowslice(GEN A, long x1, long x2); __inline__ static GEN rowslicepermute(GEN A, GEN p, long x1, long x2); __inline__ static GEN shallowcopy(GEN x); __inline__ static GEN sqrfrac(GEN x); __inline__ static GEN sqrti(GEN x); __inline__ static GEN sqrtnr(GEN x, long n); __inline__ static GEN sqrtr(GEN x); __inline__ static void stack_alloc(pari_stack *s, long nb); __inline__ static void** stack_base(pari_stack *s); __inline__ static void stack_delete(pari_stack *s); __inline__ static void stack_init(pari_stack *s, size_t size, void **data); __inline__ static long stack_new(pari_stack *s); __inline__ static void stack_pushp(pari_stack *s, void *u); __inline__ static long sturm(GEN x); __inline__ static GEN truecoeff(GEN x, long n); __inline__ static GEN trunc_safe(GEN x); __inline__ static GEN vec_ei(long n, long i); __inline__ static GEN vec_lengthen(GEN v, long n); __inline__ static GEN vec_setconst(GEN v, GEN x); __inline__ static GEN vec_shorten(GEN v, long n); __inline__ static GEN vec_to_vecsmall(GEN z); __inline__ static GEN vecpermute(GEN A, GEN p); __inline__ static GEN vecreverse(GEN A); __inline__ static GEN vecslice(GEN A, long y1, long y2); __inline__ static GEN vecslicepermute(GEN A, GEN p, long y1, long y2); __inline__ static GEN vecsplice(GEN a, long j); __inline__ static GEN vecsmall_append(GEN V, long s); __inline__ static long vecsmall_coincidence(GEN u, GEN v); __inline__ static GEN vecsmall_concat(GEN u, GEN v); __inline__ static GEN vecsmall_copy(GEN x); __inline__ static GEN vecsmall_ei(long n, long i); __inline__ static long vecsmall_isin(GEN v, long x); __inline__ static GEN vecsmall_lengthen(GEN v, long n); __inline__ static int vecsmall_lexcmp(GEN x, GEN y); __inline__ static long vecsmall_max(GEN v); __inline__ static long vecsmall_min(GEN v); __inline__ static long vecsmall_pack(GEN V, long base, long mod); __inline__ static int vecsmall_prefixcmp(GEN x, GEN y); __inline__ static GEN vecsmall_prepend(GEN V, long s); __inline__ static GEN vecsmall_shorten(GEN v, long n); __inline__ static GEN vecsmall_to_col(GEN z); __inline__ static GEN vecsmall_to_vec(GEN z); __inline__ static void vecsmalltrunc_append(GEN x, long t); __inline__ static GEN vecsmalltrunc_init(long l); __inline__ static void vectrunc_append(GEN x, GEN t); __inline__ static GEN vectrunc_init(long l); __inline__ static GEN zc_to_ZC(GEN x); __inline__ static GEN zero_F2m(long n, long m); __inline__ static GEN zero_F2m_copy(long n, long m); __inline__ static GEN zero_F2v(long m); __inline__ static GEN zero_F2x(long sv); __inline__ static GEN zero_Flm(long m, long n); __inline__ static GEN zero_Flm_copy(long m, long n); __inline__ static GEN zero_Flv(long n); __inline__ static GEN zero_Flx(long sv); __inline__ static GEN zero_zm(long x, long y); __inline__ static GEN zero_zv(long x); __inline__ static GEN zero_zx(long sv); __inline__ static GEN zerocol(long n); __inline__ static GEN zeromat(long m, long n); __inline__ static GEN zeromatcopy(long m, long n); __inline__ static GEN zeropadic(GEN p, long e); __inline__ static GEN zeropol(long v); __inline__ static GEN zeroser(long v, long e); __inline__ static GEN zerovec(long n); __inline__ static GEN zm_copy(GEN x); __inline__ static GEN zm_to_zxV(GEN x, long sv); __inline__ static GEN zm_transpose(GEN x); __inline__ static GEN zv_copy(GEN x); __inline__ static GEN zv_to_ZV(GEN x); __inline__ static GEN zv_to_zx(GEN x, long sv); __inline__ static GEN zx_renormalize(GEN x, long l); __inline__ static GEN zx_shift(GEN x, long n); __inline__ static GEN zx_to_zv(GEN x, long N); # 57 "../src/headers/pari.h" 2 # 1 "../src/headers/paritune.h" 1 extern long SQRI_KARATSUBA_LIMIT; extern long MULII_KARATSUBA_LIMIT; extern long MULRR_MULII_LIMIT; extern long SQRI_FFT_LIMIT; extern long MULII_FFT_LIMIT; extern long Fp_POW_REDC_LIMIT; extern long Fp_POW_BARRETT_LIMIT; extern long INVMOD_GMP_LIMIT; extern long DIVRR_GMP_LIMIT; extern long Flx_MUL_KARATSUBA_LIMIT; extern long Flx_SQR_KARATSUBA_LIMIT; extern long Flx_MUL_HALFMULII_LIMIT; extern long Flx_SQR_HALFSQRI_LIMIT; extern long Flx_MUL_MULII_LIMIT; extern long Flx_SQR_SQRI_LIMIT; extern long Flx_MUL_MULII2_LIMIT; extern long Flx_SQR_SQRI2_LIMIT; extern long Flx_INVMONTGOMERY_LIMIT; extern long Flx_REM_MONTGOMERY_LIMIT; extern long Flx_POW_MONTGOMERY_LIMIT; extern long Flx_HALFGCD_LIMIT; extern long Flx_GCD_LIMIT; extern long Flx_EXTGCD_LIMIT; extern long FpX_INVMONTGOMERY_LIMIT; extern long FpX_REM_MONTGOMERY_LIMIT; extern long FpX_POW_MONTGOMERY_LIMIT; extern long FpX_HALFGCD_LIMIT; extern long FpX_GCD_LIMIT; extern long FpX_EXTGCD_LIMIT; extern long EXPNEWTON_LIMIT; extern long INVNEWTON_LIMIT; extern long LOGAGM_LIMIT; extern long LOGAGMCX_LIMIT; extern long AGM_ATAN_LIMIT; extern long RgX_SQR_LIMIT; extern long RgX_MUL_LIMIT; # 58 "../src/headers/pari.h" 2 # 1 "./mpinl.h" 1 # 2 "../src/kernel/none/addll.h" # 24 "../src/kernel/none/addll.h" extern pari_ulong overflow; # 2 "../src/kernel/none/mulll.h" # 19 "../src/kernel/none/mulll.h" extern pari_ulong hiremainder; # 2 "../src/kernel/none/bfffo.h" # 2 "../src/kernel/none/divll.h" # 24 "../src/kernel/none/divll.h" extern pari_ulong hiremainder; # 33 "../src/kernel/none/divll.h" extern pari_ulong hiremainder; # 2 "../src/kernel/gmp/int.h" # 2 "../src/kernel/none/level1.h" # 21 "../src/kernel/none/level1.h" __inline__ static long evallg(long x) { if (x & ~((1UL<<(32 - 1 - 7))-1)) pari_err(overflower,"lg()"); return (x); } __inline__ static long evalvalp(long x) { long v = ((1UL<<((32 - 2 - 14)-1)) + (x)); if (v & ~((1UL<<(32 - 2 - 14))-1)) pari_err(overflower,"valp()"); return v; } __inline__ static long evalexpo(long x) { long v = ((1UL<<((32 - 2)-1)) + (x)); if (v & ~((1UL<<(32 - 2))-1)) pari_err(overflower,"expo()"); return v; } # 49 "../src/kernel/none/level1.h" __inline__ static void stackdummy(pari_sp av, pari_sp ltop) { long l = ((GEN)av) - ((GEN)ltop); if (l > 0) { GEN z = (GEN)ltop; z[0] = (((pari_ulong)(t_VECSMALL)) << (32 - 7)) | evallg(l); } } __inline__ static void fixlg(GEN x, long ly) { long lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))), l = lx - ly; if (l > 0) { GEN z = x + ly; z[0] = (((pari_ulong)(t_VECSMALL)) << (32 - 7)) | evallg(l); (((pari_ulong*)(x))[0]= (((pari_ulong*)(x))[0]&(~((1UL<<(32 - 1 - 7))-1))) | evallg(ly)); } } __inline__ static void affrr_fixlg(GEN y, GEN z) { fixlg(z, ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1)))); affrr(y, z); } __inline__ static GEN new_chunk(size_t x) { GEN z = ((GEN) avma) - x; if (x > (avma-bot) / sizeof(long)) pari_err(errpile); avma = (pari_sp)z; # 100 "../src/kernel/none/level1.h" return z; } __inline__ static GEN cgetg_copy(GEN x, long *plx) { GEN y; *plx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); y = new_chunk((size_t)*plx); y[0] = x[0] & ((~((1UL<< (32 - 7)) - 1))|((1UL<<(32 - 1 - 7))-1)); return y; } __inline__ static GEN cgetg(long x, long y) { GEN z = new_chunk((size_t)x); z[0] = (((pari_ulong)(y)) << (32 - 7)) | evallg(x); return z; } __inline__ static GEN cgeti(long x) { GEN z = new_chunk((size_t)x); z[0] = (((pari_ulong)(t_INT)) << (32 - 7)) | evallg(x); return z; } __inline__ static GEN cgetipos(long x) { GEN z = cgeti(x); z[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (x); return z; } __inline__ static GEN cgetineg(long x) { GEN z = cgeti(x); z[1] = ((pari_ulong)(((long)(-1)) << (32 - 2))) | (x); return z; } __inline__ static GEN cgetr(long x) { GEN z = new_chunk((size_t)x); z[0] = (((pari_ulong)(t_REAL)) << (32 - 7)) | evallg(x); return z; } __inline__ static GEN leafcopy(GEN x) { long lx; GEN y = cgetg_copy(x, &lx); while (--lx > 0) y[lx] = x[lx]; return y; } __inline__ static GEN icopy(GEN x) { register long lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); GEN y = cgeti(lx); while (--lx > 0) y[lx] = x[lx]; return y; } __inline__ static GEN rcopy(GEN x) { return leafcopy(x); } __inline__ static GEN mpcopy(GEN x) { return leafcopy(x); } __inline__ static GEN mpabs(GEN x) { GEN y = leafcopy(x); setabssign(y); return y; } __inline__ static GEN absi(GEN x) { return mpabs(x); } __inline__ static GEN absr(GEN x) { return mpabs(x); } __inline__ static GEN mpneg(GEN x) { GEN y = leafcopy(x); togglesign(y); return y; } __inline__ static GEN negi(GEN x) { return mpneg(x); } __inline__ static GEN negr(GEN x) { return mpneg(x); } __inline__ static void togglesign(GEN x) { if (x[1] & (~((1UL<<(32 - 2)) - 1))) { x[1] ^= (1UL << (32 -1)); } } __inline__ static void setabssign(GEN x) { x[1] &= ~(1UL << (32 -1)); } __inline__ static void togglesign_safe(GEN *px) { switch(*px - gen_1) { case 0: *px = gen_m1; break; case 3: *px = gen_m2; break; case 6: *px = gen_1; break; case 9: *px = gen_2; break; default: togglesign(*px); } } __inline__ static void affectsign(GEN x, GEN y) { y[1] = (x[1] & (~((1UL<<(32 - 2)) - 1))) | (y[1] & ~(~((1UL<<(32 - 2)) - 1))); } __inline__ static void affectsign_safe(GEN x, GEN *py) { if (((*py)[1] ^ x[1]) & (1UL << (32 -1))) togglesign_safe(py); } __inline__ static GEN utoineg(pari_ulong x) { GEN y = cgetineg(3); y[2] = x; return y; } __inline__ static GEN utoipos(pari_ulong x) { GEN y = cgetipos(3); y[2] = x; return y; } __inline__ static GEN utoi(pari_ulong x) { return x? utoipos(x): gen_0; } __inline__ static GEN stoi(long x) { if (!x) return gen_0; return x > 0? utoipos((pari_ulong)x): utoineg((pari_ulong)-x); } __inline__ static GEN uutoi(pari_ulong x, pari_ulong y) { GEN z; if (!x) return utoi(y); z = cgetipos(4); *((z)+2+(1)) = x; *((z)+2+(0)) = y; return z; } __inline__ static GEN uutoineg(pari_ulong x, pari_ulong y) { GEN z; if (!x) return y? utoineg(y): gen_0; z = cgetineg(4); *((z)+2+(1)) = x; *((z)+2+(0)) = y; return z; } __inline__ static long itos(GEN x) { long s = ((((long*)(x))[1]) >> (32 - 2)); long u; if (!s) return 0; u = x[2]; if (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))) > 3 || u < 0) pari_err(overflower,"t_INT-->long assignment"); return (s>0) ? u : -u; } __inline__ static long itos_or_0(GEN x) { long n; if (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))) != 3 || (n = x[2]) & (1UL << (32 -1))) return 0; return ((((long*)(x))[1]) >> (32 - 2)) > 0? n: -n; } __inline__ static pari_ulong itou(GEN x) { switch(((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))) { case 2: return 0; case 3: return x[2]; default: pari_err(overflower,"t_INT-->ulong assignment"); return 0; } } __inline__ static pari_ulong itou_or_0(GEN x) { if (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))) != 3) return 0; return (pari_ulong)x[2]; } __inline__ static GEN real_0_bit(long bitprec) { GEN x=cgetr(2); x[1]=evalexpo(bitprec); return x; } __inline__ static GEN real_0(long prec) { return real_0_bit(-bit_accuracy(prec)); } __inline__ static GEN real_1(long prec) { GEN x = cgetr(prec); long i; x[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | ((1UL<<((32 - 2)-1)) + (0)); x[2] = (long)(1UL << (32 -1)); for (i=3; i> (32 - 2))) return -((((long*)(y))[1]) >> (32 - 2)); if (!((((long*)(y))[1]) >> (32 - 2))) return ((((long*)(x))[1]) >> (32 - 2)); av=avma; z = itor(x, ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1)))); avma=av; return cmprr(z,y); } __inline__ static int cmpri(GEN x, GEN y) { return -cmpir(y,x); } __inline__ static int cmpsr(long x, GEN y) { pari_sp av; GEN z; if (!x) return -((((long*)(y))[1]) >> (32 - 2)); av=avma; z = stor(x, 3); avma=av; return cmprr(z,y); } __inline__ static int cmprs(GEN x, long y) { return -cmpsr(y,x); } __inline__ static int cmpui(pari_ulong x, GEN y) { long l = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); pari_ulong p; if (!x) return (l > 2)? -1: 0; if (l == 2) return 1; if (l > 3) return -1; p = y[2]; if (p == x) return 0; return p < x ? 1 : -1; } __inline__ static int cmpiu(GEN x, pari_ulong y) { return -cmpui(y,x); } __inline__ static int cmpsi(long x, GEN y) { pari_ulong p; if (!x) return -((((long*)(y))[1]) >> (32 - 2)); if (x > 0) { if (((((long*)(y))[1]) >> (32 - 2))<=0) return 1; if (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))>3) return -1; p = y[2]; if (p == (pari_ulong)x) return 0; return p < (pari_ulong)x ? 1 : -1; } if (((((long*)(y))[1]) >> (32 - 2))>=0) return -1; if (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))>3) return 1; p = y[2]; if (p == (pari_ulong)-x) return 0; return p < (pari_ulong)(-x) ? -1 : 1; } __inline__ static int cmpis(GEN x, long y) { return -cmpsi(y,x); } __inline__ static int mpcmp(GEN x, GEN y) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? cmpii(x,y) : cmpir(x,y); return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? -cmpir(y,x) : cmprr(x,y); } __inline__ static int equalsi(long x, GEN y) { if (!x) return !((((long*)(y))[1]) >> (32 - 2)); if (x > 0) { if (((((long*)(y))[1]) >> (32 - 2)) <= 0 || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) != 3) return 0; return ((pari_ulong)y[2] == (pari_ulong)x); } if (((((long*)(y))[1]) >> (32 - 2)) >= 0 || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) != 3) return 0; return ((pari_ulong)y[2] == (pari_ulong)-x); } __inline__ static int equalui(pari_ulong x, GEN y) { if (!x) return !((((long*)(y))[1]) >> (32 - 2)); return (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) == 3 && (pari_ulong)y[2] == x); } __inline__ static int equaliu(GEN x, pari_ulong y) { return equalui(y,x); } __inline__ static int equalis(GEN x, long y) { return equalsi(y,x); } __inline__ static int absrnz_equal2n(GEN x) { if ((pari_ulong)x[2]==(1UL << (32 -1))) { long i, lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); for (i = 3; i < lx; i++) if (x[i]) return 0; return 1; } return 0; } __inline__ static int absrnz_equal1(GEN x) { return !((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) && absrnz_equal2n(x); } __inline__ static long maxss(long x, long y) { return x>y?x:y; } __inline__ static long minss(long x, long y) { return xy?x:y; } __inline__ static double maxdd(double x, double y) { return x>y?x:y; } __inline__ static double mindd(double x, double y) { return x __arg1); __arg1 - __arg2; }); return overflow? utoineg(-z): utoi(z); } __inline__ static GEN adduu(pari_ulong x, pari_ulong y) { pari_ulong t = x+y; return uutoi((t < x), t); } __inline__ static GEN addss(long x, long y) { if (!x) return stoi(y); if (!y) return stoi(x); if (x > 0) return y > 0? adduu(x,y): subuu(x, -y); if (y > 0) return subuu(y, -x); else { pari_ulong t = (-x)+(-y); return uutoineg((t < (pari_ulong)(-x)), t); } } __inline__ static GEN subss(long x, long y) { return addss(-y,x); } __inline__ static GEN subii(GEN x, GEN y) { if (x==y) return gen_0; return addii_sign(x, ((((long*)(x))[1]) >> (32 - 2)), y, -((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN addii(GEN x, GEN y) { return addii_sign(x, ((((long*)(x))[1]) >> (32 - 2)), y, ((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN addrr(GEN x, GEN y) { return addrr_sign(x, ((((long*)(x))[1]) >> (32 - 2)), y, ((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN subrr(GEN x, GEN y) { return addrr_sign(x, ((((long*)(x))[1]) >> (32 - 2)), y, -((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN addir(GEN x, GEN y) { return addir_sign(x, ((((long*)(x))[1]) >> (32 - 2)), y, ((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN subir(GEN x, GEN y) { return addir_sign(x, ((((long*)(x))[1]) >> (32 - 2)), y, -((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN subri(GEN x, GEN y) { return addir_sign(y, -((((long*)(y))[1]) >> (32 - 2)), x, ((((long*)(x))[1]) >> (32 - 2))); } __inline__ static GEN addsi(long x, GEN y) { return addsi_sign(x, y, ((((long*)(y))[1]) >> (32 - 2))); } __inline__ static GEN subsi(long x, GEN y) { return addsi_sign(x, y, -((((long*)(y))[1]) >> (32 - 2))); } __inline__ static pari_ulong mod2BIL(GEN x) { return *((x)+2); } __inline__ static long mod64(GEN x) { return mod2BIL(x) & 63; } __inline__ static long mod32(GEN x) { return mod2BIL(x) & 31; } __inline__ static long mod16(GEN x) { return mod2BIL(x) & 15; } __inline__ static long mod8(GEN x) { return mod2BIL(x) & 7; } __inline__ static long mod4(GEN x) { return mod2BIL(x) & 3; } __inline__ static long mod2(GEN x) { return mod2BIL(x) & 1; } __inline__ static int mpodd(GEN x) { return ((((long*)(x))[1]) >> (32 - 2)) && mod2(x); } __inline__ static GEN truedivii(GEN a,GEN b) { return truedvmdii(a,b,((void *)0)); } __inline__ static GEN truedivis(GEN a, long b) { return truedvmdis(a,b,((void *)0)); } __inline__ static GEN truedivsi(long a, GEN b) { return truedvmdsi(a,b,((void *)0)); } __inline__ static GEN divii(GEN a, GEN b) { return dvmdii(a,b,((void *)0)); } __inline__ static GEN remii(GEN a, GEN b) { return dvmdii(a,b,((GEN*)0x1L)); } __inline__ static GEN divss(long x, long y) { return stoi(x / y); } __inline__ static GEN modss(long x, long y) { return stoi(smodss(x, y)); } __inline__ static GEN remss(long x, long y) { return stoi(x % y); } __inline__ static long smodss(long x, long y) { long r = x%y; return (r >= 0)? r: labs(y) + r; } __inline__ static long sdivss_rem(long x, long y, long *r) { long q; register pari_ulong hiremainder; if (!y) pari_err(gdiver); hiremainder = 0; q = __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = (pari_ulong)labs(x); __d = (pari_ulong)labs(y); if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); if (x < 0) { hiremainder = -((long)hiremainder); q = -q; } if (y < 0) q = -q; *r = hiremainder; return q; } __inline__ static GEN divss_rem(long x, long y, long *r) { return stoi(sdivss_rem(x,y,r)); } __inline__ static pari_ulong udivui_rem(pari_ulong x, GEN y, pari_ulong *r) { long q, s = ((((long*)(y))[1]) >> (32 - 2)); register pari_ulong hiremainder; if (!s) pari_err(gdiver); if (!x || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))>3) { *r = x; return 0; } hiremainder=0; q = (long)__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = x; __d = (pari_ulong)y[2]; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); if (s < 0) q = -q; *r = hiremainder; return q; } __inline__ static long sdivsi_rem(long x, GEN y, long *r) { long q, s = ((((long*)(y))[1]) >> (32 - 2)); register pari_ulong hiremainder; if (!s) pari_err(gdiver); if (!x || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))>3 || ((long)y[2]) < 0) { *r = x; return 0; } hiremainder=0; q = (long)__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = labs(x); __d = (pari_ulong)y[2]; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); if (x < 0) { hiremainder = -((long)hiremainder); q = -q; } if (s < 0) q = -q; *r = hiremainder; return q; } __inline__ static GEN divsi_rem(long s, GEN y, long *r) { return stoi(sdivsi_rem(s,y,r)); } __inline__ static long sdivsi(long x, GEN y) { long q, s = ((((long*)(y))[1]) >> (32 - 2)); if (!s) pari_err(gdiver); if (!x || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))>3 || ((long)y[2]) < 0) return 0; q = labs(x) / y[2]; if (x < 0) q = -q; if (s < 0) q = -q; return q; } __inline__ static GEN dvmdss(long x, long y, GEN *z) { long r; GEN q = divss_rem(x,y, &r); *z = stoi(r); return q; } __inline__ static long dvmdsBIL(long n, long *r) { *r = remsBIL(n); return divsBIL(n); } __inline__ static pari_ulong dvmduBIL(pari_ulong n, pari_ulong *r) { *r = remsBIL(n); return divsBIL(n); } __inline__ static GEN dvmdsi(long x, GEN y, GEN *z) { long r; GEN q = divsi_rem(x,y, &r); *z = stoi(r); return q; } __inline__ static GEN dvmdis(GEN x, long y, GEN *z) { long r; GEN q = divis_rem(x,y, &r); *z = stoi(r); return q; } __inline__ static long smodis(GEN x, long y) { pari_sp av = avma; long r; (void)divis_rem(x,y, &r); avma = av; return (r >= 0) ? r: labs(y) + r; } __inline__ static GEN modis(GEN x, long y) { return stoi(smodis(x,y)); } __inline__ static GEN modsi(long x, GEN y) { long r; (void)sdivsi_rem(x, y, &r); return (r >= 0)? stoi(r): addsi_sign(r, y, 1); } __inline__ static pari_ulong umodui(pari_ulong x, GEN y) { if (!((((long*)(y))[1]) >> (32 - 2))) pari_err(gdiver); if (!x || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) > 3) return x; return x % (pari_ulong)y[2]; } __inline__ static GEN remsi(long x, GEN y) { long r; (void)sdivsi_rem(x,y, &r); return stoi(r); } __inline__ static GEN remis(GEN x, long y) { pari_sp av = avma; long r; (void)divis_rem(x,y, &r); avma = av; return stoi(r); } __inline__ static GEN rdivis(GEN x, long y, long prec) { GEN z = cgetr(prec); pari_sp av = avma; affrr(divrs(itor(x,prec), y),z); avma = av; return z; } __inline__ static GEN rdivsi(long x, GEN y, long prec) { GEN z = cgetr(prec); pari_sp av = avma; affrr(divsr(x, itor(y,prec)), z); avma = av; return z; } __inline__ static GEN rdivss(long x, long y, long prec) { GEN z = cgetr(prec); pari_sp av = avma; affrr(divrs(stor(x, prec), y), z); avma = av; return z; } __inline__ static void rdiviiz(GEN x, GEN y, GEN z) { pari_sp av = avma; long prec = ((long)(((pari_ulong*)(z))[0] & ((1UL<<(32 - 1 - 7))-1))); affir(x, z); if (!is_bigint(y)) { affrr(divrs(z, y[2]), z); if (((((long*)(y))[1]) >> (32 - 2)) < 0) togglesign(z); } else affrr(divrr(z, itor(y,prec)), z); avma = av; } __inline__ static GEN rdivii(GEN x, GEN y, long prec) { GEN z = cgetr(prec); pari_sp av = avma; affir(x, z); if (!is_bigint(y)) { affrr(divrs(z, y[2]), z); if (((((long*)(y))[1]) >> (32 - 2)) < 0) togglesign(z); } else affrr(divrr(z, itor(y,prec)), z); avma = av; return z; } __inline__ static GEN fractor(GEN x, long prec) { return rdivii((((GEN*) (x))[1]), (((GEN*) (x))[2]), prec); } __inline__ static int dvdii(GEN x, GEN y) { pari_sp av=avma; GEN r = remii(x,y); avma = av; return r == gen_0; } __inline__ static int dvdsi(long x, GEN y) { if (!((((long*)(y))[1]) >> (32 - 2))) return x == 0; if (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) != 3) return 0; return x % y[2] == 0; } __inline__ static int dvdui(pari_ulong x, GEN y) { if (!((((long*)(y))[1]) >> (32 - 2))) return x == 0; if (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) != 3) return 0; return x % y[2] == 0; } __inline__ static int dvdis(GEN x, long y) { return y? smodis(x, y) == 0: ((((long*)(x))[1]) >> (32 - 2)) == 0; } __inline__ static int dvdiu(GEN x, pari_ulong y) { return y? umodiu(x, y) == 0: ((((long*)(x))[1]) >> (32 - 2)) == 0; } __inline__ static int dvdisz(GEN x, long y, GEN z) { const pari_sp av = avma; long r; GEN p1 = divis_rem(x,y, &r); avma = av; if (r) return 0; affii(p1,z); return 1; } __inline__ static int dvdiuz(GEN x, pari_ulong y, GEN z) { const pari_sp av = avma; pari_ulong r; GEN p1 = diviu_rem(x,y, &r); avma = av; if (r) return 0; affii(p1,z); return 1; } __inline__ static int dvdiiz(GEN x, GEN y, GEN z) { const pari_sp av=avma; GEN p2; const GEN p1=dvmdii(x,y,&p2); if (((((long*)(p2))[1]) >> (32 - 2))) { avma=av; return 0; } affii(p1,z); avma=av; return 1; } __inline__ static GEN mptrunc(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT? icopy(x): truncr(x); } __inline__ static GEN mpfloor(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT? icopy(x): floorr(x); } __inline__ static GEN mpceil(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT? icopy(x): ceilr(x); } __inline__ static GEN mpround(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) == t_INT? icopy(x): roundr(x); } __inline__ static long mpexpo(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) == t_INT? expi(x): ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); } __inline__ static GEN mpadd(GEN x, GEN y) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? addii(x,y) : addir(x,y); return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? addir(y,x) : addrr(x,y); } __inline__ static GEN mpsub(GEN x, GEN y) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? subii(x,y) : subir(x,y); return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? subri(x,y) : subrr(x,y); } __inline__ static GEN mpmul(GEN x, GEN y) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? mulii(x,y) : mulir(x,y); return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? mulir(y,x) : mulrr(x,y); } __inline__ static GEN mpsqr(GEN x) { return (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) ? sqri(x) : sqrr(x); } __inline__ static GEN mpdiv(GEN x, GEN y) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? divii(x,y) : divir(x,y); return (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) ? divri(x,y) : divrr(x,y); } __inline__ static pari_ulong Fl_add(pari_ulong a, pari_ulong b, pari_ulong p) { pari_ulong res = a + b; return (res >= p || res < a) ? res - p : res; } __inline__ static pari_ulong Fl_neg(pari_ulong x, pari_ulong p) { return x ? p - x: 0; } __inline__ static pari_ulong Fl_sub(pari_ulong a, pari_ulong b, pari_ulong p) { pari_ulong res = a - b; return (res > a) ? res + p: res; } __inline__ static long Fl_center(pari_ulong u, pari_ulong p, pari_ulong ps2) { return (long) (u > ps2)? u - p: u; } __inline__ static pari_ulong Fl_mul(pari_ulong a, pari_ulong b, pari_ulong p) { register pari_ulong hiremainder; { register pari_ulong x = __extension__ ({ const pari_ulong __x = (a), __y = (b); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); (void)__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = x; __d = p; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); } return hiremainder; } __inline__ static pari_ulong Fl_sqr(pari_ulong a, pari_ulong p) { register pari_ulong hiremainder; { register pari_ulong x = __extension__ ({ const pari_ulong __x = (a), __y = (a); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); (void)__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = x; __d = p; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); } return hiremainder; } __inline__ static pari_ulong Fl_div(pari_ulong a, pari_ulong b, pari_ulong p) { return Fl_mul(a, Fl_inv(b, p), p); } __inline__ static GEN addri(GEN x, GEN y) { return addir(y,x); } __inline__ static GEN addis(GEN x, long s) { return addsi(s,x); } __inline__ static GEN addrs(GEN x, long s) { return addsr(s,x); } __inline__ static GEN subis(GEN x, long y) { return addsi(-y,x); } __inline__ static GEN subrs(GEN x, long y) { return addsr(-y,x); } __inline__ static GEN mulis(GEN x, long s) { return mulsi(s,x); } __inline__ static GEN muliu(GEN x, pari_ulong s) { return mului(s,x); } __inline__ static GEN mulru(GEN x, pari_ulong s) { return mulur(s,x); } __inline__ static GEN mulri(GEN x, GEN s) { return mulir(s,x); } __inline__ static GEN mulrs(GEN x, long s) { return mulsr(s,x); } __inline__ static long vali(GEN x) { long i; GEN xp; if (!((((long*)(x))[1]) >> (32 - 2))) return -1; xp=((x)+2); for (i=0; !*xp; i++) xp=((xp)+1); return vals(*xp) + i * 32; } __inline__ static long expu(pari_ulong x) { return (32 -1) - (long)__extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(x); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); } __inline__ static long expi(GEN x) { const long lx=((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); return lx==2? -(long)(1UL<<((32 - 2)-1)): bit_accuracy(lx)-(long)__extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(*((x)+((long)(((pari_ulong*)((x)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1)); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; })-1; } __inline__ static GEN shiftr(GEN x, long n) { const long e = evalexpo(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))+n); const GEN y = rcopy(x); if (e & ~((1UL<<(32 - 2))-1)) pari_err(overflower,"expo()"); y[1] = (y[1]&~((1UL<<(32 - 2))-1)) | e; return y; } __inline__ static GEN mpshift(GEN x,long s) { return (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT)?shifti(x,s):shiftr(x,s); } __inline__ static void shift_left(GEN z2, GEN z1, long imin, long imax, pari_ulong f, pari_ulong sh) { GEN sb = z1 + imin, se = z1 + imax, te = z2 + imax; pari_ulong l, m = 32 - sh, k = f >> m; while (se > sb) { l = *se--; *te-- = (l << sh) | k; k = l >> m; } *te = (*se << sh) | k; } __inline__ static void shift_right(GEN z2, GEN z1, long imin, long imax, pari_ulong f, pari_ulong sh) { GEN sb = z1 + imin, se = z1 + imax, tb = z2 + imin; pari_ulong k, l = *sb++, m = 32 - sh; *tb++ = (l >> sh) | (f << m); while (sb < se) { k = l << m; l = *sb++; *tb++ = (l >> sh) | k; } } extern pari_ulong hiremainder; __inline__ static pari_ulong shiftl(pari_ulong x, pari_ulong y) { hiremainder = x>>(32 -y); return (x<>y); } __inline__ static void affii(GEN x, GEN y) { long lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); if (((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1)))t_INT assignment"); while (--lx) y[lx] = x[lx]; } __inline__ static void affsi(long s, GEN x) { if (!s) x[1] = ((pari_ulong)(((long)(0)) << (32 - 2))) | (2); else { if (s > 0) { x[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (3); x[2] = s; } else { x[1] = ((pari_ulong)(((long)(-1)) << (32 - 2))) | (3); x[2] = -s; } } } __inline__ static void affui(pari_ulong u, GEN x) { if (!u) x[1] = ((pari_ulong)(((long)(0)) << (32 - 2))) | (2); else { x[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (3); x[2] = u; } } __inline__ static void affsr(long x, GEN y) { long sh, i, ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (!x) { y[1] = evalexpo(-bit_accuracy(ly)); return; } if (x < 0) { x = -x; sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(x); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); y[1] = ((pari_ulong)(((long)(-1)) << (32 - 2))) | ((1UL<<((32 - 2)-1)) + ((32 -1)-sh)); } else { sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(x); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); y[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | ((1UL<<((32 - 2)-1)) + ((32 -1)-sh)); } y[2] = x<>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); y[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | ((1UL<<((32 - 2)-1)) + ((32 -1)-sh)); y[2] = x<> (32 - 7)))==t_INT) affii(x,y); else affir(x,y); } __inline__ static void affsz(long x, GEN y) { if (((long)((((pari_ulong*)(y))[0]) >> (32 - 7)))==t_INT) affsi(x,y); else affsr(x,y); } __inline__ static void mpaff(GEN x, GEN y) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT) affiz(x, y); else affrr(x,y); } __inline__ static void addiiz(GEN x, GEN y, GEN z) { pari_sp av = avma; affii(addii(x,y),z); avma = av; } __inline__ static void addirz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(addir(x,y),z); avma = av; } __inline__ static void addriz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(addri(x,y),z); avma = av; } __inline__ static void addrrz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(addrr(x,y),z); avma = av; } __inline__ static void addsiz(long s, GEN y, GEN z) { pari_sp av = avma; affii(addsi(s,y),z); avma = av; } __inline__ static void addsrz(long s, GEN y, GEN z) { pari_sp av = avma; affrr(addsr(s,y),z); avma = av; } __inline__ static void addssz(long s, long y, GEN z) { pari_sp av = avma; affii(addss(s,y),z); avma = av; } __inline__ static void diviiz(GEN x, GEN y, GEN z) { pari_sp av = avma; affii(divii(x,y),z); avma = av; } __inline__ static void divirz(GEN x, GEN y, GEN z) { pari_sp av = avma; mpaff(divir(x,y),z); avma = av; } __inline__ static void divisz(GEN x, long y, GEN z) { pari_sp av = avma; affii(divis(x,y),z); avma = av; } __inline__ static void divriz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(divri(x,y),z); avma = av; } __inline__ static void divrrz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(divrr(x,y),z); avma = av; } __inline__ static void divrsz(GEN y, long s, GEN z) { pari_sp av = avma; affrr(divrs(y,s),z); avma = av; } __inline__ static void divsiz(long x, GEN y, GEN z) { long junk; affsi(sdivsi_rem(x,y,&junk), z); } __inline__ static void divsrz(long s, GEN y, GEN z) { pari_sp av = avma; mpaff(divsr(s,y),z); avma = av; } __inline__ static void divssz(long x, long y, GEN z) { affsi(x/y, z); } __inline__ static void modisz(GEN y, long s, GEN z) { pari_sp av = avma; affii(modis(y,s),z); avma = av; } __inline__ static void modsiz(long s, GEN y, GEN z) { pari_sp av = avma; affii(modsi(s,y),z); avma = av; } __inline__ static void modssz(long s, long y, GEN z) { pari_sp av = avma; affii(modss(s,y),z); avma = av; } __inline__ static void mpaddz(GEN x, GEN y, GEN z) { pari_sp av = avma; mpaff(mpadd(x,y),z); avma = av; } __inline__ static void mpsubz(GEN x, GEN y, GEN z) { pari_sp av = avma; mpaff(mpsub(x,y),z); avma = av; } __inline__ static void mpmulz(GEN x, GEN y, GEN z) { pari_sp av = avma; mpaff(mpmul(x,y),z); avma = av; } __inline__ static void muliiz(GEN x, GEN y, GEN z) { pari_sp av = avma; affii(mulii(x,y),z); avma = av; } __inline__ static void mulirz(GEN x, GEN y, GEN z) { pari_sp av = avma; mpaff(mulir(x,y),z); avma = av; } __inline__ static void mulriz(GEN x, GEN y, GEN z) { pari_sp av = avma; mpaff(mulri(x,y),z); avma = av; } __inline__ static void mulrrz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(mulrr(x,y),z); avma = av; } __inline__ static void mulsiz(long s, GEN y, GEN z) { pari_sp av = avma; affii(mulsi(s,y),z); avma = av; } __inline__ static void mulsrz(long s, GEN y, GEN z) { pari_sp av = avma; mpaff(mulsr(s,y),z); avma = av; } __inline__ static void mulssz(long s, long y, GEN z) { pari_sp av = avma; affii(mulss(s,y),z); avma = av; } __inline__ static void remiiz(GEN x, GEN y, GEN z) { pari_sp av = avma; affii(remii(x,y),z); avma = av; } __inline__ static void remisz(GEN y, long s, GEN z) { pari_sp av = avma; affii(remis(y,s),z); avma = av; } __inline__ static void remsiz(long s, GEN y, GEN z) { pari_sp av = avma; affii(remsi(s,y),z); avma = av; } __inline__ static void remssz(long s, long y, GEN z) { pari_sp av = avma; affii(remss(s,y),z); avma = av; } __inline__ static void subiiz(GEN x, GEN y, GEN z) { pari_sp av = avma; affii(subii(x,y),z); avma = av; } __inline__ static void subirz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(subir(x,y),z); avma = av; } __inline__ static void subisz(GEN y, long s, GEN z) { pari_sp av = avma; affii(addsi(-s,y),z); avma = av; } __inline__ static void subriz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(subri(x,y),z); avma = av; } __inline__ static void subrrz(GEN x, GEN y, GEN z) { pari_sp av = avma; affrr(subrr(x,y),z); avma = av; } __inline__ static void subrsz(GEN y, long s, GEN z) { pari_sp av = avma; affrr(addsr(-s,y),z); avma = av; } __inline__ static void subsiz(long s, GEN y, GEN z) { pari_sp av = avma; affii(subsi(s,y),z); avma = av; } __inline__ static void subsrz(long s, GEN y, GEN z) { pari_sp av = avma; affrr(subsr(s,y),z); avma = av; } __inline__ static void subssz(long x, long y, GEN z) { addssz(x,-y,z); } __inline__ static void dvmdssz(long x, long y, GEN z, GEN t) { pari_sp av = avma; long r; affii(divss_rem(x,y, &r), z); avma = av; affsi(r,t); } __inline__ static void dvmdsiz(long x, GEN y, GEN z, GEN t) { pari_sp av = avma; long r; affii(divsi_rem(x,y, &r), z); avma = av; affsi(r,t); } __inline__ static void dvmdisz(GEN x, long y, GEN z, GEN t) { pari_sp av = avma; long r; affii(divis_rem(x,y, &r),z); avma = av; affsi(r,t); } __inline__ static void dvmdiiz(GEN x, GEN y, GEN z, GEN t) { pari_sp av = avma; GEN r; affii(dvmdii(x,y,&r),z); affii(r,t); avma=av; } # 60 "../src/headers/pari.h" 2 # 1 "../src/headers/pariinl.h" 1 # 21 "../src/headers/pariinl.h" __inline__ static GEN mkintmod(GEN x, GEN y) { GEN v = cgetg(3, t_INTMOD); (((GEN*) (v))[1]) = y; (((GEN*) (v))[2]) = x; return v; } __inline__ static GEN mkintmodu(pari_ulong x, pari_ulong y) { GEN v = cgetg(3,t_INTMOD); (((GEN*) (v))[1]) = utoipos(y); (((GEN*) (v))[2]) = utoi(x); return v; } __inline__ static GEN mkpolmod(GEN x, GEN y) { GEN v = cgetg(3, t_POLMOD); (((GEN*) (v))[1]) = y; (((GEN*) (v))[2]) = x; return v; } __inline__ static GEN mkfrac(GEN x, GEN y) { GEN v = cgetg(3, t_FRAC); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; return v; } __inline__ static GEN mkfraccopy(GEN x, GEN y) { GEN v = cgetg(3, t_FRAC); (((GEN*) (v))[1]) = icopy(x); (((GEN*) (v))[2]) = icopy(y); return v; } __inline__ static GEN mkrfrac(GEN x, GEN y) { GEN v = cgetg(3, t_RFRAC); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; return v; } __inline__ static GEN mkcomplex(GEN x, GEN y) { GEN v = cgetg(3, t_COMPLEX); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; return v; } __inline__ static GEN gen_I(void) { return mkcomplex(gen_0, gen_1); } __inline__ static GEN cgetc(long l) { GEN u = cgetg(3,t_COMPLEX); (((GEN*) (u))[1]) = cgetr(l); (((GEN*) (u))[2]) = cgetr(l); return u; } __inline__ static GEN mkquad(GEN n, GEN x, GEN y) { GEN v = cgetg(4, t_QUAD); (((GEN*) (v))[1]) = n; (((GEN*) (v))[2]) = x; (((GEN*) (v))[3]) = y; return v; } __inline__ static GEN mkvecsmall(long x) { GEN v = cgetg(2, t_VECSMALL); v[1] = x; return v; } __inline__ static GEN mkvecsmall2(long x,long y) { GEN v = cgetg(3, t_VECSMALL); v[1]=x; v[2]=y; return v; } __inline__ static GEN mkvecsmall3(long x,long y,long z) { GEN v = cgetg(4, t_VECSMALL); v[1]=x; v[2]=y; v[3]=z; return v; } __inline__ static GEN mkvecsmall4(long x,long y,long z,long t) { GEN v = cgetg(5, t_VECSMALL); v[1]=x; v[2]=y; v[3]=z; v[4]=t; return v; } __inline__ static GEN mkvec(GEN x) { GEN v = cgetg(2, t_VEC); (((GEN*) (v))[1]) = x; return v; } __inline__ static GEN mkvec2(GEN x, GEN y) { GEN v = cgetg(3,t_VEC); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; return v; } __inline__ static GEN mkvec3(GEN x, GEN y, GEN z) { GEN v=cgetg(4,t_VEC); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; (((GEN*) (v))[3]) = z; return v; } __inline__ static GEN mkvec4(GEN x, GEN y, GEN z, GEN t) { GEN v=cgetg(5,t_VEC); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; (((GEN*) (v))[3]) = z; (((GEN*) (v))[4]) = t; return v; } __inline__ static GEN mkvec5(GEN x, GEN y, GEN z, GEN t, GEN u) { GEN v=cgetg(6,t_VEC); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; (((GEN*) (v))[3]) = z; (((GEN*) (v))[4]) = t; (((GEN*) (v))[5]) = u; return v; } __inline__ static GEN mkvecs(long x) { GEN v = cgetg(2, t_VEC); (((GEN*) (v))[1]) = stoi(x); return v; } __inline__ static GEN mkvec2s(long x, long y) { GEN v = cgetg(3,t_VEC); (((GEN*) (v))[1]) = stoi(x); (((GEN*) (v))[2]) = stoi(y); return v; } __inline__ static GEN mkvec3s(long x, long y, long z) { GEN v=cgetg(4,t_VEC); (((GEN*) (v))[1])=stoi(x); (((GEN*) (v))[2])=stoi(y); (((GEN*) (v))[3])=stoi(z); return v; } __inline__ static GEN mkveccopy(GEN x) { GEN v = cgetg(2, t_VEC); (((GEN*) (v))[1]) = gcopy(x); return v; } __inline__ static GEN mkvec2copy(GEN x, GEN y) { GEN v = cgetg(3,t_VEC); (((GEN*) (v))[1]) = gcopy(x); (((GEN*) (v))[2]) = gcopy(y); return v; } __inline__ static GEN mkcol(GEN x) { GEN v = cgetg(2, t_COL); (((GEN*) (v))[1]) = x; return v; } __inline__ static GEN mkcol2(GEN x, GEN y) { GEN v = cgetg(3,t_COL); (((GEN*) (v))[1]) = x; (((GEN*) (v))[2]) = y; return v; } __inline__ static GEN mkcolcopy(GEN x) { GEN v = cgetg(2, t_COL); (((GEN*) (v))[1]) = gcopy(x); return v; } __inline__ static GEN mkmat(GEN x) { GEN v = cgetg(2, t_MAT); (((GEN*) (v))[1]) = x; return v; } __inline__ static GEN mkmat2(GEN x, GEN y) { GEN v=cgetg(3,t_MAT); (((GEN*) (v))[1])=x; (((GEN*) (v))[2])=y; return v; } __inline__ static GEN mkmatcopy(GEN x) { GEN v = cgetg(2, t_MAT); (((GEN*) (v))[1]) = gcopy(x); return v; } __inline__ static GEN pol_x(long v) { GEN p = cgetg(4, t_POL); p[1] = ((pari_ulong)(((long)(1)) << (32 - 2)))|(((pari_ulong)(v)) << (32 - 2 - 14)); (((GEN*) (p))[2]) = gen_0; (((GEN*) (p))[3]) = gen_1; return p; } __inline__ static GEN pol_1(long v) { GEN p = cgetg(3, t_POL); p[1] = ((pari_ulong)(((long)(1)) << (32 - 2)))|(((pari_ulong)(v)) << (32 - 2 - 14)); (((GEN*) (p))[2]) = gen_1; return p; } __inline__ static GEN pol_0(long v) { GEN x = cgetg(2,t_POL); x[1] = (((pari_ulong)(v)) << (32 - 2 - 14)); return x; } __inline__ static GEN const_vec(long n, GEN x) { GEN v = cgetg(n+1, t_VEC); long i; for (i = 1; i <= n; i++) (((GEN*) (v))[i]) = x; return v; } __inline__ static GEN const_col(long n, GEN x) { GEN v = cgetg(n+1, t_COL); long i; for (i = 1; i <= n; i++) (((GEN*) (v))[i]) = x; return v; } __inline__ static GEN const_vecsmall(long n, long c) { long i; GEN V = cgetg(n+1,t_VECSMALL); for(i=1;i<=n;i++) V[i] = c; return V; } __inline__ static GEN zeropadic(GEN p, long e) { GEN y = cgetg(5,t_PADIC); (((GEN*) (y))[4]) = gen_0; (((GEN*) (y))[3]) = gen_1; (((GEN*) (y))[2]) = icopy(p); y[1] = evalvalp(e) | (((long)(0)) << (32 - 2 - 14)); return y; } __inline__ static GEN zeroser(long v, long e) { GEN x = cgetg(2, t_SER); x[1] = evalvalp(e) | (((pari_ulong)(v)) << (32 - 2 - 14)); return x; } __inline__ static GEN zeropol(long v) { return pol_0(v); } __inline__ static GEN zerocol(long n) { GEN y = cgetg(n+1,t_COL); long i; for (i=1; i<=n; i++) (((GEN*) (y))[i]) = gen_0; return y; } __inline__ static GEN zerovec(long n) { GEN y = cgetg(n+1,t_VEC); long i; for (i=1; i<=n; i++) (((GEN*) (y))[i]) = gen_0; return y; } __inline__ static GEN zeromat(long m, long n) { GEN y = cgetg(n+1,t_MAT); GEN v = zerocol(m); long i; for (i=1; i<=n; i++) (((GEN*) (y))[i]) = v; return y; } __inline__ static GEN zero_Flx(long sv) { return pol0_Flx(sv); } __inline__ static GEN zero_Flv(long n) { GEN y = cgetg(n+1,t_VECSMALL); long i; for (i=1; i<=n; i++) y[i] = 0; return y; } __inline__ static GEN zero_Flm(long m, long n) { GEN y = cgetg(n+1,t_MAT); GEN v = zero_Flv(m); long i; for (i=1; i<=n; i++) (((GEN*) (y))[i]) = v; return y; } __inline__ static GEN zero_Flm_copy(long m, long n) { GEN y = cgetg(n+1,t_MAT); long i; for (i=1; i<=n; i++) (((GEN*) (y))[i]) = zero_Flv(m); return y; } __inline__ static GEN zero_F2v(long m) { long l = nbits2nlong(m); GEN v = const_vecsmall(l+1, 0); v[1] = m; return v; } __inline__ static GEN zero_F2m(long m, long n) { long i; GEN M = cgetg(n+1, t_MAT); GEN v = zero_F2v(m); for (i = 1; i <= n; i++) (((GEN*) (M))[i]) = v; return M; } __inline__ static GEN zero_F2m_copy(long m, long n) { long i; GEN M = cgetg(n+1, t_MAT); for (i = 1; i <= n; i++) (((GEN*) (M))[i])= zero_F2v(m); return M; } __inline__ static GEN zeromatcopy(long m, long n) { GEN y = cgetg(n+1,t_MAT); long i; for (i=1; i<=n; i++) (((GEN*) (y))[i]) = zerocol(m); return y; } __inline__ static GEN col_ei(long n, long i) { GEN e = zerocol(n); (((GEN*) (e))[i]) = gen_1; return e; } __inline__ static GEN vec_ei(long n, long i) { GEN e = zerovec(n); (((GEN*) (e))[i]) = gen_1; return e; } __inline__ static GEN vecsmall_ei(long n, long i) { GEN e = const_vecsmall(n,0); e[i] = 1; return e; } __inline__ static GEN Rg_col_ei(GEN x, long n, long i) { GEN e = zerocol(n); (((GEN*) (e))[i]) = x; return e; } __inline__ static GEN shallowcopy(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) == t_MAT ? RgM_shallowcopy(x): leafcopy(x); } __inline__ static GEN vectrunc_init(long l) { GEN z = new_chunk(l); z[0] = (((pari_ulong)(t_VEC)) << (32 - 7)) | (1); return z; } __inline__ static void vectrunc_append(GEN x, GEN t) { long l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); (((GEN*) (x))[l]) = t; (((pari_ulong*)(x))[0]= (((pari_ulong*)(x))[0]&(~((1UL<<(32 - 1 - 7))-1))) | evallg(l+1)); } __inline__ static GEN vecsmalltrunc_init(long l) { GEN z = new_chunk(l); z[0] = (((pari_ulong)(t_VECSMALL)) << (32 - 7)) | (1); return z; } __inline__ static void vecsmalltrunc_append(GEN x, long t) { long l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); x[l] = t; (((pari_ulong*)(x))[0]= (((pari_ulong*)(x))[0]&(~((1UL<<(32 - 1 - 7))-1))) | evallg(l+1)); } __inline__ static GEN vec_shorten(GEN v, long n) { long i; GEN V = cgetg(n+1,t_VEC); for(i=1;i<=n;i++) V[i] = v[i]; return V; } __inline__ static GEN vec_lengthen(GEN v, long n) { long i; long l=((long)(((pari_ulong*)(v))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN V = cgetg(n+1,t_VEC); for(i=1;i> (32 - 7)))); res[1] = s; for (i = 2; i <= l2; ++i) res[i] = V[i - 1]; return res; } __inline__ static GEN vecsmall_append(GEN V, long s) { long i, l2 = ((long)(((pari_ulong*)(V))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN res = cgetg(l2+1, ((long)((((pari_ulong*)(V))[0]) >> (32 - 7)))); for (i = 1; i < l2; ++i) res[i] = V[i]; res[l2] = s; return res; } __inline__ static GEN vecsmall_concat(GEN u, GEN v) { long i, l1 = ((long)(((pari_ulong*)(u))[0] & ((1UL<<(32 - 1 - 7))-1)))-1, l2 = ((long)(((pari_ulong*)(v))[0] & ((1UL<<(32 - 1 - 7))-1)))-1; GEN res = cgetg(l1+l2+1, t_VECSMALL); for (i = 1; i <= l1; ++i) res[i] = u[i]; for (i = 1; i <= l2; ++i) res[i+l1] = v[i]; return res; } __inline__ static long vecsmall_coincidence(GEN u, GEN v) { long i, s = 0, l = minss(((long)(((pari_ulong*)(u))[0] & ((1UL<<(32 - 1 - 7))-1))),((long)(((pari_ulong*)(v))[0] & ((1UL<<(32 - 1 - 7))-1)))); for(i=1; i t) t = x[i]; return t; } __inline__ static long vecsmall_min(GEN x) { long i, t = x[1], lx =((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); for (i=2; i 1) if (((((long*)((((GEN*) (x))[l])))[1]) >> (32 - 2))) return 0; return 1; } __inline__ static int QV_isscalar(GEN x) { long lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))),i; for (i=2; i2; i--) if (!gequal0((((GEN*) (x))[i]))) return 0; return 1; } __inline__ static int RgX_is_rational(GEN x) { long i; for (i = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-1; i > 1; i--) if (!is_rational_t(((long)((((pari_ulong*)((((GEN*) (x))[i])))[0]) >> (32 - 7))))) return 0; return 1; } __inline__ static int RgX_is_ZX(GEN x) { long i; for (i = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-1; i > 1; i--) if (((long)((((pari_ulong*)((((GEN*) (x))[i])))[0]) >> (32 - 7))) != t_INT) return 0; return 1; } __inline__ static int RgX_is_monomial(GEN x) { long i; if (!((((long*)(x))[1]) >> (32 - 2))) return 0; for (i=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-2; i>1; i--) if (!isexactzero((((GEN*) (x))[i]))) return 0; return 1; } __inline__ static int RgM_is_ZM(GEN x) { long i, j, h, l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); if (l == 1) return 1; h = ((long)(((pari_ulong*)((((GEN*) (x))[1])))[0] & ((1UL<<(32 - 1 - 7))-1))); for (j = l-1; j > 0; j--) for (i = h-1; i > 0; i--) if (((long)((((pari_ulong*)((((GEN**)(x))[j][i])))[0]) >> (32 - 7))) != t_INT) return 0; return 1; } __inline__ static void ** stack_base(pari_stack *s) { return (void **) ((char *)s+s->offset); } __inline__ static void stack_init(pari_stack *s, size_t size, void **data) { s->offset = (char *)data-(char *)s; *data = ((void *)0); s->n = 0; s->alloc = 0; s->size = size; } __inline__ static void stack_alloc(pari_stack *s, long nb) { void **sdat = stack_base(s); if (s->n+nb <= s->alloc) return; if (!s->alloc) s->alloc = nb; else { while (s->n+nb > s->alloc) s->alloc <<= 1; } *sdat = pari_realloc(*sdat,s->alloc*s->size); } __inline__ static long stack_new(pari_stack *s) { stack_alloc(s, 1); return s->n++; } __inline__ static void stack_delete(pari_stack *s) { void **sdat = stack_base(s); if (*sdat) free(*sdat); } __inline__ static void stack_pushp(pari_stack *s, void *u) { long n = stack_new(s); void **sdat =(void**) *stack_base(s); sdat[n] = u; } __inline__ static GEN vecslice(GEN A, long y1, long y2) { long i,lB = y2 - y1 + 2; GEN B = cgetg(lB, ((long)((((pari_ulong*)(A))[0]) >> (32 - 7)))); for (i=1; i> (32 - 7)))); for (i=1; i> (32 - 7)))); for (i=1; i> (32 - 7)))); for (i=1; i> (32 - 7)))); for (i = k = 1; i < l; i++) if (i != j) (((GEN*) (b))[k++]) = (((GEN*) (a))[i]); return b; } __inline__ static GEN RgM_minor(GEN a, long i, long j) { GEN b = vecsplice(a, j); long k, l = ((long)(((pari_ulong*)(b))[0] & ((1UL<<(32 - 1 - 7))-1))); for (k = 1; k < l; k++) (((GEN*) (b))[k]) = vecsplice((((GEN*) (b))[k]), i); return b; } __inline__ static GEN row(GEN A, long x0) { long i, lB = ((long)(((pari_ulong*)(A))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN B = cgetg(lB, t_VEC); for (i=1; i> (32 - 7)))); for (i=1; i> (32 - 7)))); for (i=1; i> (32 - 7)))); for (i=1; i 0) q[lx] = x[lx]; q[0] = (((pari_ulong)(t_INT)) << (32 - 7))|evallg(lq); return q; } __inline__ static GEN gerepileuptoleaf(pari_sp av, GEN x) { long lx; GEN q; if (!isonstack(x) || (GEN)av<=x) { avma = av; return x; } lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); q = ((GEN)av) - lx; avma = (pari_sp)q; while (--lx >= 0) q[lx] = x[lx]; return q; } __inline__ static GEN gerepileuptoint(pari_sp av, GEN x) { if (!isonstack(x) || (GEN)av<=x) { avma = av; return x; } avma = (pari_sp)icopy_avma(x, av); return (GEN)avma; } __inline__ static GEN gerepileupto(pari_sp av, GEN x) { if (!isonstack(x) || (GEN)av<=x) { avma = av; return x; } switch(((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))) { case t_INT: return gerepileuptoint(av, x); case t_REAL: case t_STR: case t_VECSMALL: return gerepileuptoleaf(av,x); default: return gerepile(av, (pari_sp) (x+((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))), x); } } __inline__ static GEN gerepilecopy(pari_sp av, GEN x) { GENbin *p = copy_bin(x); avma = av; return bin_copy(p); } __inline__ static void gerepilemany(pari_sp av, GEN* gptr[], int n) { int i; for (i=0; i=0; i--) *gptr[i] = bin_copy((GENbin*)*gptr[i]); } else { GEN **gptr = (GEN**) pari_malloc(n*sizeof(GEN*)); for (i=0; i=0; i--) *gptr[i] = bin_copy((GENbin*)*gptr[i]); pari_free(gptr); } } __inline__ static void gerepilecoeffs(pari_sp av, GEN x, int n) { int i; for (i=0; ix; if (!x) { pari_free(p); return gen_0; } len = p->len; base= p->base; dx = x - base; y = (GEN)memcpy((void*)new_chunk(len), (void*)GENbinbase(p), len*sizeof(long)); y += dx; if (p->canon) shiftaddress_canon(y, (y-x)*sizeof(long)); else shiftaddress(y, (y-x)*sizeof(long)); pari_free(p); return y; } __inline__ static GEN GENbinbase(GENbin *p) { return (GEN)(p + 1); } __inline__ static void cgiv(GEN x) { pari_sp av = (pari_sp)(x+((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))); if (isonstack((GEN)av)) avma = av; } __inline__ static void killblock(GEN x) { gunclone(x); } __inline__ static int is_universal_constant(GEN x) { return (x >= gen_0 && x <= ghalf); } __inline__ static GEN cxcompotor(GEN z, long prec) { switch(((long)((((pari_ulong*)(z))[0]) >> (32 - 7)))) { case t_INT: return itor(z, prec); case t_FRAC: return fractor(z, prec); case t_REAL: return rtor(z, prec); default: pari_err(typeer,"cxcompotor"); return ((void *)0); } } __inline__ static GEN cxtofp(GEN x, long prec) { GEN z = cgetg(3,t_COMPLEX); (((GEN*) (z))[1]) = cxcompotor((((GEN*) (x))[1]),prec); (((GEN*) (z))[2]) = cxcompotor((((GEN*) (x))[2]),prec); return z; } __inline__ static double gtodouble(GEN x) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))!=t_REAL) { pari_sp av = avma; x = gtofp(x, (2 + (long)(8/sizeof(long)))); avma = av; } return rtodbl(x); } __inline__ static long gtos(GEN x) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) != t_INT) pari_err(talker,"gtos expected an integer, got '%Ps'",x); return itos(x); } __inline__ static GEN absfrac(GEN x) { GEN y = cgetg(3, t_FRAC); (((GEN*) (y))[1]) = absi((((GEN*) (x))[1])); (((GEN*) (y))[2]) = icopy((((GEN*) (x))[2])); return y; } __inline__ static GEN Q_abs(GEN x) { return (((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) == t_INT)? absi(x): absfrac(x); } __inline__ static GEN gtofp(GEN z, long prec) { switch(((long)((((pari_ulong*)(z))[0]) >> (32 - 7)))) { case t_INT: return itor(z, prec); case t_FRAC: return fractor(z, prec); case t_REAL: return rtor(z, prec); case t_COMPLEX: { GEN a = (((GEN*) (z))[1]), b = (((GEN*) (z))[2]); if (isintzero(b)) return cxcompotor(a, prec); if (isintzero(a)) { GEN y = cgetg(3, t_COMPLEX); b = cxcompotor(b, prec); (((GEN*) (y))[1]) = real_0_bit(((long) ((((pari_ulong*)(b))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - bit_accuracy(prec)); (((GEN*) (y))[2]) = b; return y; } return cxtofp(z, prec); } case t_QUAD: return quadtofp(z, prec); default: pari_err(typeer,"gtofp"); return ((void *)0); } } __inline__ static GEN RgX_gtofp(GEN x, long prec) { long l; GEN y = cgetg_copy(x, &l); while (--l > 1) (((GEN*) (y))[l]) = gtofp((((GEN*) (x))[l]), prec); y[1] = x[1]; return y; } __inline__ static GEN RgC_gtofp(GEN x, long prec) { long l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN y = cgetg(l, t_COL); while (--l > 0) (((GEN*) (y))[l]) = gtofp((((GEN*) (x))[l]), prec); return y; } __inline__ static GEN RgM_gtofp(GEN x, long prec) { long l; GEN y = cgetg_copy(x, &l); while (--l > 0) (((GEN*) (y))[l]) = RgC_gtofp((((GEN*) (x))[l]), prec); return y; } __inline__ static GEN RgX_fpnorml2(GEN x, long prec) { pari_sp av = avma; return gerepileupto(av, gnorml2(RgX_gtofp(x, prec))); } __inline__ static GEN RgC_fpnorml2(GEN x, long prec) { pari_sp av = avma; return gerepileupto(av, gnorml2(RgC_gtofp(x, prec))); } __inline__ static GEN RgM_fpnorml2(GEN x, long prec) { pari_sp av = avma; return gerepileupto(av, gnorml2(RgM_gtofp(x, prec))); } __inline__ static void affgr(GEN x, GEN y) { pari_sp av; switch(((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))) { case t_INT: affir(x,y); break; case t_REAL: affrr(x,y); break; case t_FRAC: rdiviiz((((GEN*) (x))[1]),(((GEN*) (x))[2]), y); break; case t_QUAD: av = avma; affgr(quadtofp(x,((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1)))), y); avma = av; break; default: pari_err(operf,"",x,y); } } __inline__ static GEN affc_fixlg(GEN x, GEN res) { if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) == t_COMPLEX) { affrr_fixlg((((GEN*) (x))[1]), (((GEN*) (res))[1])); affrr_fixlg((((GEN*) (x))[2]), (((GEN*) (res))[2])); } else { avma = (pari_sp)(res+3); res = cgetr(((long)(((pari_ulong*)((((GEN*) (res))[1])))[0] & ((1UL<<(32 - 1 - 7))-1)))); affrr_fixlg(x, res); } return res; } __inline__ static GEN trunc_safe(GEN x) { long e; return gcvtoi(x,&e); } __inline__ static long ndec2nlong(long x) { return 1 + (long)((x)*(LOG2_10/32)); } __inline__ static long ndec2prec(long x) { return 2 + ndec2nlong(x); } __inline__ static long nbits2nlong(long x) { return (long)(((pari_ulong)x+32 -1) >> 5); } __inline__ static long nbits2prec(long x) { return (long)(((pari_ulong)x+3*32 -1) >> 5); } __inline__ static long nchar2nlong(long x) { return (long)(((pari_ulong)x+sizeof(long)-1) >> (5 -3L)); } __inline__ static long bit_accuracy(long x) { return (x-2) * 32; } __inline__ static double bit_accuracy_mul(long x, double y) { return (x-2) * (32*y); } __inline__ static long prec2ndec(long x) { return (long)bit_accuracy_mul(x, LOG10_2); } __inline__ static long divsBIL(long n) { return n >> 5; } __inline__ static long remsBIL(long n) { return n & (32 -1); } # 1205 "../src/headers/pariinl.h" __inline__ static GEN Fp_red(GEN a, GEN m) { return modii(a, m); } __inline__ static GEN Fp_add(GEN a, GEN b, GEN m) { pari_sp av=avma; GEN p = addii(a,b); long s = ((((long*)(p))[1]) >> (32 - 2)); if (!s) return p; if (s > 0) { GEN t = subii(p, m); s = ((((long*)(t))[1]) >> (32 - 2)); if (!s) { avma = av; return gen_0; } if (s < 0) { avma = (pari_sp)p; return p; } if (cmpii(t, m) < 0) return gerepileuptoint(av, t); p = remii(t, m); } else p = modii(p, m); return gerepileuptoint(av, p); } __inline__ static GEN Fp_sub(GEN a, GEN b, GEN m) { pari_sp av=avma; GEN p = subii(a,b); long s = ((((long*)(p))[1]) >> (32 - 2)); if (!s) return p; if (s > 0) { if (cmpii(p, m) < 0) return p; p = remii(p, m); } else { GEN t = addii(p, m); if (!s) { avma = av; return gen_0; } if (s > 0) return gerepileuptoint(av, t); p = modii(t, m); } return gerepileuptoint(av, p); } __inline__ static GEN Fp_neg(GEN b, GEN m) { pari_sp av = avma; long s = ((((long*)(b))[1]) >> (32 - 2)); GEN p; if (!s) return gen_0; if (s > 0) { p = subii(m, b); if (((((long*)(p))[1]) >> (32 - 2)) >= 0) return p; p = modii(p, m); } else p = remii(negi(b), m); return gerepileuptoint(av, p); } __inline__ static GEN Fp_center(GEN u, GEN p, GEN ps2) { return absi_cmp(u,ps2)<=0? icopy(u): subii(u,p); } __inline__ static GEN Fp_mul(GEN a, GEN b, GEN m) { pari_sp av=avma; GEN p; (void)new_chunk(((long)(((pari_ulong*)(a))[0] & ((1UL<<(32 - 1 - 7))-1)))+((long)(((pari_ulong*)(b))[0] & ((1UL<<(32 - 1 - 7))-1)))+(((long)(((pari_ulong*)(m))[0] & ((1UL<<(32 - 1 - 7))-1)))<<1)); p = mulii(a,b); avma = av; return modii(p,m); } __inline__ static GEN Fp_sqr(GEN a, GEN m) { pari_sp av=avma; GEN p; (void)new_chunk((((long)(((pari_ulong*)(a))[0] & ((1UL<<(32 - 1 - 7))-1)))+((long)(((pari_ulong*)(m))[0] & ((1UL<<(32 - 1 - 7))-1))))<<1); p = sqri(a); avma = av; return modii(p,m); } __inline__ static GEN Fp_mulu(GEN a, pari_ulong b, GEN m) { long l = ((long)(((pari_ulong*)(m))[1] & ((1UL<<(32 - 1 - 7))-1))); if (l == 3) { pari_ulong mm = m[2]; return utoi( Fl_mul(umodiu(a, mm), b, mm) ); } else { pari_sp av = avma; GEN p; (void)new_chunk(((long)(((pari_ulong*)(a))[0] & ((1UL<<(32 - 1 - 7))-1)))+1+(l<<1)); p = muliu(a,b); avma = av; return modii(p,m); } } __inline__ static GEN Fp_inv(GEN a, GEN m) { GEN res; if (! invmod(a,m,&res)) pari_err(invmoder, gmodulo(res,m)); return res; } __inline__ static GEN Fp_invsafe(GEN a, GEN m) { GEN res; if (! invmod(a,m,&res)) return ((void *)0); return res; } __inline__ static GEN Fp_div(GEN a, GEN b, GEN m) { pari_sp av=avma; GEN p; (void)new_chunk(((long)(((pari_ulong*)(a))[0] & ((1UL<<(32 - 1 - 7))-1)))+(((long)(((pari_ulong*)(m))[0] & ((1UL<<(32 - 1 - 7))-1)))<<1)); p = mulii(a, Fp_inv(b,m)); avma = av; return modii(p,m); } __inline__ static int is_const_t(long t) { return (t < t_POLMOD); } __inline__ static int is_extscalar_t(long t) { return (t <= t_POL); } __inline__ static int is_intreal_t(long t) { return (t <= t_REAL); } __inline__ static int is_matvec_t(long t) { return (t >= t_VEC && t <= t_MAT); } __inline__ static int is_noncalc_t(long tx) { return (tx) >= t_LIST; } __inline__ static int is_rational_t(long t) { return (t == t_INT || t == t_FRAC); } __inline__ static int is_recursive_t(long t) { return lontyp[t]; } __inline__ static int is_scalar_t(long t) { return (t < t_POL); } __inline__ static int is_vec_t(long t) { return (t == t_VEC || t == t_COL); } __inline__ static GEN sqrtr(GEN x) { long s = ((((long*)(x))[1]) >> (32 - 2)); GEN y; if (s == 0) return real_0_bit(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) >> 1); if (s >= 0) return sqrtr_abs(x); y = cgetg(3,t_COMPLEX); (((GEN*) (y))[2]) = sqrtr_abs(x); (((GEN*) (y))[1]) = gen_0; return y; } __inline__ static GEN sqrtnr(GEN x, long n) { return mpexp(divrs(mplog(x), n)); } __inline__ static int ismpzero(GEN x) { return is_intreal_t(((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))) && !((((long*)(x))[1]) >> (32 - 2)); } __inline__ static int isintzero(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) == t_INT && !((((long*)(x))[1]) >> (32 - 2)); } __inline__ static int isint1(GEN x) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT && equali1(x); } __inline__ static int isintm1(GEN x){ return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT && equalim1(x);} __inline__ static int equali1(GEN n) { return (pari_ulong) n[1] == ((3UL) | ((pari_ulong)(((long)(1)) << (32 - 2)))) && n[2] == 1; } __inline__ static int equalim1(GEN n) { return (pari_ulong) n[1] == ((3UL) | ((pari_ulong)(((long)(-1)) << (32 - 2)))) && n[2] == 1; } __inline__ static int is_pm1(GEN n) { return ((long)(((pari_ulong*)(n))[1] & ((1UL<<(32 - 1 - 7))-1))) == 3 && n[2] == 1; } __inline__ static int is_bigint(GEN n) { long l = ((long)(((pari_ulong*)(n))[1] & ((1UL<<(32 - 1 - 7))-1))); return l > 3 || (l == 3 && (n[2] & (1UL << (32 -1)))); } __inline__ static int odd(long x) { return x & 1; } __inline__ static int both_odd(long x, long y) { return x & y & 1; } __inline__ static int isonstack(GEN x) { return ((pari_sp)x >= bot && (pari_sp)x < top); } __inline__ static long random_bits(long k) { return pari_rand() >> (32 - k); } __inline__ static double dbllog2r(GEN x) { return log2((double)(pari_ulong)x[2]) + (double)(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - (32 -1)); } __inline__ static GEN mul_content(GEN cx, GEN cy) { if (!cx) return cy; if (!cy) return cx; return gmul(cx,cy); } __inline__ static GEN mul_denom(GEN dx, GEN dy) { if (!dx) return dy; if (!dy) return dx; return mulii(dx,dy); } __inline__ static GEN constant_term(GEN x) { return ((((long*)(x))[1]) >> (32 - 2))? (((GEN*) (x))[2]): gen_0; } __inline__ static GEN leading_term(GEN x) { return ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))) == 2? gen_0: (((GEN*) (x))[((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-1]); } __inline__ static long degpol(GEN x) { return ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-3; } __inline__ static long lgpol(GEN x) { return ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-2; } __inline__ static GEN truecoeff(GEN x, long n) { return polcoeff0(x,n,-1); } __inline__ static GEN RgXQ_mul(GEN y, GEN x, GEN T) { return RgX_rem(RgX_mul(y, x), T); } __inline__ static GEN RgXQ_sqr(GEN x, GEN T) { return RgX_rem(RgX_sqr(x), T); } __inline__ static GEN ZXQ_mul(GEN y, GEN x, GEN T) { return ZX_rem(ZX_mul(y, x), T); } __inline__ static GEN ZXQ_sqr(GEN x, GEN T) { return ZX_rem(ZX_sqr(x), T); } __inline__ static GEN RgX_div(GEN x, GEN y) { return RgX_divrem(x,y,((void *)0)); } __inline__ static GEN RgX_rem(GEN x, GEN y) { return RgX_divrem(x,y,((GEN*)0x1L)); } __inline__ static GEN RgXQX_div(GEN x, GEN y, GEN T) { return RgXQX_divrem(x,y,T,((void *)0)); } __inline__ static GEN RgXQX_rem(GEN x, GEN y, GEN T) { return RgXQX_divrem(x,y,T,((GEN*)0x1L)); } __inline__ static GEN FpX_div(GEN x, GEN y, GEN p) { return FpX_divrem(x,y,p, ((void *)0)); } __inline__ static GEN Flx_div(GEN x, GEN y, pari_ulong p) { return Flx_divrem(x,y,p, ((void *)0)); } __inline__ static GEN F2x_div(GEN x, GEN y) { return F2x_divrem(x,y, ((void *)0)); } __inline__ static GEN FpV_FpC_mul(GEN x, GEN y, GEN p) { return FpV_dotproduct(x,y,p); } __inline__ static GEN pol0_Flx(long sv) { return mkvecsmall(sv); } __inline__ static GEN pol1_Flx(long sv) { return mkvecsmall2(sv, 1); } __inline__ static GEN polx_Flx(long sv) { return mkvecsmall3(sv, 0, 1); } __inline__ static GEN zero_zx(long sv) { return zero_Flx(sv); } __inline__ static GEN polx_zx(long sv) { return polx_Flx(sv); } __inline__ static GEN zx_shift(GEN x, long n) { return Flx_shift(x,n); } __inline__ static GEN zx_renormalize(GEN x, long l) { return Flx_renormalize(x,l); } __inline__ static GEN zero_F2x(long sv) { return zero_Flx(sv); } __inline__ static GEN pol0_F2x(long sv) { return pol0_Flx(sv); } __inline__ static GEN pol1_F2x(long sv) { return pol1_Flx(sv); } __inline__ static GEN polx_F2x(long sv) { return mkvecsmall2(sv, 2); } __inline__ static int F2x_equal1(GEN x) { return Flx_equal1(x); } __inline__ static GEN Flv_copy(GEN x) { return leafcopy(x); } __inline__ static GEN Flx_copy(GEN x) { return leafcopy(x); } __inline__ static GEN vecsmall_copy(GEN x) { return leafcopy(x); } __inline__ static int Flx_equal1(GEN x) { return degpol(x)==0 && x[2] == 1; } __inline__ static GEN FpX_renormalize(GEN x, long lx) { return ZX_renormalize(x,lx); } __inline__ static GEN FpXX_renormalize(GEN x, long lx) { return ZX_renormalize(x,lx); } __inline__ static GEN FpXQX_renormalize(GEN x, long lx) { return ZX_renormalize(x,lx); } __inline__ static GEN F2x_renormalize(GEN x, long lx) { return Flx_renormalize(x,lx); } __inline__ static GEN ZX_ZXY_resultant(GEN a, GEN b) { return ZX_ZXY_rnfequation(a,b,((void *)0)); } __inline__ static long sturm(GEN x) { return sturmpart(x, ((void *)0), ((void *)0)); } __inline__ static GEN resultant(GEN x, GEN y) { return resultant_all(x,y,((void *)0)); } __inline__ static long gval(GEN x, long v) { pari_sp av = avma; long n = ggval(x, pol_x(v)); avma = av; return n; } __inline__ static void RgX_shift_inplace_init(long v) { if (v) (void)cgetg(v, t_VECSMALL); } __inline__ static GEN RgX_shift_inplace(GEN x, long v) { long i, lx; GEN y, z; if (!v) return x; lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); if (lx == 2) return x; y = x + v; z = x + lx; if (((long)(((pari_ulong*)(z))[0] & ((1UL<<(32 - 1 - 7))-1))) != v) x[lx + v] = z[0]; for (i = lx-1; i >= 2; i--) y[i] = x[i]; for (i = v+1; i >= 2; i--) (((GEN*) (x))[i]) = gen_0; x[0] = (((pari_ulong)(t_POL)) << (32 - 7)) | evallg(lx+v); return x; } __inline__ static GEN zv_to_ZV(GEN x) { return vecsmall_to_vec(x); } __inline__ static GEN zc_to_ZC(GEN x) { return vecsmall_to_col(x); } __inline__ static GEN ZV_to_zv(GEN x) { return vec_to_vecsmall(x); } __inline__ static GEN zx_to_zv(GEN x, long N) { return Flx_to_Flv(x,N); } __inline__ static GEN zv_to_zx(GEN x, long sv) { return Flv_to_Flx(x,sv); } __inline__ static GEN zm_to_zxV(GEN x, long sv) { return Flm_to_FlxV(x,sv); } __inline__ static GEN zero_zm(long x, long y) { return zero_Flm(x,y); } __inline__ static GEN zero_zv(long x) { return zero_Flv(x); } __inline__ static GEN zm_transpose(GEN x) { return Flm_transpose(x); } __inline__ static GEN zm_copy(GEN x) { return Flm_copy(x); } __inline__ static GEN zv_copy(GEN x) { return Flv_copy(x); } __inline__ static GEN row_zm(GEN x, long i) { return row_Flm(x,i); } __inline__ static GEN ZC_hnfrem(GEN x, GEN y) { return ZC_hnfremdiv(x,y,((void *)0)); } __inline__ static GEN ZM_hnfrem(GEN x, GEN y) { return ZM_hnfremdiv(x,y,((void *)0)); } __inline__ static GEN ZM_lll(GEN x, double D, long f) { return ZM_lll_norms(x,D,f,((void *)0)); } __inline__ static GEN RgM_inv(GEN a) { return RgM_solve(a, ((void *)0)); } __inline__ static GEN RgM_shallowcopy(GEN x) { long l; GEN y = cgetg_copy(x, &l); while (--l > 0) (((GEN*) (y))[l]) = leafcopy((((GEN*) (x))[l])); return y; } __inline__ static GEN F2m_copy(GEN x) { return RgM_shallowcopy(x); } __inline__ static GEN Flm_copy(GEN x) { return RgM_shallowcopy(x); } __inline__ static int ZV_dvd(GEN x, GEN y) { long i, l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); for (i=1; i < l; i++) if ( ! dvdii( (((GEN*) (x))[i]), (((GEN*) (y))[i]) ) ) return 0; return 1; } __inline__ static GEN Fq_red(GEN x, GEN T, GEN p) { return ((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT? Fp_red(x,p): FpXQ_red(x,T,p); } __inline__ static GEN FpXQX_rem(GEN x, GEN y, GEN T, GEN p) { return FpXQX_divrem(x, y, T, p, ((GEN*)0x1L)); } __inline__ static GEN FpXQX_div(GEN x, GEN y, GEN T, GEN p) { return FpXQX_divrem(x, y, T, p, ((void *)0)); } __inline__ static GEN FlxqX_rem(GEN x, GEN y, GEN T, pari_ulong p) { return FlxqX_divrem(x, y, T, p, ((GEN*)0x1L)); } __inline__ static GEN FlxqX_div(GEN x, GEN y, GEN T, pari_ulong p) { return FlxqX_divrem(x, y, T, p, ((void *)0)); } __inline__ static GEN FqX_red(GEN z, GEN T, GEN p) { return T? FpXQX_red(z, T, p): FpX_red(z, p); } __inline__ static GEN FqX_add(GEN x,GEN y,GEN T,GEN p) { return T? FpXX_add(x,y,p): FpX_add(x,y,p); } __inline__ static GEN FqX_sub(GEN x,GEN y,GEN T,GEN p) { return T? FpXX_sub(x,y,p): FpX_sub(x,y,p); } __inline__ static GEN FqX_Fp_mul(GEN P, GEN u, GEN T, GEN p) { return T? FpXX_Fp_mul(P, u, p): FpX_Fp_mul(P, u, p); } __inline__ static GEN FqX_Fq_mul(GEN P, GEN U, GEN T, GEN p) { return ((long)((((pari_ulong*)(U))[0]) >> (32 - 7)))==t_INT ? FqX_Fp_mul(P, U, T, p): FpXQX_FpXQ_mul(P, U, T, p); } __inline__ static GEN FqX_mul(GEN x, GEN y, GEN T, GEN p) { return T? FpXQX_mul(x, y, T, p): FpX_mul(x, y, p); } __inline__ static GEN FqX_sqr(GEN x, GEN T, GEN p) { return T? FpXQX_sqr(x, T, p): FpX_sqr(x, p); } __inline__ static GEN FqX_div(GEN x, GEN y, GEN T, GEN p) { return T? FpXQX_divrem(x,y,T,p,((void *)0)): FpX_divrem(x,y,p,((void *)0)); } __inline__ static GEN FqX_rem(GEN x, GEN y, GEN T, GEN p) { return T? FpXQX_rem(x,y,T,p): FpX_rem(x,y,p); } __inline__ static GEN FqX_divrem(GEN x, GEN y, GEN T, GEN p, GEN *z) { return T? FpXQX_divrem(x,y,T,p,z): FpX_divrem(x,y,p,z); } __inline__ static GEN FqX_gcd(GEN P,GEN Q,GEN T,GEN p) {return T? FpXQX_gcd(P,Q,T,p): FpX_gcd(P,Q,p);} __inline__ static GEN FqX_extgcd(GEN P,GEN Q,GEN T,GEN p, GEN *U, GEN *V) { return T? FpXQX_extgcd(P,Q,T,p,U,V): FpX_extgcd(P,Q,p,U,V); } __inline__ static GEN FqXQ_add(GEN x, GEN y, GEN S , GEN T, GEN p) { (void)S; return T? FpXX_add(x,y,p): FpX_add(x,y,p); } __inline__ static GEN FqXQ_sub(GEN x, GEN y, GEN S , GEN T, GEN p) { (void)S; return T? FpXX_sub(x,y,p): FpX_sub(x,y,p); } __inline__ static GEN FqXQ_div(GEN x, GEN y, GEN S, GEN T, GEN p) { return T? FpXQXQ_div(x,y,S,T,p): FpXQ_div(x,y,S,p); } __inline__ static GEN FqXQ_inv(GEN x, GEN S, GEN T, GEN p) { return T? FpXQXQ_inv(x,S,T,p): FpXQ_inv(x,S,p); } __inline__ static GEN FqXQ_invsafe(GEN x, GEN S, GEN T, GEN p) { return T? FpXQXQ_invsafe(x,S,T,p): FpXQ_inv(x,S,p); } __inline__ static GEN FqXQ_mul(GEN x, GEN y, GEN S, GEN T, GEN p) { return T? FpXQXQ_mul(x,y,S,T,p): FpXQ_mul(x,y,S,p); } __inline__ static GEN FqXQ_sqr(GEN x, GEN S, GEN T, GEN p) { return T? FpXQXQ_sqr(x,S,T,p): FpXQ_sqr(x,S,p); } __inline__ static GEN FqXQ_pow(GEN x, GEN n, GEN S, GEN T, GEN p) { return T? FpXQXQ_pow(x,n,S,T,p): FpXQ_pow(x,n,S,p); } __inline__ static GEN FpXQ_add(GEN x,GEN y,GEN T ,GEN p) { (void)T; return FpX_add(x,y,p); } __inline__ static GEN FpXQ_sub(GEN x,GEN y,GEN T ,GEN p) { (void)T; return FpX_sub(x,y,p); } __inline__ static GEN Flxq_add(GEN x,GEN y,GEN T ,pari_ulong p) { (void)T; return Flx_add(x,y,p); } __inline__ static GEN Flxq_sub(GEN x,GEN y,GEN T ,pari_ulong p) { (void)T; return Flx_sub(x,y,p); } __inline__ static pari_ulong F2x_coeff(GEN x,long v) { pari_ulong u=(pari_ulong)x[2+divsBIL(v)]; return (u>>remsBIL(v))&1UL; } __inline__ static void F2x_clear(GEN x,long v) { pari_ulong* u=(pari_ulong*)&x[2+divsBIL(v)]; *u&=~(1UL<> (32 - 7))) == t_INT && ((long)((((pari_ulong*)(v))[0]) >> (32 - 7))) == t_INT) { z = ((((long*)(b))[1]) >> (32 - 2))? mulii(v, addii(u,v)): sqri(v); return addii(z, mulii(c, sqri(u))); } else { z = ((((long*)(b))[1]) >> (32 - 2))? gmul(v, gadd(u,v)): gsqr(v); return gadd(z, gmul(c, gsqr(u))); } } __inline__ static GEN quad_disc(GEN x) { GEN Q = (((GEN*) (x))[1]), b = (((GEN*) (Q))[3]), c = (((GEN*) (Q))[2]), c4; if (is_pm1(b)) { pari_sp av = avma; (void)new_chunk(((long)(((pari_ulong*)(c))[1] & ((1UL<<(32 - 1 - 7))-1))) + 1); c4 = shifti(c,2); avma = av; return subsi(1, c4); } c4 = shifti(c,2); togglesign_safe(&c4); return c4; } __inline__ static GEN qfb_disc3(GEN x, GEN y, GEN z) { return subii(sqri(y), shifti(mulii(x,z),2)); } __inline__ static GEN qfb_disc(GEN x) { return qfb_disc3((((GEN*) (x))[1]), (((GEN*) (x))[2]), (((GEN*) (x))[3])); } __inline__ static GEN sqrfrac(GEN x) { GEN z = cgetg(3,t_FRAC); (((GEN*) (z))[1]) = sqri((((GEN*) (x))[1])); (((GEN*) (z))[2]) = sqri((((GEN*) (x))[2])); return z; } __inline__ static void normalize_frac(GEN z) { if (((((long*)(z[2]))[1]) >> (32 - 2)) < 0) { togglesign((((GEN*) (z))[1])); setabssign((((GEN*) (z))[2])); } } __inline__ static GEN powii(GEN x, GEN n) { long ln = ((long)(((pari_ulong*)(n))[1] & ((1UL<<(32 - 1 - 7))-1))); if (ln == 3) { GEN z; if (((((long*)(n))[1]) >> (32 - 2)) > 0) return powiu(x, n[2]); z = cgetg(3, t_FRAC); (((GEN*) (z))[1]) = gen_1; (((GEN*) (z))[2]) = powiu(x, n[2]); return z; } if (ln == 2) return gen_1; return powgi(x, n); } __inline__ static GEN powIs(long n) { switch(n & 3) { case 1: return mkcomplex(gen_0,gen_1); case 2: return gen_m1; case 3: return mkcomplex(gen_0,gen_m1); } return gen_1; } __inline__ static void mpexpz(GEN x, GEN z) { pari_sp av = avma; gaffect(mpexp(x), z); avma = av; } __inline__ static void mplogz(GEN x, GEN z) { pari_sp av = avma; gaffect(mplog(x), z); avma = av; } __inline__ static void mpcosz(GEN x, GEN z) { pari_sp av = avma; gaffect(mpcos(x), z); avma = av; } __inline__ static void mpsinz(GEN x, GEN z) { pari_sp av = avma; gaffect(mpsin(x), z); avma = av; } __inline__ static void gnegz(GEN x, GEN z) { pari_sp av = avma; gaffect(gneg(x), z); avma = av; } __inline__ static void gabsz(GEN x, long prec, GEN z) { pari_sp av = avma; gaffect(gabs(x,prec), z); avma = av; } __inline__ static void gaddz(GEN x, GEN y, GEN z) { pari_sp av = avma; gaffect(gadd(x,y), z); avma = av; } __inline__ static void gsubz(GEN x, GEN y, GEN z) { pari_sp av = avma; gaffect(gsub(x,y), z); avma = av; } __inline__ static void gmulz(GEN x, GEN y, GEN z) { pari_sp av = avma; gaffect(gmul(x,y), z); avma = av; } __inline__ static void gdivz(GEN x, GEN y, GEN z) { pari_sp av = avma; gaffect(gdiv(x,y), z); avma = av; } __inline__ static void gdiventz(GEN x, GEN y, GEN z) { pari_sp av = avma; gaffect(gdivent(x,y), z); avma = av; } __inline__ static void gmodz(GEN x, GEN y, GEN z) { pari_sp av = avma; gaffect(gmod(x,y), z); avma = av; } __inline__ static void gmul2nz(GEN x, long s, GEN z) { pari_sp av = avma; gaffect(gmul2n(x,s), z); avma = av; } __inline__ static void gshiftz(GEN x, long s, GEN z) { pari_sp av = avma; gaffect(gshift(x,s), z); avma = av; } __inline__ static GEN ell_get_a1(GEN e) { return (((GEN*) (e))[1]); } __inline__ static GEN ell_get_a2(GEN e) { return (((GEN*) (e))[2]); } __inline__ static GEN ell_get_a3(GEN e) { return (((GEN*) (e))[3]); } __inline__ static GEN ell_get_a4(GEN e) { return (((GEN*) (e))[4]); } __inline__ static GEN ell_get_a6(GEN e) { return (((GEN*) (e))[5]); } __inline__ static GEN ell_get_b2(GEN e) { return (((GEN*) (e))[6]); } __inline__ static GEN ell_get_b4(GEN e) { return (((GEN*) (e))[7]); } __inline__ static GEN ell_get_b6(GEN e) { return (((GEN*) (e))[8]); } __inline__ static GEN ell_get_b8(GEN e) { return (((GEN*) (e))[9]); } __inline__ static GEN ell_get_c4(GEN e) { return (((GEN*) (e))[10]); } __inline__ static GEN ell_get_c6(GEN e) { return (((GEN*) (e))[11]); } __inline__ static GEN ell_get_disc(GEN e) { return (((GEN*) (e))[12]); } __inline__ static GEN ell_get_j(GEN e) { return (((GEN*) (e))[13]); } __inline__ static GEN ell_get_roots(GEN e) { return (((GEN*) (e))[14]); } __inline__ static int ell_is_inf(GEN z) { return ((long)(((pari_ulong*)(z))[0] & ((1UL<<(32 - 1 - 7))-1))) < 3; } __inline__ static int ell_is_padic(GEN x) { return ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))) == 20 && ((long)((((pari_ulong*)((((GEN*) (x))[19])))[0]) >> (32 - 7))) == t_INT; } __inline__ static int ell_is_real(GEN x) { return ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))) == 20 && ((long)((((pari_ulong*)((((GEN*) (x))[19])))[0]) >> (32 - 7))) != t_INT; } __inline__ static GEN ellinf(void) { return mkvec(gen_0); } __inline__ static GEN pr_get_p(GEN pr) { return (((GEN*) (pr))[1]); } __inline__ static GEN pr_get_gen(GEN pr){ return (((GEN*) (pr))[2]); } __inline__ static long pr_get_e(GEN pr) { return (((GEN*) (pr))[3])[2]; } __inline__ static long pr_get_f(GEN pr) { return (((GEN*) (pr))[4])[2]; } __inline__ static GEN pr_get_tau(GEN pr){ return (((GEN*) (pr))[5]); } __inline__ static int pr_is_inert(GEN P) { return pr_get_f(P) == ((long)(((pari_ulong*)(pr_get_gen(P)))[0] & ((1UL<<(32 - 1 - 7))-1)))-1; } __inline__ static GEN pr_norm(GEN pr) { return powiu(pr_get_p(pr), pr_get_f(pr)); } __inline__ static long nf_get_varn(GEN nf) { return ((long)((((pari_ulong*)((((GEN*) (nf))[1])))[1]&(((1UL<<14)-1)<<(32 - 2 - 14))) >> (32 - 2 - 14))); } __inline__ static GEN nf_get_pol(GEN nf) { return (((GEN*) (nf))[1]); } __inline__ static long nf_get_degree(GEN nf) { return degpol( nf_get_pol(nf) ); } __inline__ static long nf_get_r1(GEN nf) { GEN x = (((GEN*) (nf))[2]); return itou((((GEN*) (x))[1])); } __inline__ static long nf_get_r2(GEN nf) { GEN x = (((GEN*) (nf))[2]); return itou((((GEN*) (x))[2])); } __inline__ static GEN nf_get_disc(GEN nf) { return (((GEN*) (nf))[3]); } __inline__ static GEN nf_get_index(GEN nf) { return (((GEN*) (nf))[4]); } __inline__ static GEN nf_get_M(GEN nf) { return (((GEN**) (nf))[5][1]); } __inline__ static GEN nf_get_G(GEN nf) { return (((GEN**) (nf))[5][2]); } __inline__ static GEN nf_get_roundG(GEN nf) { return (((GEN**) (nf))[5][3]); } __inline__ static GEN nf_get_Tr(GEN nf) { return (((GEN**) (nf))[5][4]); } __inline__ static GEN nf_get_diff(GEN nf) { return (((GEN**) (nf))[5][5]); } __inline__ static GEN nf_get_roots(GEN nf) { return (((GEN*) (nf))[6]); } __inline__ static GEN nf_get_zk(GEN nf) { return (((GEN*) (nf))[7]); } __inline__ static GEN nf_get_invzk(GEN nf) { return (((GEN*) (nf))[8]); } __inline__ static void nf_get_sign(GEN nf, long *r1, long *r2) { GEN x = (((GEN*) (nf))[2]); *r1 = itou((((GEN*) (x))[1])); *r2 = itou((((GEN*) (x))[2])); } __inline__ static GEN bnf_get_nf(GEN bnf) { return (((GEN*) (bnf))[7]); } __inline__ static GEN bnf_get_clgp(GEN bnf) { return (((GEN**) (bnf))[8][1]); } __inline__ static GEN bnf_get_no(GEN bnf) { return (((GEN***) (bnf))[8][1][1]); } __inline__ static GEN bnf_get_cyc(GEN bnf) { return (((GEN***) (bnf))[8][1][2]); } __inline__ static GEN bnf_get_gen(GEN bnf) { return (((GEN***) (bnf))[8][1][3]); } __inline__ static GEN bnf_get_reg(GEN bnf) { return (((GEN**) (bnf))[8][2]); } __inline__ static GEN bnf_get_logfu(GEN bnf) { return (((GEN*) (bnf))[3]); } __inline__ static GEN bnf_get_tuU(GEN bnf) { return (((GEN***) (bnf))[8][4][2]); } __inline__ static long bnf_get_tuN(GEN bnf) { return (((GEN***) (bnf))[8][4][1])[2]; } __inline__ static GEN bnf_get_fu(GEN bnf) { GEN fu = bnf_get_fu_nocheck(bnf); if (((long)((((pari_ulong*)(fu))[0]) >> (32 - 7))) == t_MAT) pari_err(talker,"missing units in bnf"); return fu; } __inline__ static GEN bnf_get_fu_nocheck(GEN bnf) { return (((GEN**) (bnf))[8][5]); } __inline__ static GEN bnr_get_bnf(GEN bnr) { return (((GEN*) (bnr))[1]); } __inline__ static GEN bnr_get_bid(GEN bnr) { return (((GEN*) (bnr))[2]); } __inline__ static GEN bnr_get_mod(GEN bnr) { return (((GEN**) (bnr))[2][1]); } __inline__ static GEN bnr_get_nf(GEN bnr) { return (((GEN**) (bnr))[1][7]); } __inline__ static GEN bnr_get_clgp(GEN bnr) { return (((GEN*) (bnr))[5]); } __inline__ static GEN bnr_get_no(GEN bnr) { return (((GEN**) (bnr))[5][1]); } __inline__ static GEN bnr_get_cyc(GEN bnr) { return (((GEN**) (bnr))[5][2]); } __inline__ static GEN bnr_get_gen_nocheck(GEN bnr) { return (((GEN**) (bnr))[5][3]); } __inline__ static GEN bnr_get_gen(GEN bnr) { GEN G = bnr_get_clgp(bnr); if (((long)(((pari_ulong*)(G))[0] & ((1UL<<(32 - 1 - 7))-1))) != 4) pari_err(talker,"missing bnr generators: please use bnrinit(,,1)"); return (((GEN*) (G))[3]); } __inline__ static GEN bid_get_mod(GEN bid) { return (((GEN*) (bid))[1]); } __inline__ static GEN bid_get_ideal(GEN bid) { return (((GEN**) (bid))[1][1]); } __inline__ static GEN bid_get_arch(GEN bid) { return (((GEN**) (bid))[1][2]); } __inline__ static GEN bid_get_cyc(GEN bid) { return (((GEN**) (bid))[2][2]); } __inline__ static GEN bid_get_gen_nocheck(GEN bid) { return (((GEN**) (bid))[2][3]); } __inline__ static GEN bid_get_gen(GEN bid) { GEN G = (((GEN*) (bid))[2]); if (((long)(((pari_ulong*)(G))[0] & ((1UL<<(32 - 1 - 7))-1))) != 4) pari_err(talker,"missing bid generators. Use idealstar(,,2)"); return (((GEN*) (G))[3]); } __inline__ static GEN gal_get_pol(GEN gal) { return (((GEN*) (gal))[1]); } __inline__ static GEN gal_get_p(GEN gal) { return (((GEN**) (gal))[2][1]); } __inline__ static GEN gal_get_e(GEN gal) { return (((GEN**) (gal))[2][2]); } __inline__ static GEN gal_get_mod(GEN gal) { return (((GEN**) (gal))[2][3]); } __inline__ static GEN gal_get_roots(GEN gal) { return (((GEN*) (gal))[3]); } __inline__ static GEN gal_get_invvdm(GEN gal) { return (((GEN*) (gal))[4]); } __inline__ static GEN gal_get_den(GEN gal) { return (((GEN*) (gal))[5]); } __inline__ static GEN gal_get_group(GEN gal) { return (((GEN*) (gal))[6]); } __inline__ static GEN gal_get_gen(GEN gal) { return (((GEN*) (gal))[7]); } __inline__ static GEN gal_get_orders(GEN gal) { return (((GEN*) (gal))[8]); } __inline__ static long rnf_get_degree(GEN rnf) { return degpol((((GEN*) (rnf))[1])); } __inline__ static GEN idealpseudomin(GEN I, GEN G) { GEN u = ZM_lll(ZM_mul(G, I), 0.99, LLL_IM); return ZM_ZC_mul(I, (((GEN*) (u))[1])); } __inline__ static GEN idealpseudomin_nonscalar(GEN I, GEN G) { GEN u = ZM_lll(ZM_mul(G, I), 0.99, LLL_IM); GEN m = ZM_ZC_mul(I, (((GEN*) (u))[1])); if (ZV_isscalar(m) && ((long)(((pari_ulong*)(u))[0] & ((1UL<<(32 - 1 - 7))-1))) > 2) m = ZM_ZC_mul(I, (((GEN*) (u))[2])); return m; } __inline__ static GEN idealred_elt(GEN nf, GEN I) { pari_sp av = avma; GEN u = idealpseudomin(I, nf_get_roundG(nf)); return gerepileupto(av, u); } __inline__ static GEN idealred(GEN nf, GEN I) { return idealred0(nf, I, ((void *)0)); } # 63 "../src/headers/pari.h" 2 # 42 "../src/kernel/gmp/mp.c" 2 # 1 "../src/headers/paripriv.h" 1 # 16 "../src/headers/paripriv.h" hashtable *hashstr_import_static(hashentry *e, pari_ulong size); void hashstr_dbg(hashtable *h); typedef int (*QSCOMP)(const void *, const void *); typedef pari_ulong *uGEN; # 38 "../src/headers/paripriv.h" GEN ellheightoo(GEN e, GEN z, long prec); void ellprint(GEN e); GEN trans_fix_arg(long *prec, GEN *s0, GEN *sig, pari_sp *av, GEN *res); GEN transc(GEN (*f) (GEN, long), GEN x, long prec); GEN sort_factor_pol(GEN y, int (*cmp)(GEN,GEN)); GEN incloop(GEN a); GEN resetloop(GEN a, GEN b); GEN setloop(GEN a); void forpari(GEN a, GEN b, GEN node); void untilpari(GEN a, GEN b); void whilepari(GEN a, GEN b); GEN ifpari(GEN g, GEN a, GEN b); GEN andpari(GEN a, GEN b); GEN orpari(GEN a, GEN b); void ifpari_void(GEN g, GEN a, GEN b); GEN geval_gp(GEN x, GEN t); GEN gadde(GEN *x, GEN y); GEN gadd1e(GEN *x); GEN gdive(GEN *x, GEN y); GEN gdivente(GEN *x, GEN y); GEN gdivrounde(GEN *x, GEN y); GEN gmode(GEN *x, GEN y); GEN gmule(GEN *x, GEN y); GEN gshiftle(GEN *x, long n); GEN gshiftre(GEN *x, long n); GEN gstore(GEN *x, GEN y); GEN gsube(GEN *x, GEN y); GEN gsub1e(GEN *x); GEN gshift_right(GEN x, long n); GEN derivnum0(GEN a, GEN code, long prec); GEN derivfun0(GEN code, GEN args, long prec); GEN direuler0(GEN a, GEN b, GEN code, GEN c); GEN divsum(GEN num, GEN code); void fordiv(GEN a, GEN code); void forell0(long a, long b, GEN code); void forprime(GEN a, GEN b, GEN code); void forstep(GEN a, GEN b, GEN s, GEN code); void forsubgroup0(GEN cyc, GEN bound, GEN code); void forvec(GEN x, GEN code, long flag); GEN intcirc0(GEN a, GEN R, GEN code, GEN tab, long prec); GEN intfourcos0(GEN a, GEN b, GEN x, GEN code, GEN tab, long prec); GEN intfourexp0(GEN a, GEN b, GEN x, GEN code, GEN tab, long prec); GEN intfoursin0(GEN a, GEN b, GEN x, GEN code, GEN tab, long prec); GEN intfuncinit0(GEN a, GEN b, GEN code, long flag, long m, long prec); GEN intlaplaceinv0(GEN sig, GEN x, GEN code, GEN tab, long prec); GEN intmellininv0(GEN sig, GEN x, GEN code, GEN tab, long prec); GEN intnum0(GEN a, GEN b, GEN code, GEN tab, long prec); GEN intnuminit0(GEN a, GEN b, GEN tab, long prec); GEN intnuminitgen0(GEN a, GEN b, GEN code, long m, long flag, long prec); GEN intnumromb0(GEN a, GEN b, GEN code, long flag, long prec); GEN matrice(GEN nlig, GEN ncol, GEN code); GEN prodeuler0(GEN a, GEN b, GEN code, long prec); GEN prodinf0(GEN a, GEN code, long flag, long prec); GEN produit(GEN a, GEN b, GEN code, GEN x); GEN somme(GEN a, GEN b, GEN code, GEN x); GEN sumalt0(GEN a, GEN code,long flag, long prec); GEN suminf0(GEN a, GEN code, long prec); GEN sumnum0(GEN a, GEN sig, GEN code, GEN tab, long flag, long prec); GEN sumnumalt0(GEN a, GEN sig, GEN code, GEN tab, long flag, long prec); GEN sumnuminit0(GEN a, GEN tab, long sgn, long prec); GEN sumpos0(GEN a, GEN code, long flag,long prec); GEN vecteursmall(GEN nmax, GEN code); GEN vecteur(GEN nmax, GEN n); GEN vvecteur(GEN nmax, GEN n); GEN zbrent0(GEN a, GEN b, GEN code, long prec); GEN addrex01(GEN x); GEN adduispec_offset(pari_ulong s, GEN x, long offset, long nx); int lgcdii(pari_ulong* d, pari_ulong* d1, pari_ulong* u, pari_ulong* u1, pari_ulong* v, pari_ulong* v1, pari_ulong vmax); pari_ulong rgcduu(pari_ulong d, pari_ulong d1, pari_ulong vmax, pari_ulong* u, pari_ulong* u1, pari_ulong* v, pari_ulong* v1, long *s); pari_ulong xgcduu(pari_ulong d, pari_ulong d1, int f, pari_ulong* v, pari_ulong* v1, long *s); pari_ulong xxgcduu(pari_ulong d, pari_ulong d1, int f, pari_ulong* u, pari_ulong* u1, pari_ulong* v, pari_ulong* v1, long *s); GEN divgunu(GEN x, pari_ulong i); GEN divrunu(GEN x, pari_ulong i); GEN logagmcx(GEN q, long prec); GEN muliispec(GEN x, GEN y, long nx, long ny); GEN red_montgomery(GEN T, GEN N, pari_ulong inv); GEN sqrispec(GEN x, long nx); GEN subrex01(GEN x); GEN modr_safe(GEN x, GEN y); pari_ulong *convi(GEN x, long *l); int approx_0(GEN x, GEN y); GEN bernfrac_using_zeta(long n); int OK_bern(long nb, long prec); GEN rpowuu(pari_ulong a, pari_ulong n, long prec); pari_ulong u_pow10(int n); double dabs(double s, double t); void dcxlog(double s, double t, double *a, double *b); double dnorm(double s, double t); double dbllog2(GEN z); pari_ulong usqrtsafe(pari_ulong a); GEN hnfadd(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,GEN extramat,GEN extraC); GEN hnfadd_i(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,GEN extramat,GEN extraC); GEN hnfspec_i(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,long k0); GEN hnfspec(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,long k0); GEN mathnfspec(GEN x, GEN *ptperm, GEN *ptdep, GEN *ptB, GEN *ptC); GEN LLL_check_progress(GEN Bnorm, long n0, GEN m, int final, long *ti_LLL); GEN extendedgcd(GEN A); GEN imagecomplspec(GEN x, long *nlze); __inline__ static void rowselect_p(GEN A, GEN B, GEN p, long init); GEN dim1proj(GEN prh); GEN detcyc(GEN cyc, long *L); GEN merge_factor_i(GEN f, GEN g); GEN coprime_part(GEN x, GEN f); pari_ulong ucoprime_part(pari_ulong x, pari_ulong f); pari_ulong is_kth_power(GEN x, pari_ulong p, GEN *pt, byteptr d); GEN mpqs(GEN N); pari_ulong gcduodd(pari_ulong x, pari_ulong y); long Z_lvalrem_stop(GEN n, pari_ulong p, int *stop); long u_lvalrem_stop(pari_ulong *n, pari_ulong p, int *stop); GEN addmulXn(GEN x, GEN y, long d); GEN addshiftpol(GEN x, GEN y, long d); GEN lift_if_rational(GEN x); GEN monomial(GEN a, long degpol, long v); GEN monomialcopy(GEN a, long degpol, long v); GEN mulmat_pol(GEN A, GEN x); GEN ser2pol_i(GEN x, long lx); GEN ser2rfrac_i(GEN x); GEN shiftpol_i(GEN x, long v); GEN swap_vars(GEN b0, long v); GEN RgX_recipspec_shallow(GEN x, long l, long n); GEN bezout_lift_fact(GEN T, GEN Tmod, GEN p, long e); GEN Kronecker_to_FpXQX(GEN z, GEN pol, GEN p); GEN FpX_quad_root(GEN x, GEN p, int unknown); long FpX_split_Berlekamp(GEN *t, GEN pp); GEN FqX_split_all(GEN z, GEN T, GEN p); long FqX_split_by_degree(GEN *pz, GEN u, GEN q, GEN T, GEN p); long FqX_split_deg1(GEN *pz, GEN u, GEN q, GEN T, GEN p); GEN FqX_split_roots(GEN z, GEN T, GEN p, GEN pol); GEN polsym_gen(GEN P, GEN y0, long n, GEN T, GEN N); GEN ZXQ_charpoly_sqf(GEN A, GEN B, long *lambda, long v); GEN ZX_disc_all(GEN,pari_ulong); GEN ZX_resultant_all(GEN A, GEN B, GEN dB, pari_ulong bound); GEN ZX_ZXY_resultant_all(GEN A, GEN B, long *lambda, GEN *LPRS); GEN RgXQ_minpoly_naive(GEN y, GEN P); GEN lift_intern0(GEN x,long v); double cauchy_bound(GEN p); GEN chk_factors_get(GEN lt, GEN famod, GEN c, GEN T, GEN N); long cmbf_maxK(long nb); GEN ZX_DDF(GEN x); GEN fact_from_DDF(GEN fa, GEN e, long n); GEN initgaloisborne(GEN T, GEN dn, long prec, GEN *pL, GEN *pprep, GEN *pdis); GEN logmax_modulus_bound(GEN p); GEN polint_i(GEN xa, GEN ya, GEN x, long n, GEN *ptdy); GEN quicktrace(GEN x, GEN sym); GEN special_pivot(GEN x); GEN vandermondeinversemod(GEN L, GEN T, GEN den, GEN mod); GEN ZX_monic_factorpadic(GEN f, GEN p, long prec); enum { t_FF_FpXQ = 0, t_FF_Flxq = 1, t_FF_F2xq = 2 }; enum { fupb_NONE, fupb_RELAT, fupb_LARGE, fupb_PRECI }; void debug_stack(void); void fill_stack(void); void init_dalloc(void); double *dalloc(size_t n); __inline__ static void gerepilecoeffs2(pari_sp av, GEN x, int n, GEN y, int o); void minim_alloc(long n, double ***q, GEN *x, double **y, double **z, double **v); int pop_entree_block(entree *ep, long loc); int pop_val_if_newer(entree *ep, long loc); void print_errcontext(PariOUT *out, const char *msg, const char *s, const char *entry); void print_prefixed_text(PariOUT *out, const char *s, const char *prefix, const char *str); __inline__ static void print_text(const char *s) { print_prefixed_text(pariOut, s,((void *)0),((void *)0)); } __inline__ static void out_print_text(PariOUT *out, const char *s) { print_prefixed_text(out, s,((void *)0),((void *)0)); } __inline__ static long is_keyword_char(char c) { return (((*__ctype_b_loc ())[(int) (((int)c))] & (unsigned short int) _ISalnum) || c=='_'); } entree* is_entry_intern(const char *s, entree **table, long *hash); entree* do_alias(entree *ep); char* get_sep(const char *t); long get_int(const char *s, long dflt); pari_ulong get_uint(const char *s); int gp_init_functions(void); GEN pari_compile_str(char *lex, int strict); void pari_sigint(const char *s); pariFILE *pari_last_tmp_file(); void* get_stack(double fraction, long min); void init_graph(void); void free_graph(void); void initout(int initerr); void init80col(void); int pari_kernel_init(void); void print_functions_hash(const char *s); void print_all_user_fun(int member); GEN readbin(const char *name, FILE *f, int *vector); int term_height(void); int term_width(void); void whatnow_new_syntax(const char *f, long n); void decode_color(long n, long *c); extern GEN pari_colormap, pari_graphcolors; extern pari_ulong precreal; typedef struct { GEN *res; size_t size; pari_ulong total; } gp_hist; typedef struct { pariFILE *file; char *cmd; } gp_pp; typedef struct { char *PATH; char **dirs; } gp_path; typedef struct { char format; long sigd; int sp; int prettyp; int TeXstyle; } pariout_t; void lim_lines_output(char *s, long n, long max); void gen_output(GEN x, pariout_t *T); void parsestate_reset(void); void parsestate_save(struct pari_parsestate *state); void parsestate_restore(struct pari_parsestate *state); void compilestate_reset(void); void compilestate_save(struct pari_compilestate *comp); void compilestate_restore(struct pari_compilestate *comp); void evalstate_clone(void); void evalstate_reset(void); void evalstate_restore(struct pari_evalstate *state); void evalstate_save(struct pari_evalstate *state); void debug_context(void); typedef struct { gp_hist *hist; gp_pp *pp; gp_path *path; pariout_t *fmt; pari_ulong lim_lines, flags; int echo, breakloop, recover, use_readline; int secure, simplify, strictmatch, chrono; pari_timer *T; long last_time; } gp_data; extern gp_data *GP_DATA; enum { gpd_QUIET=1, gpd_TEST=2, gpd_EMACS=256, gpd_TEXMACS=512}; void gpwritebin(const char *s, GEN x); extern char *current_logfile; extern long gp_colors[]; extern int disable_color; extern pari_ulong compatible; enum { NONE, WARN, OLDFUN, OLDALL }; enum { EpNEW = 100, EpALIAS, EpVAR, EpINSTALL }; extern const long functions_tblsz; extern entree **functions_hash; extern entree **defaults_hash; extern entree oldfonctions[]; typedef struct Buffer { char *buf; pari_ulong len; jmp_buf env; } Buffer; Buffer *new_buffer(void); void delete_buffer(Buffer *b); void fix_buffer(Buffer *b, long newlbuf); typedef struct { const char *s; char *t, *end; int in_string, in_comment, more_input, wait_for_brace, downcase; Buffer *buf; } filtre_t; void init_filtre(filtre_t *F, Buffer *buf); char *filtre(const char *s, int flag); void check_filtre(filtre_t *F); gp_data *default_gp_data(void); GEN gp_history(gp_hist *H, long p, char *old, char *entry); void delete_dirs(gp_path *p); void gp_expand_path(gp_path *p); const char *pari_default_path(void); typedef struct input_method { char * (*fgets)(char *,int,FILE*); char * (*getline)(char**, int f, struct input_method*, filtre_t *F); int free; const char *prompt, *prompt_cont; FILE *file; } input_method; int input_loop(filtre_t *F, input_method *IM); char *file_input(char **s0, int junk, input_method *IM, filtre_t *F); char *file_getline(Buffer *b, char **s0, input_method *IM); GEN FlxX_recipspec(GEN x, long l, long n, long vs); GEN FlxX_sub(GEN x, GEN y, pari_ulong p); GEN FlxX_subspec(GEN x, GEN y, pari_ulong p, long lx, long ly); GEN FlxX_swap(GEN x, long n, long ws); GEN zxX_to_Kronecker(GEN P, GEN Q); GEN zxX_to_Kronecker_spec(GEN P, long lp, GEN Q); GEN Flx_addshift(GEN x, GEN y, pari_ulong p, long d); GEN Flx_addspec(GEN x, GEN y, pari_ulong p, long lx, long ly); GEN Flx_even_odd_comb(GEN P, pari_ulong u, pari_ulong v, pari_ulong p); GEN Flx_mulspec(GEN a, GEN b, pari_ulong p, long na, long nb); GEN Flx_negspec(GEN x, pari_ulong p, long l); GEN Flx_recipspec(GEN x, long l, long n); GEN Flx_sqrspec(GEN a, pari_ulong p, long na); GEN Flx_subspec(GEN x, GEN y, pari_ulong p, long lx, long ly); GEN Kronecker_to_FlxqX(GEN z, GEN T, pari_ulong p); GEN FlxqX_invMontgomery(GEN T, GEN Q, pari_ulong p); GEN FlxqX_mulspec(GEN x, GEN y, GEN T, pari_ulong p, long lx, long ly); GEN FlxqX_rem_Montgomery(GEN x, GEN mg, GEN T, GEN Q, pari_ulong p); GEN redimagsl2(GEN q, GEN *U); GEN redrealsl2(GEN V); GEN redrealsl2step(GEN A); GEN redtausl2(GEN t, GEN *U); typedef long (*pivot_fun)(GEN,GEN,long,GEN); GEN RgM_pivots(GEN x0, GEN data, long *rr, pivot_fun pivot); __inline__ static void vecselect_p(GEN A, GEN B, GEN p, long init, long lB); GEN bestappr_mod(GEN x, GEN A, GEN B); int is_gener_Fp(GEN x, GEN p, GEN p_1, GEN L); int is_gener_Fl(pari_ulong x, pari_ulong p, pari_ulong p_1, GEN L); byteptr initprimes0(pari_ulong maxnum, long *lenp, pari_ulong *lastp); long set_optimize(long what, GEN g); GEN nffromhnfbasis(GEN nf, GEN x); GEN nftohnfbasis(GEN nf, GEN x); GEN gen_if_principal(GEN bnf, GEN x); int nfissquarefree(GEN nf, GEN x); GEN nfreducemodpr_i(GEN x, GEN prh); GEN polsymmodp(GEN g, GEN p); void check_nfelt(GEN x, GEN *den); GEN zk_ei_mul(GEN nf, GEN x, long i); void check_listpr(GEN x); GEN extideal_HNF_mul(GEN nf, GEN x, GEN y); GEN factor_norm(GEN x); GEN factorbackprime(GEN nf, GEN L, GEN e); long val_norm(GEN x, GEN p, long *vz); GEN check_and_build_nfabs(GEN rnf); GEN check_and_build_norms(GEN rnf); GEN checkrnfeq(GEN x); GEN plindep(GEN x); GEN pslq(GEN x); GEN pslqL2(GEN x); GEN form_to_ideal(GEN x); GEN qfbforms(GEN D); typedef struct GRHcheck_t { double cD, cN; long checkok; } GRHcheck_t; void init_GRHcheck(GRHcheck_t *S, long N, long R1, double LOGD); int GRHok(GRHcheck_t *S, double L, double SA, double SB); GEN check_and_build_matal(GEN bnf); GEN extract_full_lattice(GEN x); GEN init_red_mod_units(GEN bnf, long prec); GEN isprincipalarch(GEN bnf, GEN col, GEN kNx, GEN e, GEN dx, long *pe); GEN red_mod_units(GEN col, GEN z); GEN minkowski_bound(GEN D, long N, long r2, long prec); int subgroup_conductor_ok(GEN H, GEN L); GEN subgrouplist_cond_sub(GEN bnr, GEN C, GEN bound); GEN weipell0(GEN e, long prec, long PREC); void pari_close_seadata(void); void pari_init_seadata(void); const char * eng_ord(long i); char * env_ok(const char *s); void filestate_restore(pariFILE *F); void killallfiles(void); pariFILE* newfile(FILE *f, const char *name, int type); void pari_init_files(void); void pari_close_files(void); int popinfile(void); GEN readobj(FILE *f, int *ptc); pariFILE* try_pipe(const char *cmd, int flag); void writeGEN(GEN x, FILE *f); void writenamedGEN(GEN x, const char *s, FILE *f); GEN galoiscosets(GEN O, GEN perm); long intheadlong(GEN x, GEN mod); long isomborne(GEN P, GEN den, GEN p); GEN listznstarelts(long m, long p); GEN matheadlong(GEN W, GEN mod); GEN matrixnorm(GEN M, long prec); GEN monomorphismlift(GEN P, GEN S, GEN Q, GEN p, long e); long polheadlong(GEN P, long n, GEN mod); GEN vandermondeinverseprep(GEN L); GEN polgaloisnamesbig(long n, long k); int ff_poltype(GEN *x, GEN *p, GEN *pol); GEN gred_frac2(GEN x1, GEN x2); GEN gred_rfrac2(GEN x1, GEN x2); GEN gred_rfrac_simple(GEN n, GEN d); GEN sqr_ser_part(GEN x, long l1, long l2); GEN gsubst_expr(GEN pol, GEN from, GEN to); GEN poltoser(GEN x, long v, long prec); GEN rfractoser(GEN x, long v, long prec); GEN ellfacteur(GEN n, int insist); GEN pollardbrent(GEN n); pari_ulong snextpr(pari_ulong p, byteptr *d, long *rcn, long *q, long k); GEN squfof(GEN n); long BPSW_psp_nosmalldiv(GEN N); int Fl_MR_Jaeschke(pari_ulong n, long k); int MR_Jaeschke(GEN n, long k); int uisprime_nosmalldiv(pari_ulong n); void err_recover(long numerr); void pari_init_defaults(void); void pari_init_stack(size_t size, size_t old); int nfissplit(GEN nf, GEN x); long cosets_perm_search(GEN C, GEN p); GEN group_export_GAP(GEN G); GEN group_export_MAGMA(GEN G); GEN perm_generate(GEN S, GEN H, long o); long perm_relorder(GEN p, GEN S); GEN perm_to_GAP(GEN p); GEN F2x_Berlekamp_ker(GEN u); GEN Flx_Berlekamp_ker(GEN u, pari_ulong p); GEN FpX_Berlekamp_ker(GEN u, GEN p); GEN FpX_factcantor(GEN f, GEN pp, long flag); GEN FqX_Berlekamp_ker(GEN u, GEN T, GEN q, GEN p); GEN FqX_rand(long d1, long v, GEN T, GEN p); long FqX_split_Berlekamp(GEN *t, GEN q, GEN T, GEN p); GEN Zp_appr(GEN f, GEN a); int cmp_padic(GEN x, GEN y); GEN factcantor0(GEN f, GEN pp, long flag); GEN trivfact(void); GEN sylvestermatrix_i(GEN x, GEN y); GEN DDF_roots(GEN pol, GEN polp, GEN p); void factor_quad(GEN x, GEN res, long *ptcnt); long logint(GEN B, GEN y, GEN *ptq); GEN FpX_gcd_check(GEN x, GEN y, GEN p); GEN Flm_Frobenius_pow(GEN M, long d, GEN T, pari_ulong p); GEN FpM_Frobenius_pow(GEN M, long d, GEN T, GEN p); GEN FpX_compositum(GEN A, GEN B, GEN p); GEN FpX_direct_compositum(GEN A, GEN B, GEN p); pari_ulong ZX_ZXY_ResBound(GEN A, GEN B, GEN dB); GEN ffinit_Artin_Shreier(GEN ip, long l); GEN ffinit_rand(GEN p, long n); byteptr init_modular(pari_ulong *p); GEN polint_triv(GEN xa, GEN ya); void pari_init_rand(void); GEN FFT(GEN x, GEN Omega); GEN FFTinit(long k, long prec); GEN bnr_to_znstar(GEN bnr, long *complex); GEN galoiscyclo(long n, long v); GEN znstar_bits(long n, GEN H); long znstar_conductor(long n, GEN H); GEN znstar_cosets(long n, long phi_n, GEN H); GEN znstar_elts(long n, GEN H); GEN znstar_generate(long n, GEN V); GEN znstar_hnf(GEN Z, GEN M); GEN znstar_hnf_elts(GEN Z, GEN H); GEN znstar_hnf_generators(GEN Z, GEN M); GEN znstar_reduce_modulus(GEN H, long n); GEN znstar_small(GEN zn); void pari_init_floats(void); void pari_close_floats(void); GEN rootsof1complex(GEN n, long prec); GEN rootsof1padic(GEN n, GEN y); GEN cxpsi(GEN s0, long prec); double darg(double s, double t); GEN bernreal_using_zeta(long n, GEN iz, long prec); GEN czeta(GEN s0, long prec); GEN double_eta_quotient(GEN a, GEN w, GEN D, long p, long q, GEN pq, GEN sqrtD); GEN inv_szeta_euler(long n, double lba, long prec); GEN polylogd0(long m, GEN x, long flag, long prec); GEN twistpartialzeta(GEN q, long f, long c, GEN va, GEN cff); # 43 "../src/kernel/gmp/mp.c" 2 # 1 "../src/kernel/none/tune-gen.h" 1 long SQRI_FFT_LIMIT = -1; long MULII_FFT_LIMIT = -1; long SQRI_KARATSUBA_LIMIT = -1; long MULII_KARATSUBA_LIMIT = -1; long MULRR_MULII_LIMIT = 5; long Fp_POW_REDC_LIMIT = 3; long Fp_POW_BARRETT_LIMIT = 11; long INVMOD_GMP_LIMIT = 3; long DIVRR_GMP_LIMIT = 10; long Flx_MUL_KARATSUBA_LIMIT = 47; long Flx_SQR_KARATSUBA_LIMIT = 105; long Flx_MUL_HALFMULII_LIMIT = 5; long Flx_SQR_HALFSQRI_LIMIT = 3; long Flx_MUL_MULII_LIMIT = 5; long Flx_SQR_SQRI_LIMIT = 5; long Flx_MUL_MULII2_LIMIT = 61; long Flx_SQR_SQRI2_LIMIT = 248; long Flx_INVMONTGOMERY_LIMIT = 407; long Flx_REM_MONTGOMERY_LIMIT = 200; long Flx_POW_MONTGOMERY_LIMIT = 102; long Flx_HALFGCD_LIMIT = 298; long Flx_GCD_LIMIT = 1890; long Flx_EXTGCD_LIMIT = 406; long FpX_INVMONTGOMERY_LIMIT = 127; long FpX_REM_MONTGOMERY_LIMIT = 127; long FpX_POW_MONTGOMERY_LIMIT = 42; long FpX_HALFGCD_LIMIT = 52; long FpX_GCD_LIMIT = 377; long FpX_EXTGCD_LIMIT = 73; long EXPNEWTON_LIMIT = 109; long INVNEWTON_LIMIT = 330; long LOGAGM_LIMIT = 44; long LOGAGMCX_LIMIT = 46; long AGM_ATAN_LIMIT = 93; long RgX_SQR_LIMIT = 42; long RgX_MUL_LIMIT = 9; # 44 "../src/kernel/gmp/mp.c" 2 int pari_kernel_init(void) { return 0; } __inline__ static void xmpn_copy(mp_limb_t *x, mp_limb_t *y, long n) { while (--n >= 0) x[n]=y[n]; } __inline__ static void xmpn_mirror(mp_limb_t *x, long n) { long i; for(i=0;i<(n>>1);i++) { pari_ulong m=x[i]; x[i]=x[n-1-i]; x[n-1-i]=m; } } __inline__ static void xmpn_mirrorcopy(mp_limb_t *z, mp_limb_t *x, long n) { long i; for(i=0;i= 0) x[n]=0; } __inline__ static GEN icopy_ef(GEN x, long l) { register long lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); const GEN y = cgeti(l); while (--lx > 0) y[lx]=x[lx]; return y; } # 114 "../src/kernel/gmp/mp.c" GEN setloop(GEN a) { pari_sp av = avma - 2 * sizeof(long); (void)cgetg(((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1))) + 3, t_VECSMALL); return icopy_avma(a, av); } GEN resetloop(GEN a, GEN b) { a[0] = (((pari_ulong)(t_INT)) << (32 - 7)) | evallg(((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))); affii(b, a); return a; } static GEN incpos(GEN a) { long i, l = ((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1))); for (i=2; i> (32 - 2))) { case 0: a[0]=(((pari_ulong)(t_INT)) << (32 - 7)) | (3); a[1]=((pari_ulong)(((long)(1)) << (32 - 2))) | (3); a[2]=1; return a; case -1: return incneg(a); default: return incpos(a); } } __inline__ static GEN adduispec(pari_ulong s, GEN x, long nx) { GEN zd; long lz; if (nx == 1) return adduu((pari_ulong)x[0], s); lz = nx+3; zd = cgeti(lz); if (__gmpn_add_1(((mp_limb_t *)((zd)+2)),(mp_limb_t *)x,nx,s)) zd[lz-1]=1; else lz--; zd[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (lz); return zd; } GEN adduispec_offset(pari_ulong s, GEN x, long offset, long nx) { GEN xd=x+2+offset; while (nx && *(xd+nx-1)==0) nx--; if (!nx) return utoi(s); return adduispec(s,xd,nx); } __inline__ static GEN addiispec(GEN x, GEN y, long nx, long ny) { GEN zd; long lz; if (nx < ny) {{GEN _z=x; x=y; y=_z;}; {long _z=nx; nx=ny; ny=_z;};}; if (ny == 1) return adduispec(*y,x,nx); lz = nx+3; zd = cgeti(lz); if (__gmpn_add(((mp_limb_t *)((zd)+2)),(mp_limb_t *)x,nx,(mp_limb_t *)y,ny)) zd[lz-1]=1; else lz--; zd[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (lz); return zd; } __inline__ static GEN subiuspec(GEN x, pari_ulong s, long nx) { GEN zd; long lz; if (nx == 1) return utoi(x[0] - s); lz = nx + 2; zd = cgeti(lz); __gmpn_sub_1 (((mp_limb_t *)((zd)+2)), (mp_limb_t *)x, nx, s); if (! zd[lz - 1]) { --lz; } zd[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (lz); return zd; } __inline__ static GEN subiispec(GEN x, GEN y, long nx, long ny) { GEN zd; long lz; if (ny==1) return subiuspec(x,*y,nx); lz = nx+2; zd = cgeti(lz); __gmpn_sub (((mp_limb_t *)((zd)+2)), (mp_limb_t *)x, nx, (mp_limb_t *)y, ny); while (lz >= 3 && zd[lz - 1] == 0) { lz--; } zd[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (lz); return zd; } static void roundr_up_ip(GEN x, long l) { long i = l; for(;;) { if (++x[--i]) break; if (i == 2) { x[2] = (1UL << (32 -1)); (((pari_ulong*)(x))[1]= (((pari_ulong*)(x))[1]&(~((1UL<<(32 - 2))-1))) | (pari_ulong)evalexpo(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))+1)); break; } } } void affir(GEN x, GEN y) { const long s = ((((long*)(x))[1]) >> (32 - 2)), ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); long lx, sh, i; if (!s) { y[1] = evalexpo(-bit_accuracy(ly)); return; } lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(*((x)+((long)(((pari_ulong*)((x)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1)); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); y[1] = ((pari_ulong)(((long)(s)) << (32 - 2))) | evalexpo(bit_accuracy(lx)-sh-1); if (sh) { if (lx <= ly) { for (i=lx; i>(32 -sh); xmpn_mirror(((mp_limb_t *)((y)+2)),ly-2); if ((x[lx-ly+1]<> (32 - 2)); long lz,lx,m; GEN z; if (!s) return gen_0; if (!n) return icopy(x); lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); if (n > 0) { long d = dvmdsBIL(n, &m); long i; lz = lx + d + (m!=0); z = cgeti(lz); for (i=0; i> (32 - 2)); GEN y; if (!s) return gen_0; if (!n) { y = cgeti(lx); y[1] = ((pari_ulong)(((long)(s)) << (32 - 2))) | (lx); xmpn_mirrorcopy(((mp_limb_t *)((y)+2)),((mp_limb_t *)((x)+2)),lx-2); return y; } if (n > 0) { GEN z = (GEN)avma; long d = dvmdsBIL(n, &m); ly = lx+d; y = new_chunk(ly); for ( ; d; d--) *--z = 0; if (!m) for (i=2; i> sh; if (i) { ly++; y = new_chunk(1); y[2] = i; } } } else { ly = lx - dvmdsBIL(-n, &m); if (ly<3) return gen_0; y = new_chunk(ly); if (m) { shift_right(y,x, 2,ly, 0,m); if (y[2] == 0) { if (ly==3) { avma = (pari_sp)(y+3); return gen_0; } ly--; avma = (pari_sp)(++y); } } else { for (i=2; i> (32 - 2))) == 0 || (e=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))) < 0) return gen_0; d = nbits2prec(e+1); m = remsBIL(e); if (d > ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))) pari_err(precer, "truncr (precision loss in truncation)"); y=cgeti(d); y[1] = ((pari_ulong)(((long)(s)) << (32 - 2))) | (d); if (++m == 32) for (i=2; i> (32 - 2)) >= 0) return truncr(x); if ((e=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))) < 0) return gen_m1; d = nbits2prec(e+1); m = remsBIL(e); lx=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); if (d>lx) pari_err(precer, "floorr (precision loss in truncation)"); y = cgeti(d+1); if (++m == 32) { for (i=2; i> (32 - 2))) return utoi(a); lz = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))+1; z = cgeti(lz); z[2]=a; for(i=3;i> (32 - 2)); pari_ulong hi; if (!x) pari_err(gdiver); if (!sy) return 0; hi = __gmpn_mod_1(((mp_limb_t *)((y)+2)),(((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2),x); if (!hi) return 0; return (sy > 0)? hi: x - hi; } GEN diviu_rem(GEN y, pari_ulong x, pari_ulong *rem) { long ly; GEN z; if (!x) pari_err(gdiver); if (!((((long*)(y))[1]) >> (32 - 2))) { *rem = 0; return gen_0; } ly = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (ly == 3 && (pari_ulong)x > (pari_ulong)y[2]) { *rem = (pari_ulong)y[2]; return gen_0; } z = cgeti(ly); *rem = __gmpn_divrem_1(((mp_limb_t *)((z)+2)), 0, ((mp_limb_t *)((y)+2)), (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), x); if (z [ly - 1] == 0) ly--; z[1] = (ly) | ((pari_ulong)(((long)(1)) << (32 - 2))); return z; } GEN divis_rem(GEN y, long x, long *rem) { long sy=((((long*)(y))[1]) >> (32 - 2)),ly,s; GEN z; if (!x) pari_err(gdiver); if (!sy) { *rem = 0; return gen_0; } if (x<0) { s = -sy; x = -x; } else s = sy; ly = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (ly == 3 && (pari_ulong)x > (pari_ulong)y[2]) { *rem = itos(y); return gen_0; } z = cgeti(ly); *rem = __gmpn_divrem_1(((mp_limb_t *)((z)+2)), 0, ((mp_limb_t *)((y)+2)), (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), x); if (sy<0) *rem = - *rem; if (z[ly - 1] == 0) ly--; z[1] = (ly) | ((pari_ulong)(((long)(s)) << (32 - 2))); return z; } GEN divis(GEN y, long x) { long sy=((((long*)(y))[1]) >> (32 - 2)),ly,s; GEN z; if (!x) pari_err(gdiver); if (!sy) return gen_0; if (x<0) { s = -sy; x = -x; } else s=sy; ly = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (ly == 3 && (pari_ulong)x > (pari_ulong)y[2]) return gen_0; z = cgeti(ly); (void)__gmpn_divrem_1(((mp_limb_t *)((z)+2)), 0, ((mp_limb_t *)((y)+2)), (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), x); if (z[ly - 1] == 0) ly--; z[1] = (ly) | ((pari_ulong)(((long)(s)) << (32 - 2))); return z; } static GEN divrr_with_gmp(GEN x, GEN y) { long lx=(((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-2),ly=(((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1)))-2); long lw=minss(lx,ly); long lly=minss(lw+1,ly); GEN w=cgetr(lw+2); long lu=lw+lly; long llx=minss(lu,lx); mp_limb_t *u=(mp_limb_t *)new_chunk(lu); mp_limb_t *z=(mp_limb_t *)new_chunk(lly); mp_limb_t *q,*r; long e=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))-((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); long sx=((((long*)(x))[1]) >> (32 - 2)),sy=((((long*)(y))[1]) >> (32 - 2)); xmpn_mirrorcopy(z,((mp_limb_t *)((y)+2)),lly); xmpn_mirrorcopy(u+lu-llx,((mp_limb_t *)((x)+2)),llx); xmpn_zero(u,lu-llx); q = (mp_limb_t *)new_chunk(lw+1); r = (mp_limb_t *)new_chunk(lly); __gmpn_tdiv_qr(q,r,0,u,lu,z,lly); if ((pari_ulong)r[lly-1] > ((pari_ulong)z[lly-1]>>1)) __gmpn_add_1(q,q,lw+1,1); xmpn_mirrorcopy(((mp_limb_t *)((w)+2)),q,lw); if (q[lw] == 0) e--; else if (q[lw] == 1) { shift_right(w,w, 2,lw+2, 1,1); } else { w[2] = (1UL << (32 -1)); e++; } if (sy < 0) sx = -sx; w[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(e); avma=(pari_sp) w; return w; } static GEN divri_with_gmp(GEN x, GEN y) { long llx=(((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))-2),ly=(((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); long lly=minss(llx+1,ly); GEN w=cgetr(llx+2); long lu=llx+lly, ld=ly-lly; mp_limb_t *u=(mp_limb_t *)new_chunk(lu); mp_limb_t *z=(mp_limb_t *)new_chunk(lly); mp_limb_t *q,*r; long sh=__extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(y[ly+1]); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); long e=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))-expi(y); long sx=((((long*)(x))[1]) >> (32 - 2)),sy=((((long*)(y))[1]) >> (32 - 2)); if (sh) __gmpn_lshift(z,((mp_limb_t *)((y)+2))+ld,lly,sh); else xmpn_copy(z,((mp_limb_t *)((y)+2))+ld,lly); xmpn_mirrorcopy(u+lu-llx,((mp_limb_t *)((x)+2)),llx); xmpn_zero(u,lu-llx); q = (mp_limb_t *)new_chunk(llx+1); r = (mp_limb_t *)new_chunk(lly); __gmpn_tdiv_qr(q,r,0,u,lu,z,lly); if ((pari_ulong)r[lly-1] > ((pari_ulong)z[lly-1]>>1)) __gmpn_add_1(q,q,llx+1,1); xmpn_mirrorcopy(((mp_limb_t *)((w)+2)),q,llx); if (q[llx] == 0) e--; else if (q[llx] == 1) { shift_right(w,w, 2,llx+2, 1,1); } else { w[2] = (1UL << (32 -1)); e++; } if (sy < 0) sx = -sx; w[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(e); avma=(pari_sp) w; return w; } GEN divri(GEN x, GEN y) { long s = ((((long*)(y))[1]) >> (32 - 2)); if (!s) pari_err(gdiver); if (!((((long*)(x))[1]) >> (32 - 2))) return real_0_bit(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - expi(y)); if (!is_bigint(y)) { GEN z = divru(x, y[2]); if (s < 0) togglesign(z); return z; } return divri_with_gmp(x,y); } GEN divrr(GEN x, GEN y) { long sx=((((long*)(x))[1]) >> (32 - 2)), sy=((((long*)(y))[1]) >> (32 - 2)), lx,ly,lr,e,i,j; pari_ulong y0,y1; GEN r, r1; if (!sy) pari_err(gdiver); e = ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); if (!sx) return real_0_bit(e); if (sy<0) sx = -sx; lx=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); ly=((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (ly==3) { pari_ulong k = x[2], l = (lx>3)? x[3]: 0; register pari_ulong hiremainder; if (k < (pari_ulong)y[2]) e--; else { l >>= 1; if (k&1) l |= (1UL << (32 -1)); k >>= 1; } r = cgetr(3); r[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(e); hiremainder=k; r[2]=__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = l; __d = y[2]; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); return r; } if (ly>=DIVRR_GMP_LIMIT) return divrr_with_gmp(x,y); lr = minss(lx,ly); r = new_chunk(lr); r1 = r-1; r1[1] = 0; for (i=2; ily)? x[lr]: 0; y0 = y[2]; y1 = y[3]; for (i=0; i y0) { GEN y1 = y+1; j = lr-i; r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (y1[j]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); for (j--; j>0; j--) r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (y1[j]), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); j=i; do r[--j]++; while (j && !r[j]); } hiremainder = r1[1]; overflow = 0; qp = __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = r1[2]; __d = y0; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); k = hiremainder; } j = lr-i+1; if (!overflow) { long k3, k4; k3 = __extension__ ({ const pari_ulong __x = (qp), __y = (y1); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); if (j == 3) k4 = __extension__ ({ pari_ulong __arg1 = (hiremainder), __arg2 = (k); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); else { k3 = __extension__ ({ pari_ulong __arg1 = (k3), __arg2 = (r1[3]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); k4 = __extension__ ({ pari_ulong __arg1 = (hiremainder), __arg2 = (k), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); } while (!overflow && k4) { qp--; k3=__extension__ ({ pari_ulong __arg1 = (k3), __arg2 = (y1); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); k4=__extension__ ({ pari_ulong __arg1 = (k4), __arg2 = (y0), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); } } if (j>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); else { hiremainder = 0 ; j = ly; } for (j--; j>1; j--) { r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (__extension__ ({ const pari_ulong __x = (qp), __y = (y[j]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); hiremainder += overflow; } if ((pari_ulong)r1[1] != hiremainder) { if ((pari_ulong)r1[1] < hiremainder) { qp--; j = lr-i-(lr-i>=ly); r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (y[j]), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); for (j--; j>1; j--) r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (y[j]), __value, __tmp = __arg1 + overflow; overflow = (__tmp < __arg1); __value = __tmp + __arg2; overflow |= (__value < __tmp); __value; }); } else { r1[1] -= hiremainder; while (r1[1]) { qp++; if (!qp) { j=i; do r[--j]++; while (j && !r[j]); } j = lr-i-(lr-i>=ly); r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (y[j]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); for (j--; j>1; j--) r1[j] = __extension__ ({ pari_ulong __arg1 = (r1[j]), __arg2 = (y[j]), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); r1[1] -= overflow; } } } *++r1 = qp; } if ((pari_ulong)r1[1] > (y0>>1)) { j=i; do r[--j]++; while (j && !r[j]); } r1 = r-1; for (j=i; j>=2; j--) r[j]=r1[j]; if (r[0] == 0) e--; else if (r[0] == 1) { shift_right(r,r, 2,lr, 1,1); } else { r[2] = (long)(1UL << (32 -1)); e++; } r[0] = (((pari_ulong)(t_REAL)) << (32 - 7))|evallg(lr); r[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(e); return r; } # 836 "../src/kernel/gmp/mp.c" GEN dvmdii(GEN x, GEN y, GEN *z) { long sx=((((long*)(x))[1]) >> (32 - 2)),sy=((((long*)(y))[1]) >> (32 - 2)); long lx, ly, lq; pari_sp av; GEN r,q; if (!sy) { if (z == ((GEN*)0x1L) && !sx) return gen_0; pari_err(gdiver); } if (!sx) { if (!z || z == ((GEN*)0x1L)) return gen_0; *z=gen_0; return gen_0; } lx=((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); ly=((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); lq=lx-ly; if (lq <= 0) { if (lq == 0) { long s=__gmpn_cmp(((mp_limb_t *)((x)+2)),((mp_limb_t *)((y)+2)),(((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); if (s>0) goto DIVIDE; if (s==0) { if (z == ((GEN*)0x1L)) return gen_0; if (z) *z = gen_0; if (sx < 0) sy = -sy; return stoi(sy); } } if (z == ((GEN*)0x1L)) return icopy(x); if (z) *z = icopy(x); return gen_0; } DIVIDE: av=avma; if (sx<0) sy = -sy; if (ly==3) { pari_ulong lq = lx; pari_ulong si; q = cgeti(lq); si = __gmpn_divrem_1(((mp_limb_t *)((q)+2)), 0, ((mp_limb_t *)((x)+2)), (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), y[2]); if (q[lq - 1] == 0) lq--; if (z == ((GEN*)0x1L)) { avma=av; if (!si) return gen_0; r=cgeti(3); r[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | (3); r[2] = si; return r; } q[1] = ((pari_ulong)(((long)(sy)) << (32 - 2))) | (lq); if (!z) return q; if (!si) { *z=gen_0; return q; } r=cgeti(3); r[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | (3); r[2] = si; *z=r; return q; } if (z == ((GEN*)0x1L)) { pari_ulong lr = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); pari_ulong lq = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))+3; GEN r = cgeti(lr); GEN q = cgeti(lq); __gmpn_tdiv_qr(((mp_limb_t *)((q)+2)), ((mp_limb_t *)((r)+2)),0, ((mp_limb_t *)((x)+2)), (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), ((mp_limb_t *)((y)+2)), (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); if (!r[lr - 1]) { while(lr>2 && !r[lr - 1]) lr--; if (lr == 2) {avma=av; return gen_0;} } r[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | (lr); avma = (pari_sp) r; return r; } else { pari_ulong lq = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))+3; pari_ulong lr = ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); GEN q = cgeti(lq); GEN r = cgeti(lr); __gmpn_tdiv_qr(((mp_limb_t *)((q)+2)), ((mp_limb_t *)((r)+2)),0, ((mp_limb_t *)((x)+2)), (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), ((mp_limb_t *)((y)+2)), (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); if (q[lq - 1] == 0) lq--; q[1] = ((pari_ulong)(((long)(sy)) << (32 - 2))) | (lq); if (!z) { avma = (pari_sp)q; return q; } if (!r[lr - 1]) { while(lr>2 && !r[lr - 1]) lr--; if (lr == 2) {avma=(pari_sp) q; *z=gen_0; return q;} } r[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | (lr); avma = (pari_sp) r; *z = r; return q; } } GEN red_montgomery(GEN T, GEN N, pari_ulong inv) { pari_sp av; GEN Te, Td, Ne, Nd, scratch; pari_ulong i, j, m, t, d, k = (((long)(((pari_ulong*)(N))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); int carry; register pari_ulong hiremainder; register pari_ulong overflow; if (k == 0) return gen_0; d = (((long)(((pari_ulong*)(T))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); if (d == 0) return gen_0; if (k == 1) { pari_ulong n = (pari_ulong)N[2]; if (d == 1) { hiremainder = (pari_ulong)T[2]; m = hiremainder * inv; (void)__extension__ ({ const pari_ulong __x = (m), __y = (n); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return utoi(hiremainder); } else { hiremainder = (pari_ulong)T[2]; m = hiremainder * inv; (void)__extension__ ({ const pari_ulong __x = (m), __y = (n); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); t = __extension__ ({ pari_ulong __arg1 = (hiremainder), __arg2 = ((pari_ulong)T[3]), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); if (overflow) t -= n; return utoi(t); } } av = avma; scratch = new_chunk(k<<1); Td = scratch; Te = T + 2; for (i=0; i < d ; i++) *Td++ = *Te++; for ( ; i < (k<<1); i++) *Td++ = 0; Te = scratch - 1; Ne = N + 1; carry = 0; for (i=0; i>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); for (j=1; j>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (*++Td), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); *Td = t; hiremainder += overflow; } t = __extension__ ({ pari_ulong __arg1 = (hiremainder), __arg2 = (*++Td), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); *Td = t + carry; carry = (overflow || (carry && *Td == 0)); } if (carry) { Td = Te; Nd = Ne; t = __extension__ ({ pari_ulong __arg1 = (*++Td), __arg2 = (*++Nd); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); *Td = t; while (Td < (GEN)av) { t = __extension__ ({ pari_ulong __arg1 = (*++Td), __arg2 = (*++Nd), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); *Td = t; } } Td = (GEN)av - 1; while (*Td == 0 && Te < Td) Td--; k = Td - Te; if (!k) { avma = av; return gen_0; } Td = (GEN)av - k; (void)memmove(Td, Te+1, k*sizeof(long)); Td -= 2; Td[0] = (((pari_ulong)(t_INT)) << (32 - 7)) | evallg(k+2); Td[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (k+2); # 1024 "../src/kernel/gmp/mp.c" avma = (pari_sp)Td; return Td; } # 1039 "../src/kernel/gmp/mp.c" static void GEN2mpz(mpz_t X, GEN x) { long l = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2; X->_mp_alloc = l; X->_mp_size = ((((long*)(x))[1]) >> (32 - 2)) > 0? l: -l; X->_mp_d = ((mp_limb_t *)((x)+2)); } static void mpz2GEN(GEN z, mpz_t Z) { long l = Z->_mp_size; z[1] = ((pari_ulong)(((long)(l > 0? 1: -1)) << (32 - 2))) | (labs(l)+2); } GEN diviuexact(GEN x, pari_ulong y) { if (!((((long*)(x))[1]) >> (32 - 2))) return gen_0; { long l = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); mpz_t X, Z; GEN z = cgeti(l); GEN2mpz(X, x); Z->_mp_alloc = l-2; Z->_mp_size = l-2; Z->_mp_d = ((mp_limb_t *)((z)+2)); __gmpz_divexact_ui(Z, X, y); mpz2GEN(z, Z); return z; } } GEN diviiexact(GEN x, GEN y) { if (!((((long*)(y))[1]) >> (32 - 2))) pari_err(gdiver); if (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))) == 3) { GEN z = diviuexact(x, y[2]); if (((((long*)(y))[1]) >> (32 - 2)) < 0) togglesign(z); return z; } if (!((((long*)(x))[1]) >> (32 - 2))) return gen_0; { long l = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); mpz_t X, Y, Z; GEN z = cgeti(l); GEN2mpz(X, x); GEN2mpz(Y, y); Z->_mp_alloc = l-2; Z->_mp_size = l-2; Z->_mp_d = ((mp_limb_t *)((z)+2)); __gmpz_divexact(Z, X, Y); mpz2GEN(z, Z); return z; } } # 1125 "../src/kernel/gmp/mp.c" GEN muliispec(GEN x, GEN y, long nx, long ny) { GEN zd; long lz; pari_ulong hi; if (nx < ny) {{GEN _z=x; x=y; y=_z;}; {long _z=nx; nx=ny; ny=_z;};}; if (!ny) return gen_0; if (ny == 1) return muluispec((pari_ulong)*y, x, nx); lz = nx+ny+2; zd = cgeti(lz); hi = __gmpn_mul(((mp_limb_t *)((zd)+2)), (mp_limb_t *)x, nx, (mp_limb_t *)y, ny); if (!hi) lz--; zd[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (lz); return zd; } GEN sqrispec(GEN x, long nx) { GEN zd; long lz; if (!nx) return gen_0; if (nx==1) return sqru(*x); lz = (nx<<1)+2; zd = cgeti(lz); __gmpn_mul_n(((mp_limb_t *)((zd)+2)), (mp_limb_t *)x, (mp_limb_t *)x, nx); if (zd[lz-1]==0) lz--; zd[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (lz); return zd; } GEN remi2n(GEN x, long n) { pari_ulong hi; long l, k, lx, ly, sx = ((((long*)(x))[1]) >> (32 - 2)); GEN z, xd, zd; if (!sx || !n) return gen_0; k = dvmdsBIL(n, &l); lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); if (lx < k+3) return icopy(x); xd = x + (2 + k); hi = ((pari_ulong)*xd) & ((1UL<> 1; S = cgetipos(l); if (r) { GEN R = cgeti(2 + na); nr = __gmpn_sqrtrem(((mp_limb_t *)((S)+2)), ((mp_limb_t *)((R)+2)), ((mp_limb_t *)((a)+2)), na); if (nr) R[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | (nr+2); else { avma = (pari_sp)S; R = gen_0; } *r = R; } else (void)__gmpn_sqrtrem(((mp_limb_t *)((S)+2)), ((void *)0), ((mp_limb_t *)((a)+2)), na); return S; } GEN sqrtr_abs(GEN a) { GEN res; mp_limb_t *b, *c; long l = (((long)(((pari_ulong*)(a))[0] & ((1UL<<(32 - 1 - 7))-1)))-2), e = ((long) ((((pari_ulong*)(a))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))), er = e>>1; long n; res = cgetr(2 + l); res[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | evalexpo(er); if (e&1) { b = (mp_limb_t *) new_chunk(l<<1); xmpn_zero(b,l); xmpn_mirrorcopy(b+l, ((mp_limb_t *)((a)+2)), l); c = (mp_limb_t *) new_chunk(l); n = __gmpn_sqrtrem(c,b,b,l<<1); if (n>l || (n==l && __gmpn_cmp(b,c,l) > 0)) __gmpn_add_1(c,c,l,1); } else { pari_ulong u; b = (mp_limb_t *) trunc2nr_lg(a,l+2,-1); b[1] = ((pari_ulong)a[l+1])<<(32 -1); b = (mp_limb_t *) new_chunk(l); xmpn_zero(b,l+1); c = (mp_limb_t *) new_chunk(l + 1); n = __gmpn_sqrtrem(c,b,b,(l<<1)+2); u = (pari_ulong)*c++; if ( u&(1UL << (32 -1)) || (u == ~(1UL << (32 -1)) && (n>l || (n==l && __gmpn_cmp(b,c,l)>0)))) __gmpn_add_1(c,c,l,1); } xmpn_mirrorcopy(((mp_limb_t *)((res)+2)),c,l); avma = (pari_sp)res; return res; } GEN int_normalize(GEN x, long known_zero_words) { long i = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))) - 1 - known_zero_words; for ( ; i > 1; i--) if (x[i]) { (((pari_ulong*)(x))[1]= (((pari_ulong*)(x))[1]&(~((1UL<<(32 - 1 - 7))-1))) | (pari_ulong)(i+1)); return x; } x[1] = ((pari_ulong)(((long)(0)) << (32 - 2))) | (2); return x; } pari_ulong * convi(GEN x, long *l) { long n = nchar2nlong(2 + (long)((((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2) * (32 * LOG10_2))); GEN str = cgetg(n+1, t_VECSMALL); unsigned char *res = (unsigned char*) ((char*) (((GEN) (str)) + 1 )); long llz = __gmpn_get_str(res, 10, ((mp_limb_t *)((icopy(x))+2)), (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); long lz; pari_ulong *z; long i, j; unsigned char *t; while (!*res) {res++; llz--;} lz = (8+llz)/9; z = (pari_ulong*)new_chunk(1+lz); t=res+llz+9; for(i=0;i> (32 - 2)), sy = ((((long*)(y))[1]) >> (32 - 2)); long lx,ly; if (sxsy) return 1; if (!sx) return 0; lx=((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); ly=((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (lx>ly) return sx; if (lx0) return absi_cmp_lg(x, y, lx); else return -absi_cmp_lg(x, y, lx); } int equalrr(GEN x, GEN y) { long lx, ly, i; if (!((((long*)(x))[1]) >> (32 - 2))) return ((((long*)(y))[1]) >> (32 - 2)) == 0; if (x[1] != y[1]) return 0; lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (lx < ly) { i=2; while (i> (32 - 2)), sy = ((((long*)(y))[1]) >> (32 - 2)); long ex,ey,lx,ly,lz,i; if (sxsy) return 1; if (!sx) return 0; ex=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); ey=((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); if (ex>ey) return sx; if (ex (pari_ulong)y[i]) ? sx : -sx; if (lx>=ly) { while (i> (32 - 2))) return !((((long*)(y))[1]) >> (32 - 2)); if (!((((long*)(y))[1]) >> (32 - 2))) return 0; lx=((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); if (lx != ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))) return 0; return absi_equal_lg(x, y, lx); } int absi_cmp(GEN x, GEN y) { long lx,ly; if (!((((long*)(x))[1]) >> (32 - 2))) return ((((long*)(y))[1]) >> (32 - 2))? -1: 0; if (!((((long*)(y))[1]) >> (32 - 2))) return 1; lx=((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); ly=((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (lx>ly) return 1; if (lx> (32 - 2))) return ((((long*)(y))[1]) >> (32 - 2))? -1: 0; if (!((((long*)(y))[1]) >> (32 - 2))) return 1; ex=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); ey=((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); if (ex>ey) return 1; if (ex (pari_ulong)y[i])? 1: -1; if (lx>=ly) { while (i>=1; if (x==1) return 1; if (x==y) return y; else if (x>y) goto xislarger; yislarger: if ((x^y)&2) y=(x>>2)+(y>>2)+1; else y=(y-x)>>2; while (!(y&1)) y>>=1; if (y==1) return 1; if (x==y) return y; else if (x>2)+(y>>2)+1; else x=(x-y)>>2; while (!(x&1)) x>>=1; if (x==1) return 1; if (x==y) return y; else if (x>y) goto xislarger; goto yislarger; } __inline__ static pari_ulong mygcduodd(pari_ulong a, pari_ulong b) { pari_ulong c; if (b&1) { if (a==1 || b==1) c = 1; else c = gcduodd(a, b); } else { if (a==1) c = 1; else c = gcduodd(b, a); } return c; } long cgcd(long a,long b) { long v; a=labs(a); if (!b) return a; b=labs(b); if (!a) return b; if (a>b) { a %= b; if (!a) return b; } else { b %= a; if (!b) return a; } v = vals(a|b); return (long)(mygcduodd((pari_ulong)(a>>v), (pari_ulong)(b>>v)) << v); } pari_ulong ugcd(pari_ulong a,pari_ulong b) { long v; if (!b) return a; if (!a) return b; if (a>b) { a %= b; if (!a) return b; } else { b %= a; if (!b) return a; } v = vals(a|b); return mygcduodd(a>>v, b>>v) << v; } static GEN igcduu(pari_ulong a, pari_ulong b) { long v; a %= b; if (!a) return utoipos(b); v = vals(a|b); return utoipos( mygcduodd(a>>v, b>>v) << v ); } long clcm(long a,long b) { long d = cgcd(a,b); if (!d) return 0; return d == 1? a*b: a*(b/d); } # 219 "../src/kernel/none/gcdll.c" pari_ulong xgcduu(pari_ulong d, pari_ulong d1, int f, pari_ulong* v, pari_ulong* v1, long *s) { pari_ulong xv,xv1, xs, q,res; register pari_ulong hiremainder; # 242 "../src/kernel/none/gcdll.c" xs = res = 0; xv = 0UL; xv1 = 1UL; while (d1 > 1UL) { d -= d1; if (d >= d1) { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = d; __d = d1; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); d = hiremainder; xv += q * xv1; } else xv += xv1; if (d <= 1UL) { xs=1; break; } d1 -= d; if (d1 >= d) { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = d1; __d = d; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); d1 = hiremainder; xv1 += q * xv; } else xv1 += xv; } if (!(f&1)) { if (xs && d==1) { xv1 += d1 * xv; xs = 0; res = 1UL; } else if (!xs && d1==1) { xv += d * xv1; xs = 1; res = 1UL; } } if (xs) { *s = -1; *v = xv1; *v1 = xv; return (res ? res : (d==1 ? 1UL : d1)); } else { *s = 1; *v = xv; *v1 = xv1; return (res ? res : (d1==1 ? 1UL : d)); } } pari_ulong xxgcduu(pari_ulong d, pari_ulong d1, int f, pari_ulong* u, pari_ulong* u1, pari_ulong* v, pari_ulong* v1, long *s) { pari_ulong xu,xu1, xv,xv1, xs, q,res; register pari_ulong hiremainder; xs = res = 0; xu = xv1 = 1UL; xu1 = xv = 0UL; while (d1 > 1UL) { d -= d1; if (d >= d1) { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = d; __d = d1; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); d = hiremainder; xv += q * xv1; xu += q * xu1; } else { xv += xv1; xu += xu1; } if (d <= 1UL) { xs=1; break; } d1 -= d; if (d1 >= d) { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = d1; __d = d; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); d1 = hiremainder; xv1 += q * xv; xu1 += q * xu; } else { xv1 += xv; xu1 += xu; } } if (!(f&1)) { if (xs && d==1) { xv1 += d1 * xv; xu1 += d1 * xu; xs = 0; res = 1UL; } else if (!xs && d1==1) { xv += d * xv1; xu += d * xu1; xs = 1; res = 1UL; } } if (xs) { *s = -1; *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; return (res ? res : (d==1 ? 1UL : d1)); } else { *s = 1; *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; return (res ? res : (d1==1 ? 1UL : d)); } } pari_ulong rgcduu(pari_ulong d, pari_ulong d1, pari_ulong vmax, pari_ulong* u, pari_ulong* u1, pari_ulong* v, pari_ulong* v1, long *s) { pari_ulong xu,xu1, xv,xv1, xs, q, res=0; int f = 0; register pari_ulong hiremainder; if (vmax == 0) vmax = (~0x0UL); xs = res = 0; xu = xv1 = 1UL; xu1 = xv = 0UL; while (d1 > 1UL) { d -= d1; if (d >= d1) { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = d; __d = d1; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); d = hiremainder; xv += q * xv1; xu += q * xu1; } else { xv += xv1; xu += xu1; } if (xv > vmax) { f=xs=1; break; } if (d <= 1UL) { xs=1; break; } d1 -= d; if (d1 >= d) { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = d1; __d = d; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); d1 = hiremainder; xv1 += q * xv; xu1 += q * xu; } else { xv1 += xv; xu1 += xu; } if (xv1 > vmax) { f=1; break; } } if (!(f&1)) { if (xs && d==1) { xv1 += d1 * xv; xu1 += d1 * xu; xs = 0; res = 1UL; } else if (!xs && d1==1) { xv += d * xv1; xu += d * xu1; xs = 1; res = 1UL; } } if (xs) { *s = -1; *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; return (res ? res : (d==1 ? 1UL : d1)); } else { *s = 1; *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; return (res ? res : (d1==1 ? 1UL : d)); } } # 433 "../src/kernel/none/gcdll.c" long cbezout(long a,long b,long *uu,long *vv) { long s,*t; pari_ulong d = labs(a), d1 = labs(b); pari_ulong r,u,u1,v,v1; if (!b) { *vv=0L; if (!a) { *uu=1L; return 0L; } *uu = a < 0 ? -1L : 1L; return (long)d; } else if (!a || (d == d1)) { *uu = 0L; *vv = b < 0 ? -1L : 1L; return (long)d1; } else if (d == 1) { *uu = a; *vv = 0L; return 1L; } else if (d < d1) { { long _x = a; a = b; b = _x; } r = d; d = d1; d1 = r; t = uu; uu = vv; vv = t; } r = xxgcduu(d, d1, 0, &u, &u1, &v, &v1, &s); if (s < 0) { *uu = a < 0 ? (long)u : -(long)u; *vv = b < 0 ? -(long)v : (long)v; } else { *uu = a < 0 ? -(long)u : (long)u; *vv = b < 0 ? (long)v : -(long)v; } return (long)r; } # 556 "../src/kernel/none/gcdll.c" int lgcdii(pari_ulong* d, pari_ulong* d1, pari_ulong* u, pari_ulong* u1, pari_ulong* v, pari_ulong* v1, pari_ulong vmax) { # 589 "../src/kernel/none/gcdll.c" pari_ulong dd,dd1,ddlo,dd1lo, sh,shc; pari_ulong xu,xu1, xv,xv1, q,res; pari_ulong tmp0,tmp1,tmp2,tmpd,tmpu,tmpv; pari_ulong dm1,dm2,d1m1,d1m2; long ld, ld1, lz; int skip = 0; register pari_ulong overflow; register pari_ulong hiremainder; if (vmax == 0) vmax = (~0x0UL); ld = ((long)(((pari_ulong*)(d))[1] & ((1UL<<(32 - 1 - 7))-1))); ld1 = ((long)(((pari_ulong*)(d1))[1] & ((1UL<<(32 - 1 - 7))-1))); lz = ld - ld1; if (lz > 1) return 0; d = ((d)+((long)(((pari_ulong*)((d)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1); d1 = ((d1)+((long)(((pari_ulong*)((d1)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1); dm1 = *((d)-1); d1m1 = *((d1)-1); dm2 = *((((d)-1))-1); d1m2 = *((((d1)-1))-1); dd1lo = 0; sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(*d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); if (sh) { shc = 32 - sh; if (lz) { dd1 = (*d1 >> shc); if (!((~((1UL<<(32>>1)) - 1)) & dd1)) return 0; if (ld1 > 3) dd1lo = (*d1 << sh) + (d1m1 >> shc); else dd1lo = (*d1 << sh); } else { dd1 = (*d1 << sh); if (!((~((1UL<<(32>>1)) - 1)) & dd1)) return 0; if (ld1 > 3) { dd1 += (d1m1 >> shc); if (ld1 > 4) dd1lo = (d1m1 << sh) + (d1m2 >> shc); else dd1lo = (d1m1 << sh); } } dd = (*d << sh) + (dm1 >> shc); if (ld > 4) ddlo = (dm1 << sh) + (dm2 >> shc); else ddlo = (dm1 << sh); } else { if (lz) return 0; dd1 = *d1; if (!((~((1UL<<(32>>1)) - 1)) & dd1)) return 0; if(ld1 > 3) dd1lo = d1m1; dd = *d; ddlo = dm1; } # 663 "../src/kernel/none/gcdll.c" dd -= dd1; if (dd < dd1) { xv1 = 1UL; if (!dd) { *u = 0; *v = *u1 = *v1 = 1UL; return -1; } } else { hiremainder = 0; xv1 = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = dd; __d = dd1; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); dd = hiremainder; if (dd < xv1) { ddlo = __extension__ ({ pari_ulong __arg1 = (ddlo), __arg2 = (__extension__ ({ const pari_ulong __x = (xv1), __y = (dd1lo); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); dd = __extension__ ({ pari_ulong __arg1 = (dd), __arg2 = (hiremainder), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); if (overflow) { xv1--; ddlo = __extension__ ({ pari_ulong __arg1 = (ddlo), __arg2 = (dd1lo), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); dd = __extension__ ({ pari_ulong __arg1 = (dd), __arg2 = (dd1), __value, __tmp = __arg1 + overflow; overflow = (__tmp < __arg1); __value = __tmp + __arg2; overflow |= (__value < __tmp); __value; }); } else if (!dd && ddlo < xv1) return 0; skip = 1; } } res = 1; if (xv1 > vmax) { *u = 0UL; *u1 = 1UL; *v = 1UL; *v1 = xv1; return res; } xu = 0UL; xv = xu1 = 1UL; # 753 "../src/kernel/none/gcdll.c" if (!skip) { for(;;) { tmpd = dd1 - dd; if (tmpd < dd) { tmpu = xu + xu1; tmpv = xv + xv1; } else { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = tmpd; __d = dd; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); tmpd = hiremainder; tmpu = xu + q*xu1; tmpv = xv + q*xv1; } tmp0 = __extension__ ({ pari_ulong __arg1 = (tmpv), __arg2 = (xv1), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); if ((tmpd < tmpu) || overflow || (dd - tmpd < tmp0)) break; else { res++; dd1 = tmpd; xu = tmpu; xv = tmpv; if (xv > vmax) { *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; return res; } } tmpd = dd - dd1; if (tmpd < dd1) { tmpu = xu1 + xu; tmpv = xv1 + xv; } else { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = tmpd; __d = dd1; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); tmpd = hiremainder; tmpu = xu1 + q*xu; tmpv = xv1 + q*xv; } tmp0 = __extension__ ({ pari_ulong __arg1 = (tmpu), __arg2 = (xu), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); if ((tmpd < tmpv) || overflow || (dd1 - tmpd < tmp0)) break; else { res++; dd = tmpd; xu1 = tmpu; xv1 = tmpv; if (xv1 > vmax) { *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; return res; } } } if (res&1) { tmp1 = __extension__ ({ const pari_ulong __x = (ddlo), __y = (xu); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); tmp0 = hiremainder; tmp1 = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (dd1lo), __y = (xv); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (tmp1); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); dd1 += __extension__ ({ pari_ulong __arg1 = (hiremainder), __arg2 = (tmp0), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); tmp2 = __extension__ ({ const pari_ulong __x = (ddlo), __y = (xu1); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); tmp0 = hiremainder; ddlo = __extension__ ({ pari_ulong __arg1 = (tmp2), __arg2 = (__extension__ ({ const pari_ulong __x = (dd1lo), __y = (xv1); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); dd += __extension__ ({ pari_ulong __arg1 = (tmp0), __arg2 = (hiremainder), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); dd1lo = tmp1; } else { tmp1 = __extension__ ({ const pari_ulong __x = (ddlo), __y = (xu1); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); tmp0 = hiremainder; tmp1 = __extension__ ({ pari_ulong __arg1 = (tmp1), __arg2 = (__extension__ ({ const pari_ulong __x = (dd1lo), __y = (xv1); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); dd += __extension__ ({ pari_ulong __arg1 = (tmp0), __arg2 = (hiremainder), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); tmp2 = __extension__ ({ const pari_ulong __x = (ddlo), __y = (xu); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); tmp0 = hiremainder; dd1lo = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (dd1lo), __y = (xv); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (tmp2); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); dd1 += __extension__ ({ pari_ulong __arg1 = (hiremainder), __arg2 = (tmp0), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); ddlo = tmp1; } } # 915 "../src/kernel/none/gcdll.c" if (res&1) { if (dd1 && (sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(dd1); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }))) { shc = 32 - sh; dd = (ddlo >> shc) + (dd << sh); if (!((~((1UL<<(32>>1)) - 1)) & dd)) { *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; return -res; } dd1 = (dd1lo >> shc) + (dd1 << sh); } else { *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; return res; } } else { if (dd) { sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(dd); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); shc = 32 - sh; tmpd = (ddlo >> shc) + (dd << sh); dd = (dd1lo >> shc) + (dd1 << sh); dd1 = tmpd; if ((~((1UL<<(32>>1)) - 1)) & dd) { tmp0 = xu; xu = xu1; xu1 = tmp0; tmp0 = xv; xv = xv1; xv1 = tmp0; } else { *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; return -res; } } else { *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; return res; } } # 976 "../src/kernel/none/gcdll.c" for(;;) { tmpd = dd1 - dd; if (tmpd < dd) { tmpu = xu + xu1; tmpv = __extension__ ({ pari_ulong __arg1 = (xv), __arg2 = (xv1), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); tmp1 = overflow; } else { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = tmpd; __d = dd; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); tmpd = hiremainder; tmpu = xu + q*xu1; tmpv = __extension__ ({ pari_ulong __arg1 = (xv), __arg2 = (__extension__ ({ const pari_ulong __x = (q), __y = (xv1); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); tmp1 = overflow | hiremainder; } tmp0 = __extension__ ({ pari_ulong __arg1 = (tmpv), __arg2 = (xv1), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); if ((tmpd < tmpu) || overflow || tmp1 || (dd - tmpd < tmp0)) { *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; break; } res++; dd1 = tmpd; xu = tmpu; xv = tmpv; if (xv > vmax) { *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; return res; } tmpd = dd - dd1; if (tmpd < dd1) { tmpu = xu1 + xu; tmpv = __extension__ ({ pari_ulong __arg1 = (xv1), __arg2 = (xv), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); tmp1 = overflow; } else { hiremainder = 0; q = 1 + __extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = tmpd; __d = dd1; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); tmpd = hiremainder; tmpu = xu1 + q*xu; tmpv = __extension__ ({ pari_ulong __arg1 = (xv1), __arg2 = (__extension__ ({ const pari_ulong __x = (q), __y = (xv); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); tmp1 = overflow | hiremainder; } tmp0 = __extension__ ({ pari_ulong __arg1 = (tmpu), __arg2 = (xu), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); if ((tmpd < tmpv) || overflow || tmp1 || (dd1 - tmpd < tmp0)) { *u = xu1; *u1 = xu; *v = xv1; *v1 = xv; break; } res++; dd = tmpd; xu1 = tmpu; xv1 = tmpv; if (xv1 > vmax) { *u = xu; *u1 = xu1; *v = xv; *v1 = xv1; return res; } } return res; } pari_ulong Fl_inv(pari_ulong x, pari_ulong p) { long s; pari_ulong xv, xv1, g = xgcduu(p, x, 1, &xv, &xv1, &s); if (g != 1UL) pari_err(invmoder, mkintmod(utoi(x), utoi(p))); xv = xv1 % p; if (s < 0) xv = p - xv; return xv; } # 2 "../src/kernel/none/ratlift.c" # 52 "../src/kernel/none/ratlift.c" int ratlift(GEN x, GEN m, GEN amax, GEN bmax, GEN *a, GEN *b) { pari_sp av = avma; if ((((long)((((pari_ulong*)(x))[0]) >> (32 - 7))) | ((long)((((pari_ulong*)(m))[0]) >> (32 - 7))) | ((long)((((pari_ulong*)(amax))[0]) >> (32 - 7))) | ((long)((((pari_ulong*)(bmax))[0]) >> (32 - 7)))) != t_INT) pari_err(arither1); if (((((long*)(bmax))[1]) >> (32 - 2)) <= 0) pari_err(talker, "ratlift: bmax must be > 0, found\n\tbmax=%Ps\n", bmax); if (((((long*)(amax))[1]) >> (32 - 2)) < 0) pari_err(talker, "ratilft: amax must be >= 0, found\n\tamax=%Ps\n", amax); if (cmpii(shifti(mulii(amax, bmax), 1), m) >= 0) pari_err(talker, "ratlift: must have 2*amax*bmax < m, found\n\tamax=%Ps\n\tbmax=%Ps\n\tm=%Ps\n", amax,bmax,m); if (((((long*)(x))[1]) >> (32 - 2)) < 0 || cmpii(x,m) >= 0) pari_err(talker, "ratlift: must have 0 <= x < m, found\n\tx=%Ps\n\tm=%Ps\n", x,m); avma = av; return Fp_ratlift(x, m, amax, bmax, a, b); } static pari_ulong get_vmax(GEN r, long lb, long lbb) { long lr = lb - ((long)(((pari_ulong*)(r))[1] & ((1UL<<(32 - 1 - 7))-1))); pari_ulong vmax; if (lr > 1) vmax = (~0x0UL); else { long lbr = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(*((r)+((long)(((pari_ulong*)((r)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1)); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); lr = lr*32 - lbb + lbr; if ((pari_ulong)lr > 32) vmax = (~0x0UL); else if (lr == 0) vmax = 1UL; else vmax = 1UL << (lr-1); } return vmax; } int Fp_ratlift(GEN x, GEN m, GEN amax, GEN bmax, GEN *a, GEN *b) { GEN d, d1, v, v1, q, r; pari_sp av = avma, av1, lim; long lb, lbb, s, s0; pari_ulong vmax; pari_ulong xu, xu1, xv, xv1; int lhmres; if (!((((long*)(x))[1]) >> (32 - 2))) { *a = gen_0; *b = gen_1; return 1; } if (!((((long*)(amax))[1]) >> (32 - 2))) return 0; if (cmpii(x,amax) <= 0) { *a = icopy(x); *b = gen_1; return 1; } (void)new_chunk(((long)(((pari_ulong*)(bmax))[1] & ((1UL<<(32 - 1 - 7))-1))) + ((long)(((pari_ulong*)(amax))[1] & ((1UL<<(32 - 1 - 7))-1)))); d = m; d1 = x; v = gen_0; v1 = gen_1; lb = ((long)(((pari_ulong*)(bmax))[1] & ((1UL<<(32 - 1 - 7))-1))); lbb = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(*((bmax)+((long)(((pari_ulong*)((bmax)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1)); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); s = 1; av1 = avma; lim = (bot + (((av)-bot)>>(1))); # 161 "../src/kernel/none/ratlift.c" while (((long)(((pari_ulong*)(d))[1] & ((1UL<<(32 - 1 - 7))-1))) > 3 && ((((long*)(d1))[1]) >> (32 - 2))) { r = addii(v,v1); if (cmpii(r,bmax) > 0) { avma = av; return 0; } vmax = get_vmax(r, lb, lbb); lhmres = lgcdii((pari_ulong *)d, (pari_ulong *)d1, &xu, &xu1, &xv, &xv1, vmax); if (lhmres) { if (lhmres == 1 || lhmres == -1) { s = -s; if (xv1 == 1) { v = v1; v1 = r; r = subii(d,d1); d = d1; d1 = r; } else { r = subii(d, mului(xv1,d1)); d = d1; d1 = r; r = addii(v, mului(xv1,v1)); v = v1; v1 = r; } } else { r = subii(muliu(d,xu), muliu(d1,xv)); d1 = subii(muliu(d,xu1), muliu(d1,xv1)); d = r; r = addii(muliu(v,xu), muliu(v1,xv)); v1 = addii(muliu(v,xu1), muliu(v1,xv1)); v = r; if (lhmres&1) { togglesign(d); s = -s; } else togglesign(d1); } if (cmpii(v1,bmax) > 0) { avma = av; if (cmpii(d,amax) > 0) return 0; *a = icopy(d); (((pari_ulong*)(*a))[1]= (((pari_ulong*)(*a))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(-s)) << (32 - 2)))); *b = icopy(v); return 1; } if (cmpii(d1,amax) <= 0) { avma = av; if (((((long*)(d1))[1]) >> (32 - 2))) { *a = icopy(d1); (((pari_ulong*)(*a))[1]= (((pari_ulong*)(*a))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); } else *a = gen_0; *b = icopy(v1); return 1; } } if (lhmres <= 0 && ((((long*)(d1))[1]) >> (32 - 2))) { q = dvmdii(d,d1,&r); d = d1; d1 = r; r = addii(v, mulii(q,v1)); v = v1; v1 = r; s = -s; if (cmpii(v1,bmax) > 0) { avma = av; return 0; } if (cmpii(d1,amax) <= 0) { avma = av; if (((((long*)(d1))[1]) >> (32 - 2))) { *a = icopy(d1); (((pari_ulong*)(*a))[1]= (((pari_ulong*)(*a))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); } else *a = gen_0; *b = icopy(v1); return 1; } } if ((avma < (pari_sp)(lim))) { if(DEBUGMEM>1) pari_warn(warnmem,"ratlift"); gerepileall(av1, 4, &d, &d1, &v, &v1); } } while (((((long*)(d1))[1]) >> (32 - 2))) { r = addii(v,v1); if (cmpii(r,bmax) > 0) { avma = av; return 0; } vmax = get_vmax(r, lb, lbb); (void)rgcduu((pari_ulong)*((d)+((long)(((pari_ulong*)((d)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1), (pari_ulong)*((d1)+((long)(((pari_ulong*)((d1)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1), vmax, &xu, &xu1, &xv, &xv1, &s0); if (xv1 == 1) { v = v1; v1 = r; r = subii(d,d1); d = d1; d1 = r; s = -s; } else if (xu == 0) { r = subii(d, mului(xv1,d1)); d = d1; d1 = r; r = addii(v, mului(xv1,v1)); v = v1; v1 = r; s = -s; } else { r = subii(muliu(d,xu), muliu(d1,xv)); d1 = subii(muliu(d,xu1), muliu(d1,xv1)); d = r; r = addii(muliu(v,xu), muliu(v1,xv)); v1 = addii(muliu(v,xu1), muliu(v1,xv1)); v = r; if (s0 < 0) { togglesign(d); s = -s; } else togglesign(d1); } if (cmpii(v1,bmax) > 0) { avma = av; if (cmpii(d,amax) > 0) return 0; *a = icopy(d); (((pari_ulong*)(*a))[1]= (((pari_ulong*)(*a))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(-s)) << (32 - 2)))); *b = icopy(v); return 1; } if (cmpii(d1,amax) <= 0) { avma = av; if (((((long*)(d1))[1]) >> (32 - 2))) { *a = icopy(d1); (((pari_ulong*)(*a))[1]= (((pari_ulong*)(*a))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); } else *a = gen_0; *b = icopy(v1); return 1; } } pari_err(bugparier, "ratlift failed to catch d1 == 0\n"); return 0; } # 2 "../src/kernel/none/invmod.c" # 29 "../src/kernel/none/invmod.c" __inline__ static int invmod_pari(GEN a, GEN b, GEN *res) { GEN v,v1,d,d1,q,r; pari_sp av, av1, lim; long s; pari_ulong g; pari_ulong xu,xu1,xv,xv1; int lhmres; if (((long)((((pari_ulong*)(a))[0]) >> (32 - 7))) != t_INT || ((long)((((pari_ulong*)(b))[0]) >> (32 - 7))) != t_INT) pari_err(arither1); if (!((((long*)(b))[1]) >> (32 - 2))) { *res=absi(a); return 0; } av = avma; if (((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1))) == 3) { pari_ulong d1 = umodiu(a, (pari_ulong)(b[2])); if (d1 == 0) { if (b[2] == 1L) { *res = gen_0; return 1; } else { *res = absi(b); return 0; } } g = xgcduu((pari_ulong)(b[2]), d1, 1, &xv, &xv1, &s); avma = av; if (g != 1UL) { *res = utoipos(g); return 0; } xv = xv1 % (pari_ulong)(b[2]); if (s < 0) xv = ((pari_ulong)(b[2])) - xv; *res = utoipos(xv); return 1; } (void)new_chunk(((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))); d = absi(b); d1 = modii(a,d); v=gen_0; v1=gen_1; av1 = avma; lim = (bot + (((av)-bot)>>(1))); while (((long)(((pari_ulong*)(d))[1] & ((1UL<<(32 - 1 - 7))-1))) > 3 && ((((long*)(d1))[1]) >> (32 - 2))) { lhmres = lgcdii((pari_ulong*)d, (pari_ulong*)d1, &xu, &xu1, &xv, &xv1, (~0x0UL)); if (lhmres != 0) { if ((lhmres == 1) || (lhmres == -1)) { if (xv1 == 1) { r = subii(d,d1); d=d1; d1=r; a = subii(v,v1); v=v1; v1=a; } else { r = subii(d, mului(xv1,d1)); d=d1; d1=r; a = subii(v, mului(xv1,v1)); v=v1; v1=a; } } else { r = subii(muliu(d,xu), muliu(d1,xv)); a = subii(muliu(v,xu), muliu(v1,xv)); d1 = subii(muliu(d,xu1), muliu(d1,xv1)); d = r; v1 = subii(muliu(v,xu1), muliu(v1,xv1)); v = a; if (lhmres&1) { togglesign(d); togglesign(v); } else { togglesign(d1); togglesign(v1); } } } if (lhmres <= 0 && ((((long*)(d1))[1]) >> (32 - 2))) { q = dvmdii(d,d1,&r); a = subii(v,mulii(q,v1)); v=v1; v1=a; d=d1; d1=r; } if ((avma < (pari_sp)(lim))) { if(DEBUGMEM>1) pari_warn(warnmem,"invmod"); gerepileall(av1, 4, &d,&d1,&v,&v1); } } if (((((long*)(d1))[1]) >> (32 - 2))) { g = xxgcduu((pari_ulong)d[2], (pari_ulong)d1[2], 1, &xu, &xu1, &xv, &xv1, &s); if (g != 1UL) { avma = av; *res = utoipos(g); return 0; } v = subii(muliu(v,xu1),muliu(v1,xv1)); if (s > 0) (((pari_ulong*)(v))[1]= (((pari_ulong*)(v))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(-((((long*)(v))[1]) >> (32 - 2)))) << (32 - 2)))); avma = av; *res = modii(v,b); return 1; } avma = av; if (!equalii(d,gen_1)) { *res = icopy(d); return 0; } *res = modii(v,b); return 1; } # 2 "../src/kernel/gmp/gcd.c" # 18 "../src/kernel/gmp/gcd.c" static pari_ulong resiu(GEN y, pari_ulong x) { return __gmpn_mod_1(((mp_limb_t *)((y)+2)), (((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), x); } GEN gcdii(GEN a, GEN b) { long v, w; pari_sp av; GEN t; switch (absi_cmp(a,b)) { case 0: return absi(a); case -1: {GEN _z=a; a=b; b=_z;}; } if (!((((long*)(b))[1]) >> (32 - 2))) return absi(a); if (((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))==3) return igcduu((pari_ulong)a[2], (pari_ulong)b[2]); if (((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))==3) { pari_ulong u = resiu(a,(pari_ulong)b[2]); if (!u) return absi(b); return igcduu((pari_ulong)b[2], u); } av = avma; (void)new_chunk(((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); t = remii(a,b); if (!((((long*)(t))[1]) >> (32 - 2))) { avma=av; return absi(b); } a = b; b = t; v = vali(a); a = shifti(a,-v); setabssign(a); w = vali(b); b = shifti(b,-w); setabssign(b); if (w < v) v = w; switch(absi_cmp(a,b)) { case 0: avma=av; a=shifti(a,v); return a; case -1: {GEN _z=a; a=b; b=_z;}; } if (is_pm1(b)) { avma=av; return int2n(v); } { GEN res= cgeti(((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); GEN ca = icopy_ef(a,((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); GEN cb = icopy_ef(b,((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); long l = __gmpn_gcd(((mp_limb_t *)((res)+2)), ((mp_limb_t *)((ca)+2)), (((long)(((pari_ulong*)(ca))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), ((mp_limb_t *)((cb)+2)), (((long)(((pari_ulong*)(cb))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); res[1] = ((pari_ulong)(((long)(1)) << (32 - 2)))|(l+2); avma=av; return shifti(res,v); } } # 2 "../src/kernel/gmp/gcdext.c" # 23 "../src/kernel/gmp/gcdext.c" int invmod(GEN a, GEN b, GEN *res) { if (((long)((((pari_ulong*)(a))[0]) >> (32 - 7))) != t_INT || ((long)((((pari_ulong*)(b))[0]) >> (32 - 7))) != t_INT) pari_err(arither1); if (!((((long*)(b))[1]) >> (32 - 2))) { *res=absi(a); return 0; } if ((((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))-2) < INVMOD_GMP_LIMIT) return invmod_pari(a,b,res); { pari_sp av = avma; GEN ca, cb, u, d; long lu, l, su, sa = ((((long*)(a))[1]) >> (32 - 2)), lb,lna; GEN na; if (!sa) { avma = av; *res = absi(b); return 0; } if (((((long*)(b))[1]) >> (32 - 2)) < 0) b = negi(b); if (absi_cmp(a, b) < 0) na = sa > 0? addii(a, b): subii(a, b); else na = a; lb = ((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1))); lna = ((long)(((pari_ulong*)(na))[1] & ((1UL<<(32 - 1 - 7))-1))); ca = icopy_ef(na,lna+1); cb = icopy_ef( b,lb+1); u = cgeti(lna+1); d = cgeti(lna+1); l = __gmpn_gcdext(((mp_limb_t *)((d)+2)), ((mp_limb_t *)((u)+2)), &lu, ((mp_limb_t *)((ca)+2)), (((long)(((pari_ulong*)(ca))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), ((mp_limb_t *)((cb)+2)), (((long)(((pari_ulong*)(cb))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); d[1] = ((pari_ulong)(((long)(1)) << (32 - 2)))|(l+2); if (!is_pm1(d)) {avma=av; *res=icopy(d); return 0;} su = lu?((sa ^ lu) < 0)? -1: 1: 0; u[1] = ((pari_ulong)(((long)(su)) << (32 - 2))) | (labs(lu)+2); if (su < 0) u = addii(u, b); avma=av; *res=icopy(u); return 1; } } # 75 "../src/kernel/gmp/gcdext.c" GEN bezout(GEN a, GEN b, GEN *pu, GEN *pv) { long s, sa, sb; pari_ulong g; pari_ulong xu,xu1,xv,xv1; if (((long)((((pari_ulong*)(a))[0]) >> (32 - 7))) != t_INT || ((long)((((pari_ulong*)(b))[0]) >> (32 - 7))) != t_INT) pari_err(arither1); s = absi_cmp(a,b); if (s < 0) { {GEN _z=a; a=b; b=_z;}; {GEN *_z=pu; pu=pv; pv=_z;}; } sa = ((((long*)(a))[1]) >> (32 - 2)); sb = ((((long*)(b))[1]) >> (32 - 2)); if (!sb) { if (pv) *pv = gen_0; switch(sa) { case 0: if (pu) *pu = gen_0; return gen_0; case 1: if (pu) *pu = gen_1; return icopy(a); case -1: if (pu) *pu = gen_m1; return negi(a); } } if (s == 0) { if (pu) *pu = gen_0; if (sb > 0) { if (pv) *pv = gen_1; return icopy(b); } else { if (pv) *pv = gen_m1; return negi(b); } } if (((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1))) == 3) { g = xxgcduu((pari_ulong)a[2], (pari_ulong)b[2], 0, &xu, &xu1, &xv, &xv1, &s); sa = s > 0 ? sa : -sa; sb = s > 0 ? -sb : sb; if (pu) { if (xu == 0) *pu = gen_0; else if (xu == 1) *pu = sa < 0 ? gen_m1 : gen_1; else if (xu == 2) *pu = sa < 0 ? gen_m2 : gen_2; else { *pu = cgeti(3); (*pu)[1] = ((pari_ulong)(((long)(sa)) << (32 - 2)))|(3); (*pu)[2] = xu; } } if (pv) { if (xv == 1) *pv = sb < 0 ? gen_m1 : gen_1; else if (xv == 2) *pv = sb < 0 ? gen_m2 : gen_2; else { *pv = cgeti(3); (*pv)[1] = ((pari_ulong)(((long)(sb)) << (32 - 2)))|(3); (*pv)[2] = xv; } } if (g == 1) return gen_1; else if (g == 2) return gen_2; else return utoipos(g); } else { pari_sp av = avma; GEN ca = icopy_ef(a,((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); GEN cb = icopy_ef(b,((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); GEN u = cgeti(((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))+1), v = ((void *)0); GEN d = cgeti(((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))+1); long su,l,lu; l = __gmpn_gcdext(((mp_limb_t *)((d)+2)), ((mp_limb_t *)((u)+2)), &lu, ((mp_limb_t *)((ca)+2)), (((long)(((pari_ulong*)(ca))[1] & ((1UL<<(32 - 1 - 7))-1)))-2), ((mp_limb_t *)((cb)+2)), (((long)(((pari_ulong*)(cb))[1] & ((1UL<<(32 - 1 - 7))-1)))-2)); if (lu<=0) { if (lu==0) su=0; else {su=-1;lu=-lu;} } else su=1; if (sa<0) su=-su; d[1] = ((pari_ulong)(((long)(1)) << (32 - 2)))|(l+2); u[1] = ((pari_ulong)(((long)(su)) << (32 - 2)))|(lu+2); if (pv) v=diviiexact(subii(d,mulii(u,a)),b); avma = av; if (pu) *pu=icopy(u); if (pv) *pv=icopy(v); return icopy(d); } } # 2 "../src/kernel/none/mp_indep.c" # 18 "../src/kernel/none/mp_indep.c" pari_ulong invmod2BIL(pari_ulong b) { static int tab[] = { 0, 0, 0, 8, 0, 8, 0, 0 }; pari_ulong x = b + tab[b & 7]; x = x*(2-b*x); x = x*(2-b*x); return x*(2-b*x); } void affrr(GEN x, GEN y) { long lx,ly,i; y[1] = x[1]; if (!((((long*)(x))[1]) >> (32 - 2))) return; lx=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); ly=((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (lx <= ly) { for (i=2; i> (32 - 2))) return gen_0; ex = ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) + n; if (ex < 0) return gen_0; lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); return trunc2nr_lg(x, lx, ex - bit_accuracy(lx) + 1); } GEN mantissa_real(GEN x, long *e) { long lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); *e = bit_accuracy(lx)-1-((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); return trunc2nr_lg(x, lx, 0); } GEN mului(pari_ulong x, GEN y) { long s = ((((long*)(y))[1]) >> (32 - 2)); GEN z; if (!s || !x) return gen_0; z = muluispec(x, y+2, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); return z; } GEN mulsi(long x, GEN y) { long s = ((((long*)(y))[1]) >> (32 - 2)); GEN z; if (!s || !x) return gen_0; if (x<0) { s = -s; x = -x; } z = muluispec((pari_ulong)x, y+2, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); return z; } GEN mulss(long x, long y) { long p1; register pari_ulong hiremainder; if (!x || !y) return gen_0; if (x<0) { x = -x; if (y<0) { y = -y; p1 = __extension__ ({ const pari_ulong __x = (x), __y = (y); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoi(hiremainder, p1); } p1 = __extension__ ({ const pari_ulong __x = (x), __y = (y); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoineg(hiremainder, p1); } else { if (y<0) { y = -y; p1 = __extension__ ({ const pari_ulong __x = (x), __y = (y); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoineg(hiremainder, p1); } p1 = __extension__ ({ const pari_ulong __x = (x), __y = (y); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoi(hiremainder, p1); } } GEN sqrs(long x) { long p1; register pari_ulong hiremainder; if (!x) return gen_0; if (x<0) x = -x; p1 = __extension__ ({ const pari_ulong __x = (x), __y = (x); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoi(hiremainder, p1); } GEN muluu(pari_ulong x, pari_ulong y) { long p1; register pari_ulong hiremainder; if (!x || !y) return gen_0; p1 = __extension__ ({ const pari_ulong __x = (x), __y = (y); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoi(hiremainder, p1); } GEN sqru(pari_ulong x) { long p1; register pari_ulong hiremainder; if (!x) return gen_0; p1 = __extension__ ({ const pari_ulong __x = (x), __y = (x); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); return uutoi(hiremainder, p1); } static GEN mulur_2(pari_ulong x, GEN y, long s) { long m, sh, i, lx = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))), e = ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); GEN z = cgetr(lx); pari_ulong garde; register pari_ulong hiremainder; y--; garde = __extension__ ({ const pari_ulong __x = (x), __y = (y[lx]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); for (i=lx-1; i>=3; i--) z[i]=__extension__ ({ const pari_ulong __x = (x), __y = (y[i]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); z[2]=hiremainder; sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(hiremainder); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); m = 32 -sh; if (sh) shift_left(z,z, 2,lx-1, garde,sh); z[1] = ((pari_ulong)(((long)(s)) << (32 - 2))) | evalexpo(m+e); return z; } __inline__ static GEN mul0r(GEN x) { long l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))), e = ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); e = (l > 2)? -bit_accuracy(l) + e: (e < 0? (e<<1): 0); return real_0_bit(e); } __inline__ static GEN div0r(GEN x) { long l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))), e = ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); return real_0_bit(-bit_accuracy(l) - e); } GEN mulsr(long x, GEN y) { long s; if (!x) return mul0r(y); s = ((((long*)(y))[1]) >> (32 - 2)); if (!s) { if (x < 0) x = -x; return real_0_bit( ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) + expu(x) ); } if (x==1) return rcopy(y); if (x==-1) return negr(y); if (x < 0) return mulur_2((pari_ulong)-x, y, -s); else return mulur_2((pari_ulong)x, y, s); } GEN mulur(pari_ulong x, GEN y) { long s; if (!x) return mul0r(y); s = ((((long*)(y))[1]) >> (32 - 2)); if (!s) return real_0_bit( ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) + expu(x) ); if (x==1) return rcopy(y); return mulur_2(x, y, s); } # 228 "../src/kernel/none/mp_indep.c" __inline__ static void mulrrz_i(GEN z, GEN x, GEN y, long lz, long flag, long sz) { long ez = ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) + ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); long i, j, lzz, p1; pari_ulong garde; GEN y1; register pari_ulong hiremainder; register pari_ulong overflow; if (lz > MULRR_MULII_LIMIT) { pari_sp av = avma; GEN hi = muliispec_mirror(y+2, x+2, lz+flag-2, lz-2); garde = hi[lz]; if (hi[2] < 0) { ez++; for (i=2; i1 && z[i]==0); if (i == 1) { z[2] = (long)(1UL << (32 -1)); ez++; } } z[1] = ((pari_ulong)(((long)(sz)) << (32 - 2)))|evalexpo(ez); avma = av; return; } if (lz == 3) { if (flag) { (void)__extension__ ({ const pari_ulong __x = (x[2]), __y = (y[3]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); garde = __extension__ ({ const pari_ulong __x = (x[2]), __y = (y[2]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); } else garde = __extension__ ({ const pari_ulong __x = (x[2]), __y = (y[2]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); if (hiremainder & (1UL << (32 -1))) { ez++; if (garde & (1UL << (32 -1))) hiremainder++; } else { hiremainder = (hiremainder<<1) | (garde>>(32 -1)); if (garde & ((1UL << (32 -1))-1)) { hiremainder++; if (!hiremainder) { hiremainder = (1UL << (32 -1)); ez++; } } } z[1] = ((pari_ulong)(((long)(sz)) << (32 - 2))) | evalexpo(ez); z[2] = hiremainder; return; } if (flag) { (void)__extension__ ({ const pari_ulong __x = (x[2]), __y = (y[lz]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); garde = hiremainder; } else garde = 0; lzz=lz-1; p1=x[lzz]; if (p1) { (void)__extension__ ({ const pari_ulong __x = (p1), __y = (y[3]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); garde = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (p1), __y = (y[2]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (garde), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); z[lzz] = overflow+hiremainder; } else z[lzz]=0; for (j=lz-2, y1=y-j; j>=3; j--) { p1 = x[j]; y1++; if (p1) { (void)__extension__ ({ const pari_ulong __x = (p1), __y = (y1[lz+1]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; }); garde = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (p1), __y = (y1[lz]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (garde), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); for (i=lzz; i>j; i--) { hiremainder += overflow; z[i] = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (p1), __y = (y1[i]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (z[i]), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); } z[j] = hiremainder+overflow; } else z[j]=0; } p1 = x[2]; y1++; garde = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (p1), __y = (y1[lz]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (garde), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); for (i=lzz; i>2; i--) { hiremainder += overflow; z[i] = __extension__ ({ pari_ulong __arg1 = (__extension__ ({ const pari_ulong __x = (p1), __y = (y1[i]); const pari_ulong __xlo = ((__x) & ((1UL<<(32>>1)) - 1)), __xhi = ((__x) >> (32>>1)); const pari_ulong __ylo = ((__y) & ((1UL<<(32>>1)) - 1)), __yhi = ((__y) >> (32>>1)); pari_ulong __xylo,__xymid,__xyhi,__xymidhi,__xymidlo; pari_ulong __xhl,__yhl; __xylo = __xlo*__ylo; __xyhi = __xhi*__yhi; __xhl = __xhi+__xlo; __yhl = __yhi+__ylo; __xymid = __xhl*__yhl - (__xyhi+__xylo); __xylo += hiremainder; __xyhi += (__xylo < hiremainder); __xymidhi = ((__xymid) >> (32>>1)); __xymidlo = __xymid << (32>>1); __xylo += __xymidlo; hiremainder = __xyhi + __xymidhi + (__xylo < __xymidlo) + ((((__xhl + __yhl) >> 1) - __xymidhi) & (~((1UL<<(32>>1)) - 1))); __xylo; })), __arg2 = (z[i]), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); } z[2] = hiremainder+overflow; if (z[2] < 0) ez++; else { shift_left(z,z,2,lzz, garde, 1); garde <<= 1; } if (garde & (1UL << (32 -1))) { i = lz; do z[--i]++; while (i>2 && z[i]==0); if (z[i] == 0) { z[2] = (long)(1UL << (32 -1)); ez++; } } z[1] = ((pari_ulong)(((long)(sz)) << (32 - 2))) | evalexpo(ez); } GEN mulrr(GEN x, GEN y) { long flag, ly, lz, sx = ((((long*)(x))[1]) >> (32 - 2)), sy = ((((long*)(y))[1]) >> (32 - 2)); GEN z; if (!sx || !sy) return real_0_bit(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) + ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))); if (sy < 0) sx = -sx; lz = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (lz > ly) { lz = ly; {GEN _z=x; x=y; y=_z;}; flag = 1; } else flag = (lz != ly); z = cgetr(lz); mulrrz_i(z, x,y, lz,flag, sx); return z; } GEN sqrr(GEN x) { long lz, sx = ((((long*)(x))[1]) >> (32 - 2)); GEN z; if (!sx) return real_0_bit(2*((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))); lz = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); z = cgetr(lz); mulrrz_i(z, x,x, lz,0, 1); return z; } GEN mulir(GEN x, GEN y) { long sx = ((((long*)(x))[1]) >> (32 - 2)), sy, lz; GEN z; if (!sx) return mul0r(y); if (((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))) == 3) { z = mulur((pari_ulong)x[2], y); if (sx < 0) togglesign(z); return z; } sy = ((((long*)(y))[1]) >> (32 - 2)); if (!sy) return real_0_bit(expi(x) + ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))); if (sy < 0) sx = -sx; lz = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); z = cgetr(lz); mulrrz_i(z, itor(x,lz),y, lz,0, sx); avma = (pari_sp)z; return z; } long vals(pari_ulong z) { static char tab[64]={-1,0,1,12,2,6,-1,13,3,-1,7,-1,-1,-1,-1,14,10,4,-1,-1,8,-1,-1,25,-1,-1,-1,-1,-1,21,27,15,31,11,5,-1,-1,-1,-1,-1,9,-1,-1,24,-1,-1,20,26,30,-1,-1,-1,-1,23,-1,19,29,-1,22,18,28,17,16,-1}; if (!z) return -1; z |= ~z + 1; z += z << 4; z += z << 6; z ^= z << 16; return tab[z>>26]; } GEN divsi(long x, GEN y) { long p1, s = ((((long*)(y))[1]) >> (32 - 2)); register pari_ulong hiremainder; if (!s) pari_err(gdiver); if (!x || ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))>3 || ((long)y[2])<0) return gen_0; hiremainder=0; p1=__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = labs(x); __d = y[2]; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); if (x<0) { hiremainder = -((long)hiremainder); p1 = -p1; } if (s<0) p1 = -p1; return stoi(p1); } GEN divir(GEN x, GEN y) { GEN z; long ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))), lx = ((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); pari_sp av; if (ly == 2) pari_err(gdiver); if (lx == 2) return div0r(y); if (lx == 3) { z = divur(x[2], y); if (((((long*)(x))[1]) >> (32 - 2)) < 0) togglesign(z); return z; } z = cgetr(ly); av = avma; affrr(divrr(itor(x, ly+1), y), z); avma = av; return z; } GEN divur(pari_ulong x, GEN y) { pari_sp av; long ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN z; if (ly == 2) pari_err(gdiver); if (!x) return div0r(y); if (ly > INVNEWTON_LIMIT) { av = avma; z = invr(y); if (x == 1) return z; return gerepileuptoleaf(av, mulur(x, z)); } z = cgetr(ly); av = avma; affrr(divrr(utor(x,ly+1), y), z); avma = av; return z; } GEN divsr(long x, GEN y) { pari_sp av; long ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN z; if (ly == 2) pari_err(gdiver); if (!x) return div0r(y); if (ly > INVNEWTON_LIMIT) { av = avma; z = invr(y); if (x == 1) return z; if (x ==-1) { togglesign(z); return z; } return gerepileuptoleaf(av, mulsr(x, z)); } z = cgetr(ly); av = avma; affrr(divrr(stor(x,ly+1), y), z); avma = av; return z; } static GEN invr_basecase(GEN y) { long ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN z = cgetr(ly); pari_sp av = avma; affrr(divrr(real_1(ly+1), y), z); avma = av; return z; } GEN invr(GEN b) { const long s = 6; long i, p, l = ((long)(((pari_ulong*)(b))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN x, a; pari_ulong mask; if (l <= maxss(INVNEWTON_LIMIT, (1L<>= 1; } x = cgetr(l); a = rcopy(b); a[1] = ((1UL<<((32 - 2)-1)) + (0)) | ((pari_ulong)(((long)(1)) << (32 - 2))); affrr(invr_basecase(rtor(a, p+2)), x); while (mask > 1) { p <<= 1; if (mask & 1) p--; mask >>= 1; (((pari_ulong*)(a))[0]= (((pari_ulong*)(a))[0]&(~((1UL<<(32 - 1 - 7))-1))) | evallg(p + 2)); (((pari_ulong*)(x))[0]= (((pari_ulong*)(x))[0]&(~((1UL<<(32 - 1 - 7))-1))) | evallg(p + 2)); affrr(addrr(x, mulrr(x, subsr(1, mulrr(a,x)))), x); avma = (pari_sp)a; } x[1] = (b[1] & (~((1UL<<(32 - 2)) - 1))) | evalexpo(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))-((long) ((((pari_ulong*)(b))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))); avma = (pari_sp)x; return x; } GEN modii(GEN x, GEN y) { switch(((((long*)(x))[1]) >> (32 - 2))) { case 0: return gen_0; case 1: return remii(x,y); default: { pari_sp av = avma; (void)new_chunk(((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))); x = remii(x,y); avma=av; if (x==gen_0) return x; return subiispec(y+2,x+2,((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2,((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); } } } void modiiz(GEN x, GEN y, GEN z) { const pari_sp av = avma; affii(modii(x,y),z); avma=av; } GEN divrs(GEN x, long y) { long i, lx, garde, sh, s = ((((long*)(x))[1]) >> (32 - 2)); GEN z; register pari_ulong hiremainder; if (!y) pari_err(gdiver); if (y<0) { s = -s; y = -y; } if (!s) return real_0_bit(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - expu(y)); if (y==1) { z = rcopy(x); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); return z; } if (y==2) { z = shiftr(x, -1); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(s)) << (32 - 2)))); return z; } z=cgetr(lx=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))); hiremainder=0; for (i=2; i>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); garde=__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = 0; __d = y; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); sh=__extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(z[2]); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); if (sh) shift_left(z,z, 2,lx-1, garde,sh); z[1] = ((pari_ulong)(((long)(s)) << (32 - 2))) | evalexpo(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))-sh); if ((garde << sh) & (1UL << (32 -1))) roundr_up_ip(z, lx); return z; } GEN divru(GEN x, pari_ulong y) { long i, lx, garde, sh, s = ((((long*)(x))[1]) >> (32 - 2)); GEN z; register pari_ulong hiremainder; if (!y) pari_err(gdiver); if (!s) return real_0_bit(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - expu(y)); if (y==1) return rcopy(x); if (y==2) return shiftr(x, -1); z=cgetr(lx=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1)))); hiremainder=0; for (i=2; i>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); garde=__extension__ ({ pari_ulong __d1, __d0, __q1, __q0, __r1, __r0, __m, __n1, __n0; pari_ulong __k, __d; __n1 = hiremainder; __n0 = 0; __d = y; if (__n1 == 0) { __q1 = __n0 / __d; hiremainder = __n0 - __q1*__d; } else if (__d < ((1UL<<(32>>1)) - 1)) { __n1 = (((__n1) << (32>>1)) | (((__n0) >> (32>>1)))); __q1 = __n1 / __d; __r1 = __n1 - __q1*__d; __n1 = (((__r1) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); __q0 = __n1 / __d; hiremainder = __n1 - __q0*__d; __q1 = (((__q1) << (32>>1)) | (__q0)); } else { if (__d & (1UL << (32 -1))) { __k = 0; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } else { __k = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(__d); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); __n1 = (__n1 << __k) | (__n0 >> (32 - __k)); __n0 <<= __k; __d = __d << __k; __d1 = ((__d) >> (32>>1)); __d0 = ((__d) & ((1UL<<(32>>1)) - 1)); } __q1 = __n1 / __d1; __r1 = __n1 - __q1*__d1; __m = __q1 * __d0; __r1 = (((__r1) << (32>>1)) | (((__n0) >> (32>>1)))); if (__r1 < __m) { __q1--, __r1 += __d; if (__r1 >= __d) if (__r1 < __m) __q1--, __r1 += __d; } __r1 -= __m; __q0 = __r1 / __d1; __r0 = __r1 - __q0*__d1; __m = __q0 * __d0; __r0 = (((__r0) << (32>>1)) | (((__n0) & ((1UL<<(32>>1)) - 1)))); if (__r0 < __m) { __q0--, __r0 += __d; if (__r0 >= __d) if (__r0 < __m) __q0--, __r0 += __d; } hiremainder = (__r0 - __m) >> __k; __q1 = (((__q1) << (32>>1)) | (__q0)); } __q1; }); sh=__extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(z[2]); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); if (sh) shift_left(z,z, 2,lx-1, garde,sh); z[1] = ((pari_ulong)(((long)(s)) << (32 - 2))) | evalexpo(((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))-sh); if ((garde << sh) & (1UL << (32 -1))) roundr_up_ip(z, lx); return z; } GEN truedvmdii(GEN x, GEN y, GEN *z) { pari_sp av; GEN r, q, *gptr[2]; if (!is_bigint(y)) return truedvmdis(x, itos(y), z); av = avma; q = dvmdii(x,y,&r); switch(((((long*)(r))[1]) >> (32 - 2))) { case 0: if (z == ((GEN*)0x1L)) { avma = av; return gen_0; } if (z) *z = gen_0; return q; case 1: if (z == ((GEN*)0x1L)) return gerepileuptoint(av,r); if (z) *z = r; else cgiv(r); return q; case -1: break; } if (z == ((GEN*)0x1L)) { r = subiispec(y+2,r+2, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2,((long)(((pari_ulong*)(r))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); return gerepileuptoint(av, r); } q = addis(q, -((((long*)(y))[1]) >> (32 - 2))); if (!z) return gerepileuptoint(av, q); *z = subiispec(y+2,r+2, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2,((long)(((pari_ulong*)(r))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); gptr[0]=&q; gptr[1]=z; gerepilemanysp(av,(pari_sp)r,gptr,2); return q; } GEN truedvmdis(GEN x, long y, GEN *z) { pari_sp av = avma; long r; GEN q = divis_rem(x,y,&r); if (r >= 0) { if (z == ((GEN*)0x1L)) { avma = av; return utoi(r); } if (z) *z = utoi(r); return q; } if (z == ((GEN*)0x1L)) { avma = av; return utoi(r + labs(y)); } q = gerepileuptoint(av, addis(q, (y < 0)? 1: -1)); if (z) *z = utoi(r + labs(y)); return q; } GEN truedvmdsi(long x, GEN y, GEN *z) { long q, r; q = sdivsi_rem(x,y,&r); if (r >= 0) { if (z == ((GEN*)0x1L)) return utoi(r); if (z) *z = utoi(r); return stoi(q); } if (z == ((GEN*)0x1L)) return subiuspec(y+2,(pari_ulong)-r, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); q = q - ((((long*)(y))[1]) >> (32 - 2)); if (!z) return stoi(q); *z = subiuspec(y+2,(pari_ulong)-r, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); return stoi(q); } GEN int2n(long n) { long i, m, l; GEN z; if (n < 0) return gen_0; if (n == 0) return gen_1; l = dvmdsBIL(n, &m) + 3; z = cgetipos(l); for (i = 2; i < l; i++) z[i] = 0; *((z)+((long)(((pari_ulong*)((z)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1) = 1L << m; return z; } GEN int2u(pari_ulong n) { pari_ulong i, m, l; GEN z; if (n == 0) return gen_1; l = dvmduBIL(n, &m) + 3; z = cgetipos(l); for (i = 2; i < l; i++) z[i] = 0; *((z)+((long)(((pari_ulong*)((z)))[1] & ((1UL<<(32 - 1 - 7))-1)))-1) = 1L << m; return z; } GEN mulii(GEN a,GEN b) { long sa,sb; GEN z; sa=((((long*)(a))[1]) >> (32 - 2)); if (!sa) return gen_0; sb=((((long*)(b))[1]) >> (32 - 2)); if (!sb) return gen_0; if (sb<0) sa = -sa; z = muliispec(a+2,b+2, ((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))-2,((long)(((pari_ulong*)(b))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sa)) << (32 - 2)))); return z; } GEN sqri(GEN a) { return sqrispec(a+2, ((long)(((pari_ulong*)(a))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); } pari_ulong usqrtsafe(pari_ulong a) { pari_ulong x = (pari_ulong)sqrt((double)a); return x; } # 821 "../src/kernel/none/mp_indep.c" long dblexpo(double x) { union { double f; pari_ulong i[2]; } fi; const int mant_len = 52; const int exp_mid = 0x3ff; const int shift = mant_len-32; if (x==0.) return -exp_mid; fi.f = x; { const pari_ulong a = fi.i[1]; return ((a & ((1UL << (32 -1))-1)) >> shift) - exp_mid; } } pari_ulong dblmantissa(double x) { union { double f; pari_ulong i[2]; } fi; const int expo_len = 11; if (x==0.) return 0; fi.f = x; { const pari_ulong a = fi.i[1]; const pari_ulong b = fi.i[0]; return (1UL << (32 -1)) | b >> (32 -expo_len) | (a << expo_len); } } GEN dbltor(double x) { GEN z; long e; union { double f; pari_ulong i[2]; } fi; const int mant_len = 52; const int exp_mid = 0x3ff; const int expo_len = 11; const int shift = mant_len-32; if (x==0.) return real_0_bit(-exp_mid); fi.f = x; z = cgetr((2 + (long)(8/sizeof(long)))); { const pari_ulong a = fi.i[1]; const pari_ulong b = fi.i[0]; pari_ulong A, B; e = ((a & ((1UL << (32 -1))-1)) >> shift) - exp_mid; if (e == exp_mid+1) pari_err(talker, "NaN or Infinity in dbltor"); A = b >> (32 -expo_len) | (a << expo_len); B = b << expo_len; if (e == -exp_mid) { int sh; if (A) { sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(A); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); e -= sh-1; z[2] = (A << sh) | (B >> (32-sh)); z[3] = B << sh; } else { sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(B); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); e -= sh-1 + 32; z[2] = B << sh; z[3] = 0; } } else { z[3] = B; z[2] = (1UL << (32 -1)) | A; } z[1] = ((1UL<<((32 - 2)-1)) + (e)) | ((pari_ulong)(((long)(x<0? -1: 1)) << (32 - 2))); } return z; } double rtodbl(GEN x) { long ex,s=((((long*)(x))[1]) >> (32 - 2)),lx=((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); pari_ulong a,b,k; union { double f; pari_ulong i[2]; } fi; const int mant_len = 52; const int exp_mid = 0x3ff; const int expo_len = 11; const int shift = mant_len-32; if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))==t_INT && !s) return 0.0; if (((long)((((pari_ulong*)(x))[0]) >> (32 - 7)))!=t_REAL) pari_err(typeer,"rtodbl"); if (!s || (ex=((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1))))) < - exp_mid) return 0.0; a = x[2] & ((1UL << (32 -1))-1); if (lx > 3) { b = x[3] + 0x400UL; if (b < 0x400UL) a++; if (a & (1UL << (32 -1))) { ex++; a=0; } } else b = 0; if (ex >= exp_mid) pari_err(overflower,"t_REAL->double conversion"); ex += exp_mid; k = (a >> expo_len) | (ex << shift); if (s<0) k |= (1UL << (32 -1)); fi.i[1] = k; fi.i[0] = (a << (32 -expo_len)) | (b >> expo_len); return fi.f; } # 2 "../src/kernel/none/add.c" # 17 "../src/kernel/none/add.c" __inline__ static GEN icopy_sign(GEN x, long sx) { GEN y=icopy(x); (((pari_ulong*)(y))[1]= (((pari_ulong*)(y))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sx)) << (32 - 2)))); return y; } GEN addsi_sign(long x, GEN y, long sy) { long sx,ly; GEN z; if (!x) return icopy_sign(y, sy); if (!sy) return stoi(x); if (x<0) { sx=-1; x=-x; } else sx=1; if (sx==sy) { z = adduispec(x,y+2, ((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1)))-2); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sy)) << (32 - 2)))); return z; } ly=((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (ly==3) { const long d = y[2] - x; if (!d) return gen_0; z=cgeti(3); if (y[2] < 0 || d > 0) { z[1] = ((pari_ulong)(((long)(sy)) << (32 - 2))) | (3); z[2] = d; } else { z[1] = ((pari_ulong)(((long)(-sy)) << (32 - 2))) | (3); z[2] =-d; } return z; } z = subiuspec(y+2,x, ly-2); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sy)) << (32 - 2)))); return z; } GEN addii_sign(GEN x, long sx, GEN y, long sy) { long lx,ly; GEN z; if (!sx) return sy? icopy_sign(y, sy): gen_0; if (!sy) return icopy_sign(x, sx); lx=((long)(((pari_ulong*)(x))[1] & ((1UL<<(32 - 1 - 7))-1))); ly=((long)(((pari_ulong*)(y))[1] & ((1UL<<(32 - 1 - 7))-1))); if (sx==sy) z = addiispec(x+2,y+2,lx-2,ly-2); else { long i = lx - ly; if (i==0) { i = absi_cmp_lg(x,y,lx); if (!i) return gen_0; } if (i<0) { sx=sy; {{GEN _z=x; x=y; y=_z;}; {long _z=lx; lx=ly; ly=_z;};}; } z = subiispec(x+2,y+2,lx-2,ly-2); } (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sx)) << (32 - 2)))); return z; } __inline__ static GEN rcopy_sign(GEN x, long sx) { GEN y = rcopy(x); (((pari_ulong*)(y))[1]= (((pari_ulong*)(y))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sx)) << (32 - 2)))); return y; } GEN addir_sign(GEN x, long sx, GEN y, long sy) { long e, l, ly; GEN z; if (!sx) return rcopy_sign(y, sy); e = ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - expi(x); if (!sy) { if (e >= 0) return rcopy_sign(y, sy); z = itor(x, nbits2prec(-e)); (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sx)) << (32 - 2)))); return z; } ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (e > 0) { l = ly - divsBIL(e); if (l < 3) return rcopy_sign(y, sy); } else l = ly + nbits2nlong(-e); z = (GEN)avma; y = addrr_sign(itor(x,l), sx, y, sy); ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); while (ly--) *--z = y[ly]; avma = (pari_sp)z; return z; } static GEN addsr_sign(long x, GEN y, long sy) { long e, l, ly, sx; GEN z; if (!x) return rcopy_sign(y, sy); if (x < 0) { sx = -1; x = -x; } else sx = 1; e = ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))) - expu(x); if (!sy) { if (e >= 0) return rcopy_sign(y, sy); if (sx == -1) x = -x; return stor(x, nbits2prec(-e)); } ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (e > 0) { l = ly - divsBIL(e); if (l < 3) return rcopy_sign(y, sy); } else l = ly + nbits2nlong(-e); z = (GEN)avma; y = addrr_sign(stor(x,l), sx, y, sy); ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); while (ly--) *--z = y[ly]; avma = (pari_sp)z; return z; } GEN addsr(long x, GEN y) { return addsr_sign(x, y, ((((long*)(y))[1]) >> (32 - 2))); } GEN subsr(long x, GEN y) { return addsr_sign(x, y, -((((long*)(y))[1]) >> (32 - 2))); } GEN addrex01(GEN x) { long l = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); GEN y = cgetr(l); y[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | ((1UL<<((32 - 2)-1)) + (1)); y[2] = (1UL << (32 -1)) | (((pari_ulong)x[2] & ~(1UL << (32 -1))) >> 1); shift_right(y, x, 3,l, x[2], 1); return y; } GEN subrex01(GEN x) { long i, sh, k, ly, lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); pari_ulong u; GEN y; k = 2; u = (pari_ulong)x[2] & (~(1UL << (32 -1))); while (!u) u = x[++k]; ly = (k == 2)? lx: lx - k+3; y = cgetr(ly); sh = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(u); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); if (sh) shift_left(y+2, x+k, 0, lx-k-1, 0, sh); else { for (i = 2; i < lx-k+2; i++) y[i] = x[k-2 + i]; } for (i = lx-k+2; i < ly; i++) y[i] = 0; y[1] = ((pari_ulong)(((long)(1)) << (32 - 2))) | evalexpo(- (bit_accuracy(k) + sh)); return y; } GEN addrr_sign(GEN x, long sx, GEN y, long sy) { long lx, ex = ((long) ((((pari_ulong*)(x))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))); long ly, ey = ((long) ((((pari_ulong*)(y))[1] & ((1UL<<(32 - 2))-1)) - (1UL<<((32 - 2)-1)))), e = ey - ex; long i, j, lz, ez, m; int extend, f2; GEN z; register pari_ulong overflow; if (!sy) { if (!sx) { if (e > 0) ex = ey; return real_0_bit(ex); } if (e >= 0) return real_0_bit(ey); lz = nbits2prec(-e); lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); if (lz > lx) lz = lx; z = cgetr(lz); while(--lz) z[lz] = x[lz]; (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sx)) << (32 - 2)))); return z; } if (!sx) { if (e <= 0) return real_0_bit(ex); lz = nbits2prec(e); ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); if (lz > ly) lz = ly; z = cgetr(lz); while (--lz) z[lz] = y[lz]; (((pari_ulong*)(z))[1]= (((pari_ulong*)(z))[1]&(~(~((1UL<<(32 - 2)) - 1)))) | (pari_ulong)((pari_ulong)(((long)(sy)) << (32 - 2)))); return z; } if (e < 0) { {GEN _z=x; x=y; y=_z;}; {long _z=sx; sx=sy; sy=_z;}; ey=ex; e=-e; } lx = ((long)(((pari_ulong*)(x))[0] & ((1UL<<(32 - 1 - 7))-1))); ly = ((long)(((pari_ulong*)(y))[0] & ((1UL<<(32 - 1 - 7))-1))); extend = 0; if (e) { long d = dvmdsBIL(e, &m), l = ly-d; if (l <= 2) return rcopy_sign(y, sy); if (l > lx) { lz = lx + d + 1; extend = 1; } else { lz = ly; lx = l; } if (m) { const pari_sp av = avma; const pari_ulong sh = 32 -m; GEN p1 = x; x = new_chunk(lx + lz + 1); shift_right(x,p1,2,lx, 0,m); if (extend) x[lx] = p1[lx-1] << sh; avma = av; } } else { m = 0; if (lx > ly) lx = ly; lz = lx; } if (sx == sy) { i = lz-1; j = lx-1; if (extend) { pari_ulong garde = __extension__ ({ pari_ulong __arg1 = (x[lx]), __arg2 = (y[i]), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); if (m < 4) z = cgetr(--lz); else { z = cgetr(lz); z[i] = garde; } } else { z = cgetr(lz); z[i] = __extension__ ({ pari_ulong __arg1 = (x[j]), __arg2 = (y[i]), __value = __arg1 + __arg2; overflow = (__value < __arg1); __value; }); j--; } i--; for (; j>=2; i--,j--) z[i] = __extension__ ({ pari_ulong __arg1 = (x[j]), __arg2 = (y[i]), __value, __tmp = __arg1 + overflow; overflow = (__tmp < __arg1); __value = __tmp + __arg2; overflow |= (__value < __tmp); __value; }); if (overflow) { z[1] = 1; for (;;) { z[i] = y[i]+1; if (z[i--]) break; } if (i <= 0) { shift_right(z,z, 2,lz, 1,1); z[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(ey+1); return z; } } for (; i>=2; i--) z[i] = y[i]; z[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(ey); return z; } if (e) f2 = 1; else { i = 2; while (i < lx && x[i] == y[i]) i++; if (i==lx) return real_0_bit(ey+1 - bit_accuracy(lx)); f2 = ((pari_ulong)y[i] > (pari_ulong)x[i]); } i = lz-1; z = cgetr(lz); if (f2) { j = lx-1; if (extend) z[i] = __extension__ ({ pari_ulong __arg1 = (y[i]), __arg2 = (x[lx]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); else z[i] = __extension__ ({ pari_ulong __arg1 = (y[i]), __arg2 = (x[j--]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); for (i--; j>=2; i--) z[i] = __extension__ ({ pari_ulong __arg1 = (y[i]), __arg2 = (x[j--]), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); if (overflow) for (;;) { z[i] = y[i]-1; if (y[i--]) break; } for (; i>=2; i--) z[i] = y[i]; sx = sy; } else { if (extend) z[i] = __extension__ ({ pari_ulong __arg1 = (x[lx]), __arg2 = (y[i]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); else z[i] = __extension__ ({ pari_ulong __arg1 = (x[i]), __arg2 = (y[i]); overflow = (__arg2 > __arg1); __arg1 - __arg2; }); for (i--; i>=2; i--) z[i] = __extension__ ({ pari_ulong __arg1 = (x[i]), __arg2 = (y[i]), __value, __tmp = __arg1 - overflow; overflow = (__arg1 < overflow); __value = __tmp - __arg2; overflow |= (__arg2 > __tmp); __value; }); } x = z+2; i = 0; while (!x[i]) i++; lz -= i; z += i; j = __extension__ ({ static int __bfffo_tabshi[16]={4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; int __value = 32 - 4; pari_ulong __arg1=(z[2]); if (__arg1 & ~0xffffUL) {__value -= 16; __arg1 >>= 16;} if (__arg1 & ~0x00ffUL) {__value -= 8; __arg1 >>= 8;} if (__arg1 & ~0x000fUL) {__value -= 4; __arg1 >>= 4;} __value + __bfffo_tabshi[__arg1]; }); ez = ey - (j | (i * 32)); if (extend) { if (m - j < 5 && lz > 3) { pari_ulong last = (pari_ulong)z[--lz]; if (j == 0) z[lz] = (((pari_ulong)(t_VECSMALL)) << (32 - 7)) | (1); else { GEN t = z; z++; shift_left(z,t,2,lz-1, last,j); } if ((last< 1) i--; if (i == 1) { ez++; z[2] = (long)(1UL << (32 -1)); } } } else if (j) shift_left(z,z,2,lz-1, 0,j); } else if (j) shift_left(z,z,2,lz-1, 0,j); z[1] = ((pari_ulong)(((long)(sx)) << (32 - 2))) | evalexpo(ez); z[0] = (((pari_ulong)(t_REAL)) << (32 - 7)) | evallg(lz); avma = (pari_sp)z; return z; }