From 4702cd1f74472764c0bc39b4d25e32fb3f9ae3a3 Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Thu, 25 Feb 2016 20:57:12 +0100 Subject: [PATCH] don't include fmprb.h automatically in arb.h (also skips including fmpz_poly.h in arb.h) --- acb/rising2_ui_rs.c | 1 + acb/rising_ui_rs.c | 1 + acb_modular.h | 1 + arb.h | 3 ++- arb/get_rand_fmpq.c | 1 + arb/rising2_ui_rs.c | 3 +-- arb/test/t-mul.c | 1 + bernoulli.h | 6 ------ doc/source/arb.rst | 12 ++++++++---- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/acb/rising2_ui_rs.c b/acb/rising2_ui_rs.c index be22035d..f60e3c6b 100644 --- a/acb/rising2_ui_rs.c +++ b/acb/rising2_ui_rs.c @@ -23,6 +23,7 @@ ******************************************************************************/ +#include "fmpz_poly.h" #include "acb.h" void _gamma_rf_bsplit(fmpz * A, ulong a, ulong b); diff --git a/acb/rising_ui_rs.c b/acb/rising_ui_rs.c index 9b555e7e..ff72d57e 100644 --- a/acb/rising_ui_rs.c +++ b/acb/rising_ui_rs.c @@ -23,6 +23,7 @@ ******************************************************************************/ +#include "fmpz_poly.h" #include "acb.h" void rising_difference_polynomial(fmpz * s, fmpz * c, ulong m); diff --git a/acb_modular.h b/acb_modular.h index 5addcc79..a4ee5e19 100644 --- a/acb_modular.h +++ b/acb_modular.h @@ -27,6 +27,7 @@ #define ACB_MODULAR_H #include +#include "fmpz_poly.h" #include "acb.h" #ifdef __cplusplus diff --git a/arb.h b/arb.h index e317052b..11edd079 100644 --- a/arb.h +++ b/arb.h @@ -33,7 +33,6 @@ #endif #include -#include "fmprb.h" #include "mag.h" #include "arf.h" @@ -96,6 +95,7 @@ _arb_vec_clear(arb_ptr v, slong n) flint_free(v); } +#ifdef FMPRB_H ARB_INLINE void arb_set_fmprb(arb_t x, const fmprb_t y) { @@ -109,6 +109,7 @@ arb_get_fmprb(fmprb_t x, const arb_t y) arf_get_fmpr(fmprb_midref(x), arb_midref(y)); mag_get_fmpr(fmprb_radref(x), arb_radref(y)); } +#endif ARB_INLINE arf_ptr arb_mid_ptr(arb_t z) { return arb_midref(z); } ARB_INLINE mag_ptr arb_rad_ptr(arb_t z) { return arb_radref(z); } diff --git a/arb/get_rand_fmpq.c b/arb/get_rand_fmpq.c index 8941caa2..16606089 100644 --- a/arb/get_rand_fmpq.c +++ b/arb/get_rand_fmpq.c @@ -23,6 +23,7 @@ ******************************************************************************/ +#include "fmprb.h" #include "arb.h" void diff --git a/arb/rising2_ui_rs.c b/arb/rising2_ui_rs.c index 54a62eca..fd841bda 100644 --- a/arb/rising2_ui_rs.c +++ b/arb/rising2_ui_rs.c @@ -23,10 +23,9 @@ ******************************************************************************/ +#include "fmpz_poly.h" #include "arb.h" - - void _gamma_rf_bsplit(fmpz * A, ulong a, ulong b) { diff --git a/arb/test/t-mul.c b/arb/test/t-mul.c index 480c1711..3cca176a 100644 --- a/arb/test/t-mul.c +++ b/arb/test/t-mul.c @@ -23,6 +23,7 @@ ******************************************************************************/ +#include "fmprb.h" #include "arb.h" int diff --git a/bernoulli.h b/bernoulli.h index 0801b831..c019f7ce 100644 --- a/bernoulli.h +++ b/bernoulli.h @@ -32,7 +32,6 @@ #include "fmpz_vec.h" #include "fmpq.h" #include "arith.h" -#include "fmprb.h" #include "arb.h" #ifdef __cplusplus @@ -118,11 +117,6 @@ void bernoulli_rev_clear(bernoulli_rev_t iter); slong bernoulli_bound_2exp_si(ulong n); - -void bernoulli_fmprb_ui_zeta(fmprb_t b, ulong n, slong prec); - -void bernoulli_fmprb_ui(fmprb_t b, ulong n, slong prec); - void _bernoulli_fmpq_ui_zeta(fmpz_t num, fmpz_t den, ulong n); void _bernoulli_fmpq_ui(fmpz_t num, fmpz_t den, ulong n); diff --git a/doc/source/arb.rst b/doc/source/arb.rst index 9102f8e7..c0707b86 100644 --- a/doc/source/arb.rst +++ b/doc/source/arb.rst @@ -117,10 +117,6 @@ Memory management Assignment and rounding ------------------------------------------------------------------------------- -.. function:: void arb_set_fmprb(arb_t y, const fmprb_t x) - -.. function:: void arb_get_fmprb(fmprb_t y, const arb_t x) - .. function:: void arb_set(arb_t y, const arb_t x) .. function:: void arb_set_arf(arb_t y, const arf_t x) @@ -135,6 +131,14 @@ Assignment and rounding Sets *y* to the value of *x* without rounding. +.. function:: void arb_set_fmprb(arb_t y, const fmprb_t x) + +.. function:: void arb_get_fmprb(fmprb_t y, const arb_t x) + + Sets *y* to the value of *x* without rounding. These methods are + deprecated. To enable them, ``fmprb.h`` must be included before + including ``arb.h``. + .. function:: void arb_set_fmpz_2exp(arb_t y, const fmpz_t x, const fmpz_t e) Sets *y* to `x \cdot 2^e`.