summaryrefslogtreecommitdiff
path: root/mpf
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2009-12-20 23:54:57 +0100
committerTorbjorn Granlund <tege@gmplib.org>2009-12-20 23:54:57 +0100
commit3ba1597c34eeddef0c820863d98ed9506c8d3e9c (patch)
tree967966420d447f3e630ca1cc85709b7f9c1e03af /mpf
parenta6426a5313cac3c0fb05358e7d254653222f745f (diff)
downloadgmp-3ba1597c34eeddef0c820863d98ed9506c8d3e9c.tar.gz
Change all bit counts for bignums to use mp_bitcnt_t. Update documentation.
Diffstat (limited to 'mpf')
-rw-r--r--mpf/div_2exp.c2
-rw-r--r--mpf/eq.c2
-rw-r--r--mpf/get_dfl_prec.c2
-rw-r--r--mpf/get_prc.c2
-rw-r--r--mpf/init2.c2
-rw-r--r--mpf/mul_2exp.c2
-rw-r--r--mpf/set_dfl_prec.c2
-rw-r--r--mpf/set_prc.c2
-rw-r--r--mpf/set_prc_raw.c2
-rw-r--r--mpf/urandomb.c2
10 files changed, 10 insertions, 10 deletions
diff --git a/mpf/div_2exp.c b/mpf/div_2exp.c
index eea5de3bc..f74cd8bcd 100644
--- a/mpf/div_2exp.c
+++ b/mpf/div_2exp.c
@@ -65,7 +65,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
then use that mpn_rshift. */
void
-mpf_div_2exp (mpf_ptr r, mpf_srcptr u, unsigned long int exp)
+mpf_div_2exp (mpf_ptr r, mpf_srcptr u, mp_bitcnt_t exp)
{
mp_srcptr up;
mp_ptr rp = r->_mp_d;
diff --git a/mpf/eq.c b/mpf/eq.c
index 5f4d9b642..cdbbcb96d 100644
--- a/mpf/eq.c
+++ b/mpf/eq.c
@@ -23,7 +23,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "longlong.h"
int
-mpf_eq (mpf_srcptr u, mpf_srcptr v, unsigned long int n_bits)
+mpf_eq (mpf_srcptr u, mpf_srcptr v, mp_bitcnt_t n_bits)
{
mp_srcptr up, vp, p;
mp_size_t usize, vsize, minsize, maxsize, n_limbs, i, size;
diff --git a/mpf/get_dfl_prec.c b/mpf/get_dfl_prec.c
index a44adbbe5..e48a3a1f4 100644
--- a/mpf/get_dfl_prec.c
+++ b/mpf/get_dfl_prec.c
@@ -21,7 +21,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp-impl.h"
-unsigned long
+mp_bitcnt_t
mpf_get_default_prec (void)
{
return __GMPF_PREC_TO_BITS (__gmp_default_fp_limb_precision);
diff --git a/mpf/get_prc.c b/mpf/get_prc.c
index 6061063ac..c413582b9 100644
--- a/mpf/get_prc.c
+++ b/mpf/get_prc.c
@@ -20,7 +20,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp.h"
#include "gmp-impl.h"
-unsigned long int
+mp_bitcnt_t
mpf_get_prec (mpf_srcptr x)
{
return __GMPF_PREC_TO_BITS (x->_mp_prec);
diff --git a/mpf/init2.c b/mpf/init2.c
index 8fc4b938a..8298a6b80 100644
--- a/mpf/init2.c
+++ b/mpf/init2.c
@@ -21,7 +21,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp-impl.h"
void
-mpf_init2 (mpf_ptr r, unsigned long int prec_in_bits)
+mpf_init2 (mpf_ptr r, mp_bitcnt_t prec_in_bits)
{
mp_size_t prec;
diff --git a/mpf/mul_2exp.c b/mpf/mul_2exp.c
index bd7df9c46..5ec70e46a 100644
--- a/mpf/mul_2exp.c
+++ b/mpf/mul_2exp.c
@@ -59,7 +59,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
then use that mpn_rshift. */
void
-mpf_mul_2exp (mpf_ptr r, mpf_srcptr u, unsigned long int exp)
+mpf_mul_2exp (mpf_ptr r, mpf_srcptr u, mp_bitcnt_t exp)
{
mp_srcptr up;
mp_ptr rp = r->_mp_d;
diff --git a/mpf/set_dfl_prec.c b/mpf/set_dfl_prec.c
index 5266745be..df5248860 100644
--- a/mpf/set_dfl_prec.c
+++ b/mpf/set_dfl_prec.c
@@ -23,7 +23,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
mp_size_t __gmp_default_fp_limb_precision = __GMPF_BITS_TO_PREC (53);
void
-mpf_set_default_prec (unsigned long int prec_in_bits)
+mpf_set_default_prec (mp_bitcnt_t prec_in_bits)
{
__gmp_default_fp_limb_precision = __GMPF_BITS_TO_PREC (prec_in_bits);
}
diff --git a/mpf/set_prc.c b/mpf/set_prc.c
index 52f44aa45..873b12e85 100644
--- a/mpf/set_prc.c
+++ b/mpf/set_prc.c
@@ -28,7 +28,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
inconsistent. */
void
-mpf_set_prec (mpf_ptr x, unsigned long int new_prec_in_bits)
+mpf_set_prec (mpf_ptr x, mp_bitcnt_t new_prec_in_bits)
{
mp_size_t old_prec, new_prec, new_prec_plus1;
mp_size_t size, sign;
diff --git a/mpf/set_prc_raw.c b/mpf/set_prc_raw.c
index f6c6ac345..c42e7a0dc 100644
--- a/mpf/set_prc_raw.c
+++ b/mpf/set_prc_raw.c
@@ -23,7 +23,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp-impl.h"
void
-mpf_set_prec_raw (mpf_ptr x, unsigned long int prec_in_bits)
+mpf_set_prec_raw (mpf_ptr x, mp_bitcnt_t prec_in_bits)
{
x->_mp_prec = __GMPF_BITS_TO_PREC (prec_in_bits);
}
diff --git a/mpf/urandomb.c b/mpf/urandomb.c
index 41a4bc3c3..02307e0fa 100644
--- a/mpf/urandomb.c
+++ b/mpf/urandomb.c
@@ -24,7 +24,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp-impl.h"
void
-mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, unsigned long int nbits)
+mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, mp_bitcnt_t nbits)
{
mp_ptr rp;
mp_size_t nlimbs;