-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <Geoff.Keating@anu.edu.au>, 1997.
for (i = SIZE - 1; i > 0; i--)
if (SRC_PTR[i] != 0)
break;
- for (j = mpbpl - 1; j > 0; j--)
- if ((SRC_PTR[i] & 1 << j) != 0)
+ for (j = mpbpl - 1; j >= 0; j--)
+ if ((SRC_PTR[i] & (mp_limb_t)1 << j) != 0)
break;
- return i * 32 + j;
+ return i * mpbpl + j;
}
int
e2s = mpn_bitsize (e2,SZ);
e3s = mpn_bitsize (e3,SZ);
- if (e3s > 1 && e2s - e3s < 54)
+ if (e3s >= 0 && e2s - e3s < 54)
{
#if PRINT_ERRORS
printf ("%06x ", i * (0x100000 / (1 << N2)));
memset (e2, '\0', sizeof (mp1));
for (i = -1; i < 100 && i < FRAC / 4; i++)
- e2[(FRAC - i * 4 - 4) / mpbpl] |= (strchr (hexdig, exp1[i + 1]) - hexdig
+ e2[(FRAC - i * 4 - 4) / mpbpl] |= ((strchr (hexdig, exp1[i + 1]) - hexdig)
<< (FRAC - i * 4 - 4) % mpbpl);
if (mpn_cmp (ex, e2, SZ) >= 0)