summaryrefslogtreecommitdiff
path: root/powerof2.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-06-14 11:42:25 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-06-14 11:42:25 +0000
commitcdc54783e3c5a86457e18fd2ff1838e75b701ecd (patch)
tree0ae23606578f47d8429b80fb628a789165c3e3bd /powerof2.c
parentc03adfb9dbc0d1cb1701c5a4429e2424348925ef (diff)
downloadmpfr-cdc54783e3c5a86457e18fd2ff1838e75b701ecd.tar.gz
Replace check for a power of 2 for the high limb by a check
for "high bit limb" for the high limb. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3653 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'powerof2.c')
-rw-r--r--powerof2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/powerof2.c b/powerof2.c
index 9a5dc198e..1e6327c95 100644
--- a/powerof2.c
+++ b/powerof2.c
@@ -1,6 +1,6 @@
/* mpfr_powerof2_raw -- test whether a floating-point number is a power of 2
-Copyright 2002, 2003, 2004 Free Software Foundation.
+Copyright 2002, 2003, 2004, 2005 Free Software Foundation.
This file is part of the MPFR Library.
@@ -35,7 +35,8 @@ mpfr_powerof2_raw (mpfr_srcptr x)
MPFR_ASSERTN(MPFR_IS_PURE_FP(x)); */
xp = MPFR_MANT(x);
xn = (MPFR_PREC(x) - 1) / BITS_PER_MP_LIMB;
- if (NOT_POW2(xp[xn]))
+ /*if (NOT_POW2(xp[xn]))*/
+ if (xp[xn] != MPFR_LIMB_HIGHBIT)
return 0;
while (xn > 0)
if (xp[--xn] != 0)