diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2014-05-15 18:51:26 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2014-05-15 18:51:26 +0200 |
commit | 562dbf041a887e1238ac4203fab3479ee62110b0 (patch) | |
tree | eded00dede60cf611962507a0d9f60e5ae94f60c /gen-fib.c | |
parent | 736f96b1042ed1718d87fa37661cf42f9070b265 (diff) | |
download | gmp-562dbf041a887e1238ac4203fab3479ee62110b0.tar.gz |
gen-fib.c: use mpz_setbit, gen-psqr.c: skip even numbers when looking for primes
Diffstat (limited to 'gen-fib.c')
-rw-r--r-- | gen-fib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -40,8 +40,8 @@ generate (int numb_bits) mpz_t limit, l; int falloc, i; - mpz_init_set_ui (limit, 1L); - mpz_mul_2exp (limit, limit, numb_bits); + mpz_init2 (limit, numb_bits); + mpz_setbit (limit, numb_bits); /* fib(2n) > 2^n, so use 2n as a limit for the table size */ falloc = 2 * numb_bits; |