summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-10-26 11:59:59 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-10-26 11:59:59 +0000
commitda4b19c01ec0e27d42071d294e29fc56e1a1b16a (patch)
tree393496f9c6cc54d9bcde0fc0d77691fdcfdf255a /random.c
parent33336e9a85f1ae242191e1b2286cded95f11362b (diff)
downloadmpfr-da4b19c01ec0e27d42071d294e29fc56e1a1b16a.tar.gz
protected all macros: xxx -> MPFR_xxx
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@786 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'random.c')
-rw-r--r--random.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/random.c b/random.c
index abee88b38..c3aa3b8c9 100644
--- a/random.c
+++ b/random.c
@@ -25,7 +25,7 @@ MA 02111-1307, USA. */
#include "longlong.h"
#include "mpfr.h"
-/* Computes a random mpfr in [0, 1[ with precision PREC */
+/* Computes a random mpfr in [0, 1[ with precision MPFR_PREC */
extern long random _PROTO((void));
extern int srandom _PROTO((unsigned int));
@@ -45,9 +45,9 @@ mpfr_random(x)
mpfr_ptr x;
#endif
{
- mp_limb_t *xp; unsigned long xn, i, cnt, prec=PREC(x);
+ mp_limb_t *xp; unsigned long xn, i, cnt, prec=MPFR_PREC(x);
- xp = MANT(x);
+ xp = MPFR_MANT(x);
xn = (prec-1)/BITS_PER_MP_LIMB + 1;
for (i = 0; i < xn; i++)
@@ -60,7 +60,7 @@ mpfr_random(x)
count_leading_zeros(cnt, xp[xn - 1]);
if (cnt) mpn_lshift(xp, xp, xn, cnt);
- EXP(x) = -cnt;
+ MPFR_EXP(x) = -cnt;
cnt = xn*BITS_PER_MP_LIMB - prec;
/* cnt is the number of non significant bits in the low limb */