Skip to content

Commit

Permalink
arb-impl.h
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Nov 5, 2024
1 parent 753451b commit 67b7511
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 44 deletions.
9 changes: 9 additions & 0 deletions src/arb-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ ulong euler_mod_p_powsum_1(ulong n, ulong p);
ulong euler_mod_p_powsum_noredc(ulong n, ulong p, const unsigned int * divtab);
ulong euler_mod_p_powsum(ulong n, ulong p, const unsigned int * divtab);

/* FIXME: This function is untested, unused and undocumented. */
void _arb_log_precompute_reductions(short * rel, double * eps, arb_srcptr alpha, slong n, slong max_rel, double C);

void arb_exp_taylor_sum_rs_generic(arb_t res, const arb_t x, slong N, slong prec);

void arb_sin_cos_fmpz_div_2exp_bsplit(arb_t wsin, arb_t wcos, const fmpz_t x, flint_bitcnt_t r, slong prec);

void arb_sin_cos_taylor_sum_rs(arb_t s, const arb_t x, slong N, int cosine, slong prec);

#ifdef __cplusplus
}
#endif
Expand Down
12 changes: 3 additions & 9 deletions src/arb/exp_arf_rs_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@
(at your option) any later version. See <https://www.gnu.org/licenses/>.
*/

#include "ulong_extras.h"
#include "arb.h"

#ifdef __GNUC__
# define pow __builtin_pow
#else
# include <math.h>
#endif

/* FIXME: Remove this guard against warnings. Best thing would probably be to
* implement an *-impl.h to keep track of local functions. */
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
# pragma message "arb_exp_taylor_sum_rs_generic only needs a symbol for test"
#endif
#include "ulong_extras.h"
#include "arb.h"
#include "arb-impl.h"

void
arb_exp_taylor_sum_rs_generic(arb_t res, const arb_t x, slong N, slong prec)
Expand Down
8 changes: 1 addition & 7 deletions src/arb/log_precompute_reductions.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "fmpz_mat.h"
#include "fmpz_lll.h"
#include "arb.h"
#include "arb-impl.h"

#ifdef __GNUC__
# define fabs __builtin_fabs
Expand All @@ -22,13 +23,6 @@
# include <math.h>
#endif

/* FIXME: Remove this guard against warnings. Best thing would probably be to
* implement an *-impl.h to keep track of local functions. */
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
# pragma message "_arb_log_precompute_reductions is currently unused/untested/undocumented!"
#endif

#define TERMINATOR -32768

void
Expand Down
7 changes: 0 additions & 7 deletions src/arb/sin_cos_arf_bb.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
#include "arb-impl.h"
#include "acb.h"

/* FIXME: Remove this guard against warnings. Best thing would probably be to
* implement an *-impl.h to keep track of local functions. */
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
# pragma message "arb_sin_cos_fmpz_div_2exp_bsplit only needs a symbol for test"
#endif

static void
bsplit(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const slong * xexp,
Expand Down
14 changes: 4 additions & 10 deletions src/arb/sin_cos_arf_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,16 @@
(at your option) any later version. See <https://www.gnu.org/licenses/>.
*/

#include "ulong_extras.h"
#include "thread_support.h"
#include "arb.h"

#ifdef __GNUC__
# define pow __builtin_pow
#else
# include <math.h>
#endif

/* FIXME: Remove this guard against warnings. Best thing would probably be to
* implement an *-impl.h to keep track of local functions. */
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
# pragma message "arb_sin_cos_taylor_sum_rs only needs a symbol for test"
#endif
#include "ulong_extras.h"
#include "thread_support.h"
#include "arb.h"
#include "arb-impl.h"

/* Computes sin(x) or cos(x) using Taylor series truncated at x^N exclusive.
Computes error bound automatically. Does not allow aliasing of s and x. */
Expand Down
5 changes: 1 addition & 4 deletions src/arb/test/t-exp_arf_rs_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

#include "test_helpers.h"
#include "arb.h"

/* these functions are not exposed to the public for now,
but it still makes sense to test them explicitly */
void arb_exp_taylor_sum_rs_generic(arb_t s, const arb_t x, slong N, slong prec);
#include "arb-impl.h"

TEST_FUNCTION_START(arb_exp_arf_rs_generic, state)
{
Expand Down
4 changes: 1 addition & 3 deletions src/arb/test/t-sin_cos_arf_bb.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

#include "test_helpers.h"
#include "arb.h"

void arb_sin_cos_fmpz_div_2exp_bsplit(arb_t wsin, arb_t wcos,
const fmpz_t x, flint_bitcnt_t r, slong prec);
#include "arb-impl.h"

TEST_FUNCTION_START(arb_sin_cos_arf_bb, state)
{
Expand Down
5 changes: 1 addition & 4 deletions src/arb/test/t-sin_cos_arf_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

#include "test_helpers.h"
#include "arb.h"

/* these functions are not exposed to the public for now,
but it still makes sense to test them explicitly */
void arb_sin_cos_taylor_sum_rs(arb_t s, const arb_t x, slong N, int cosine, slong prec);
#include "arb-impl.h"

TEST_FUNCTION_START(arb_sin_cos_arf_generic, state)
{
Expand Down

0 comments on commit 67b7511

Please sign in to comment.