summaryrefslogtreecommitdiff
path: root/urandomb.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-05-24 16:37:13 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-05-24 16:37:13 +0000
commit852607606530c46f2217674f7e92347a475948d2 (patch)
treedff80b23d08073668564bf464f3b0f03e62d9468 /urandomb.c
parent3aab76740d9655f767f047405691be957e92d63e (diff)
downloadmpfr-852607606530c46f2217674f7e92347a475948d2.tar.gz
removed 3rd argument (use PREC(rop) instead)
added include longlong.h git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@544 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'urandomb.c')
-rw-r--r--urandomb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/urandomb.c b/urandomb.c
index fd7be497d..a8e779a59 100644
--- a/urandomb.c
+++ b/urandomb.c
@@ -25,24 +25,25 @@ MA 02111-1307, USA. */
#include <stdio.h>
#include "gmp.h"
#include "gmp-impl.h"
+#include "longlong.h"
#include "mpfr.h"
void
#if __STDC__
-mpfr_urandomb (mpfr_t rop, gmp_randstate_t rstate, unsigned long int nbits)
+mpfr_urandomb (mpfr_t rop, gmp_randstate_t rstate)
#else
-mpfr_urandomb (rop, rstate, nbits)
+mpfr_urandomb (rop, rstate)
mpfr_t rop;
gmp_randstate_t rstate;
- unsigned long int nbits;
#endif
{
mp_ptr rp;
mp_size_t nlimbs;
mp_exp_t exp;
- unsigned long cnt;
+ unsigned long cnt, nbits;
- rp = PTR (rop);
+ rp = MANT(rop);
+ nbits = PREC(rop);
nlimbs = (nbits + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB;
_gmp_rand (rp, rstate, nbits);
@@ -71,5 +72,4 @@ mpfr_urandomb (rop, rstate, nbits)
rp[0] &= ~((((mp_limb_t)1)<<cnt) - 1);
EXP (rop) = exp;
- SIZ (rop) = nlimbs;
}