1- from flint.flintlib.fmpz cimport fmpz_t, fmpz_struct
2- from flint.flintlib.flint cimport mp_limb_t, ulong, flint_rand_t, slong
1+ from flint.flintlib.arb_types cimport mag_t
2+ from flint.flintlib.arf_types cimport arf_rnd_t, arf_srcptr, arf_t
3+ from flint.flintlib.flint cimport flint_rand_t, nn_ptr, nn_srcptr, slong, ulong
34from flint.flintlib.fmpq cimport fmpq_t
4- from flint.flintlib.mag cimport mag_t
5+ from flint.flintlib.fmpz_types cimport fmpz_t
56
6- cdef extern from " flint/arf.h" :
7- ctypedef struct arf_struct:
8- fmpz_struct exp
9- long size
10- mp_limb_t d0
11- mp_limb_t d1
12-
13- ctypedef arf_struct arf_t[1 ]
14- ctypedef arf_struct * arf_ptr
15- ctypedef const arf_struct * arf_srcptr
7+ # unknown type FILE
8+ # unknown type mpfr_rnd_t
9+ # unknown type mpfr_t
10+ # unknown type mpz_t
1611
17- ctypedef int arf_rnd_t
18- cdef arf_rnd_t ARF_RND_DOWN
19- cdef arf_rnd_t ARF_RND_NEAR
20- cdef arf_rnd_t ARF_RND_FLOOR
21- cdef arf_rnd_t ARF_RND_CEIL
22- cdef arf_rnd_t ARF_RND_UP
12+ # .. macro:: ARF_RND_DOWN
13+ # .. macro:: ARF_RND_UP
14+ # .. macro:: ARF_RND_FLOOR
15+ # .. macro:: ARF_RND_CEIL
16+ # .. macro:: ARF_RND_NEAR
17+ # .. macro:: ARF_PREC_EXACT
2318
24- # from here on is parsed
19+ cdef extern from " flint/arf.h " :
2520 void arf_init(arf_t x)
2621 void arf_clear(arf_t x)
2722 slong arf_allocated_bytes(const arf_t x)
@@ -40,20 +35,19 @@ cdef extern from "flint/arf.h":
4035 int arf_is_special(const arf_t x)
4136 int arf_is_finite(const arf_t x)
4237 void arf_set(arf_t res, const arf_t x)
43- # void arf_set_mpz(arf_t res, const mpz_t x)
44- # void arf_set_fmpz(arf_t res, const fmpz_t x)
38+ # void arf_set_mpz(arf_t res, const mpz_t x)
39+ void arf_set_fmpz(arf_t res, const fmpz_t x)
4540 void arf_set_ui(arf_t res, ulong x)
4641 void arf_set_si(arf_t res, slong x)
47- # void arf_set_mpfr(arf_t res, const mpfr_t x)
48- # void arf_set_fmpr(arf_t res, const fmpr_t x)
42+ # void arf_set_mpfr(arf_t res, const mpfr_t x)
4943 void arf_set_d(arf_t res, double x)
5044 void arf_swap(arf_t x, arf_t y)
5145 void arf_init_set_ui(arf_t res, ulong x)
5246 void arf_init_set_si(arf_t res, slong x)
5347 int arf_set_round(arf_t res, const arf_t x, slong prec, arf_rnd_t rnd)
5448 int arf_set_round_si(arf_t res, slong x, slong prec, arf_rnd_t rnd)
5549 int arf_set_round_ui(arf_t res, ulong x, slong prec, arf_rnd_t rnd)
56- # int arf_set_round_mpz(arf_t res, const mpz_t x, slong prec, arf_rnd_t rnd)
50+ # int arf_set_round_mpz(arf_t res, const mpz_t x, slong prec, arf_rnd_t rnd)
5751 int arf_set_round_fmpz(arf_t res, const fmpz_t x, slong prec, arf_rnd_t rnd)
5852 void arf_set_si_2exp_si(arf_t res, slong m, slong e)
5953 void arf_set_ui_2exp_si(arf_t res, ulong m, slong e)
@@ -62,8 +56,7 @@ cdef extern from "flint/arf.h":
6256 void arf_get_fmpz_2exp(fmpz_t m, fmpz_t e, const arf_t x)
6357 void arf_frexp(arf_t m, fmpz_t e, const arf_t x)
6458 double arf_get_d(const arf_t x, arf_rnd_t rnd)
65- void arf_set_fmpz(arf_t x, const fmpz_t res)
66- # int arf_get_mpfr(mpfr_t res, const arf_t x, mpfr_rnd_t rnd)
59+ # int arf_get_mpfr(mpfr_t res, const arf_t x, mpfr_rnd_t rnd)
6760 int arf_get_fmpz(fmpz_t res, const arf_t x, arf_rnd_t rnd)
6861 slong arf_get_si(const arf_t x, arf_rnd_t rnd)
6962 int arf_get_fmpz_fixed_fmpz(fmpz_t res, const arf_t x, const fmpz_t e)
@@ -114,8 +107,12 @@ cdef extern from "flint/arf.h":
114107 void arf_print(const arf_t x)
115108 void arf_printd(const arf_t x, slong d)
116109 char * arf_get_str(const arf_t x, slong d)
110+ # void arf_fprint(FILE * file, const arf_t x)
111+ # void arf_fprintd(FILE * file, const arf_t y, slong d)
117112 char * arf_dump_str(const arf_t x)
118113 int arf_load_str(arf_t x, const char * str )
114+ # int arf_dump_file(FILE * stream, const arf_t x)
115+ # int arf_load_file(arf_t x, FILE * stream)
119116 void arf_abs(arf_t res, const arf_t x)
120117 void arf_neg(arf_t res, const arf_t x)
121118 int arf_neg_round(arf_t res, const arf_t x, slong prec, arf_rnd_t rnd)
@@ -133,17 +130,17 @@ cdef extern from "flint/arf.h":
133130 int arf_mul(arf_t res, const arf_t x, const arf_t y, slong prec, arf_rnd_t rnd)
134131 int arf_mul_ui(arf_t res, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)
135132 int arf_mul_si(arf_t res, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
136- # int arf_mul_mpz(arf_t res, const arf_t x, const mpz_t y, slong prec, arf_rnd_t rnd)
133+ # int arf_mul_mpz(arf_t res, const arf_t x, const mpz_t y, slong prec, arf_rnd_t rnd)
137134 int arf_mul_fmpz(arf_t res, const arf_t x, const fmpz_t y, slong prec, arf_rnd_t rnd)
138135 int arf_addmul(arf_t z, const arf_t x, const arf_t y, slong prec, arf_rnd_t rnd)
139136 int arf_addmul_ui(arf_t z, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)
140137 int arf_addmul_si(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
141- # int arf_addmul_mpz(arf_t z, const arf_t x, const mpz_t y, slong prec, arf_rnd_t rnd)
138+ # int arf_addmul_mpz(arf_t z, const arf_t x, const mpz_t y, slong prec, arf_rnd_t rnd)
142139 int arf_addmul_fmpz(arf_t z, const arf_t x, const fmpz_t y, slong prec, arf_rnd_t rnd)
143140 int arf_submul(arf_t z, const arf_t x, const arf_t y, slong prec, arf_rnd_t rnd)
144141 int arf_submul_ui(arf_t z, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)
145142 int arf_submul_si(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
146- # int arf_submul_mpz(arf_t z, const arf_t x, const mpz_t y, slong prec, arf_rnd_t rnd)
143+ # int arf_submul_mpz(arf_t z, const arf_t x, const mpz_t y, slong prec, arf_rnd_t rnd)
147144 int arf_submul_fmpz(arf_t z, const arf_t x, const fmpz_t y, slong prec, arf_rnd_t rnd)
148145 int arf_fma(arf_t res, const arf_t x, const arf_t y, const arf_t z, slong prec, arf_rnd_t rnd)
149146 int arf_sosq(arf_t res, const arf_t x, const arf_t y, slong prec, arf_rnd_t rnd)
@@ -165,9 +162,8 @@ cdef extern from "flint/arf.h":
165162 int arf_complex_mul(arf_t e, arf_t f, const arf_t a, const arf_t b, const arf_t c, const arf_t d, slong prec, arf_rnd_t rnd)
166163 int arf_complex_mul_fallback(arf_t e, arf_t f, const arf_t a, const arf_t b, const arf_t c, const arf_t d, slong prec, arf_rnd_t rnd)
167164 int arf_complex_sqr(arf_t e, arf_t f, const arf_t a, const arf_t b, slong prec, arf_rnd_t rnd)
168- # int _arf_get_integer_mpn(mp_ptr y, mp_srcptr xp, mp_size_t xn, slong exp)
169- # int _arf_set_mpn_fixed(arf_t z, mp_srcptr xp, mp_size_t xn, mp_size_t fixn, int negative, slong prec, arf_rnd_t rnd)
165+ int _arf_get_integer_mpn(nn_ptr y, nn_srcptr xp, slong xn, slong exp)
166+ int _arf_set_mpn_fixed(arf_t z, nn_srcptr xp, slong xn, slong fixn, int negative, slong prec, arf_rnd_t rnd)
170167 int _arf_set_round_ui(arf_t z, ulong x, int sgnbit, slong prec, arf_rnd_t rnd)
171- int _arf_set_round_uiui(arf_t z, slong * fix, mp_limb_t hi, mp_limb_t lo, int sgnbit, slong prec, arf_rnd_t rnd)
172- # int _arf_set_round_mpn(arf_t z, slong * exp_shift, mp_srcptr x, mp_size_t xn, int sgnbit, slong prec, arf_rnd_t rnd)
173-
168+ int _arf_set_round_uiui(arf_t z, slong * fix, ulong hi, ulong lo, int sgnbit, slong prec, arf_rnd_t rnd)
169+ int _arf_set_round_mpn(arf_t z, slong * exp_shift, nn_srcptr x, slong xn, int sgnbit, slong prec, arf_rnd_t rnd)
0 commit comments