diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-01-18 08:42:27 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-01-18 08:42:27 +0000 |
commit | baad37cb1975dd5791ba85b70d6b919ec888e33c (patch) | |
tree | 5777d8ce5a212d122f364d8d34000602791cc802 /cmp.c | |
parent | f9c0329541bcc19a0ee318c0fbecb2cf0c6f9176 (diff) | |
download | mpfr-baad37cb1975dd5791ba85b70d6b919ec888e33c.tar.gz |
fixed bug in mpfr_cmp2 (found on the IA64)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@981 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'cmp.c')
-rw-r--r-- | cmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -185,7 +185,10 @@ mpfr_cmp2(b, c) /* bn < 0; if some limb of c is nonzero, return k+1, otherwise return k*/ - if (cn>=0 && (cp[cn--] << (BITS_PER_MP_LIMB - d))) { return k+1; } + /* if d < BITS_PER_MP_LIMB, only the last d bits of cp[cn] have to be + considered, otherwise all bits */ + if (d < BITS_PER_MP_LIMB) + if (cn>=0 && (cp[cn--] << (BITS_PER_MP_LIMB - d))) { return k+1; } while (cn >= 0) if (cp[cn--]) return k+1; |