long -> slong in partitions/ and partitions/test/.

This commit is contained in:
William Hart 2015-11-05 18:07:38 +00:00
parent 9c6caaeca2
commit 0aba1fa6f4
6 changed files with 14 additions and 14 deletions

View file

@ -54,7 +54,7 @@ worker(void * arg_ptr)
/* TODO: set number of threads in child threads, for future /* TODO: set number of threads in child threads, for future
multithreaded evaluation of single terms */ multithreaded evaluation of single terms */
static void static void
hrr_sum_threaded(arb_t x, const fmpz_t n, long N, int use_doubles) hrr_sum_threaded(arb_t x, const fmpz_t n, slong N, int use_doubles)
{ {
arb_t y; arb_t y;
pthread_t threads[2]; pthread_t threads[2];
@ -99,7 +99,7 @@ partitions_fmpz_fmpz(fmpz_t p, const fmpz_t n, int use_doubles)
{ {
arb_t x; arb_t x;
arf_t bound; arf_t bound;
long N; slong N;
arb_init(x); arb_init(x);
arf_init(bound); arf_init(bound);

View file

@ -72,7 +72,7 @@ partitions_remainder_bound_log2(double n, double N)
long long
partitions_hrr_needed_terms(double n) partitions_hrr_needed_terms(double n)
{ {
long N; slong N;
for (N = 1; partitions_remainder_bound_log2(n, N) > 10; N++); for (N = 1; partitions_remainder_bound_log2(n, N) > 10; N++);
for ( ; partitions_remainder_bound(n, N) > 0.4; N++); for ( ; partitions_remainder_bound(n, N) > 0.4; N++);
return N; return N;
@ -111,13 +111,13 @@ log2_ceil(double x)
{ {
/* ceil(log2(n)) = bitcount(n-1); /* ceil(log2(n)) = bitcount(n-1);
this is too large if x is a power of two */ this is too large if x is a power of two */
return FLINT_BIT_COUNT((long) x); return FLINT_BIT_COUNT((slong) x);
} }
static long static long
partitions_prec_bound(double n, long k, long N) partitions_prec_bound(double n, slong k, slong N)
{ {
long prec; slong prec;
prec = partitions_term_bound(n, k); prec = partitions_term_bound(n, k);
prec += log2_ceil(8 * N * (26 * (sqrt(n) / k) + 7 * bound_primes(k) + 22)); prec += log2_ceil(8 * N * (26 * (sqrt(n) / k) + 7 * bound_primes(k) + 22));
@ -171,7 +171,7 @@ eval_trig_prod_d(trig_prod_t prod)
} }
static void static void
eval_trig_prod(arb_t sum, trig_prod_t prod, long prec) eval_trig_prod(arb_t sum, trig_prod_t prod, slong prec)
{ {
int i; int i;
mp_limb_t v; mp_limb_t v;
@ -216,7 +216,7 @@ eval_trig_prod(arb_t sum, trig_prod_t prod, long prec)
} }
static void static void
sinh_cosh_divk_precomp(arb_t sh, arb_t ch, arb_t ex, long k, long prec) sinh_cosh_divk_precomp(arb_t sh, arb_t ch, arb_t ex, slong k, slong prec)
{ {
arb_t t; arb_t t;
arb_init(t); arb_init(t);
@ -234,12 +234,12 @@ sinh_cosh_divk_precomp(arb_t sh, arb_t ch, arb_t ex, long k, long prec)
void void
partitions_hrr_sum_arb(arb_t x, const fmpz_t n, long N0, long N, int use_doubles) partitions_hrr_sum_arb(arb_t x, const fmpz_t n, slong N0, slong N, int use_doubles)
{ {
trig_prod_t prod; trig_prod_t prod;
arb_t acc, C, t1, t2, t3, t4, exp1; arb_t acc, C, t1, t2, t3, t4, exp1;
fmpz_t n24; fmpz_t n24;
long k, prec, res_prec, acc_prec, guard_bits; slong k, prec, res_prec, acc_prec, guard_bits;
double nd, Cd; double nd, Cd;
if (fmpz_cmp_ui(n, 2) <= 0) if (fmpz_cmp_ui(n, 2) <= 0)

View file

@ -26,7 +26,7 @@
#include "partitions.h" #include "partitions.h"
static void static void
_arf_sinh(arf_t y, const arf_t x, long prec) _arf_sinh(arf_t y, const arf_t x, slong prec)
{ {
arb_t t; arb_t t;
arb_init(t); arb_init(t);

View file

@ -102,7 +102,7 @@ static const ulong testdata[][2] =
int main(void) int main(void)
{ {
flint_rand_t state; flint_rand_t state;
long i; slong i;
printf("partitions_fmpz_ui...."); printf("partitions_fmpz_ui....");
fflush(stdout); fflush(stdout);

View file

@ -105,7 +105,7 @@ static const ulong testdata[][2] =
int main(void) int main(void)
{ {
flint_rand_t state; flint_rand_t state;
long i; slong i;
printf("partitions_fmpz_ui_threaded...."); printf("partitions_fmpz_ui_threaded....");
fflush(stdout); fflush(stdout);

View file

@ -102,7 +102,7 @@ static const ulong testdata[][2] =
int main(void) int main(void)
{ {
flint_rand_t state; flint_rand_t state;
long i; slong i;
printf("partitions_fmpz_ui_using_doubles...."); printf("partitions_fmpz_ui_using_doubles....");
fflush(stdout); fflush(stdout);