[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Tue May 20 17:46:17 UTC 2014
details: /var/hg/gmp/rev/b62098fe021d
changeset: 16393:b62098fe021d
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Tue May 20 19:44:39 2014 +0200
description:
+1 in the init2 argument before setbit. (Thanks Niels)
details: /var/hg/gmp/rev/0f8b31a18f15
changeset: 16394:0f8b31a18f15
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Tue May 20 19:45:10 2014 +0200
description:
ChangeLog
diffstat:
ChangeLog | 7 +++++++
gen-fac.c | 4 ++--
gen-fib.c | 2 +-
mini-gmp/mini-gmp.c | 2 +-
rand/randmts.c | 4 ++--
5 files changed, 13 insertions(+), 6 deletions(-)
diffs (78 lines):
diff -r 9468632bcba8 -r 0f8b31a18f15 ChangeLog
--- a/ChangeLog Fri May 16 09:06:22 2014 +0200
+++ b/ChangeLog Tue May 20 19:45:10 2014 +0200
@@ -1,3 +1,10 @@
+2014-05-20 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * gen-fac.c: +1 in the init2 argument before setbit.
+ * gen-fib.c: Likewise. (Thanks Niels)
+ * mini-gmp/mini-gmp.c: Likewise.
+ * rand/randmts.c: Likewise.
+
2014-05-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
* mini-gmp/mini-gmp.c: Micro-optimisations.
diff -r 9468632bcba8 -r 0f8b31a18f15 gen-fac.c
--- a/gen-fac.c Fri May 16 09:06:22 2014 +0200
+++ b/gen-fac.c Tue May 20 19:45:10 2014 +0200
@@ -1,6 +1,6 @@
/* Generate data for combinatorics: fac_ui, bin_uiui, ...
-Copyright 2002, 2011-2013 Free Software Foundation, Inc.
+Copyright 2002, 2011-2014 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -101,7 +101,7 @@
ofl = b - 1;
printf
("#define ODD_FACTORIAL_TABLE_LIMIT (%lu)\n", ofl);
- mpz_init2 (mask, numb);
+ mpz_init2 (mask, numb + 1);
mpz_setbit (mask, numb);
mpz_sub_ui (mask, mask, 1);
printf
diff -r 9468632bcba8 -r 0f8b31a18f15 gen-fib.c
--- a/gen-fib.c Fri May 16 09:06:22 2014 +0200
+++ b/gen-fib.c Tue May 20 19:45:10 2014 +0200
@@ -40,7 +40,7 @@
mpz_t limit, l;
int falloc, i;
- mpz_init2 (limit, numb_bits);
+ mpz_init2 (limit, numb_bits + 1);
mpz_setbit (limit, numb_bits);
/* fib(2n) > 2^n, so use 2n as a limit for the table size */
diff -r 9468632bcba8 -r 0f8b31a18f15 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c Fri May 16 09:06:22 2014 +0200
+++ b/mini-gmp/mini-gmp.c Tue May 20 19:45:10 2014 +0200
@@ -3207,7 +3207,7 @@
{
mp_bitcnt_t tb;
tb = mpz_sizeinbase (y, 2) / z + 1;
- mpz_init2 (t, tb);
+ mpz_init2 (t, tb + 1);
mpz_setbit (t, tb);
}
diff -r 9468632bcba8 -r 0f8b31a18f15 rand/randmts.c
--- a/rand/randmts.c Fri May 16 09:06:22 2014 +0200
+++ b/rand/randmts.c Tue May 20 19:45:10 2014 +0200
@@ -1,6 +1,6 @@
/* Mersenne Twister pseudo-random number generator functions.
-Copyright 2002, 2003, 2013 Free Software Foundation, Inc.
+Copyright 2002, 2003, 2013, 2014 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -117,7 +117,7 @@
p = (gmp_rand_mt_struct *) RNG_STATE (rstate);
- mpz_init2 (mod, 19937L);
+ mpz_init2 (mod, 19938L);
mpz_init2 (seed1, 19937L);
mpz_setbit (mod, 19937L);
More information about the gmp-commit
mailing list