diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2014-05-20 19:44:39 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2014-05-20 19:44:39 +0200 |
commit | c223ef16d7fe706becb8c815688820a6a0fa66d6 (patch) | |
tree | 064c5d983ece8ee3b3ffa50541d3f8e580ce3ef7 /gen-fac.c | |
parent | 7850a2847129193c8fe15ba0e7105d859fe6aea8 (diff) | |
download | gmp-c223ef16d7fe706becb8c815688820a6a0fa66d6.tar.gz |
+1 in the init2 argument before setbit. (Thanks Niels)
Diffstat (limited to 'gen-fac.c')
-rw-r--r-- | gen-fac.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 @@ gen_consts (int numb, int nail, int limb) 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 |