summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr/mpfr-src/src/rint.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/rint.c')
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/rint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/rint.c b/Build/source/libs/mpfr/mpfr-src/src/rint.c
index 8e4ae2827d5..199533568a0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/rint.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/rint.c
@@ -1,6 +1,6 @@
/* mpfr_rint -- Round to an integer.
-Copyright 1999-2019 Free Software Foundation, Inc.
+Copyright 1999-2020 Free Software Foundation, Inc.
Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -136,7 +136,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mpfr_rnd_t rnd_mode)
uj = un - ui; /* lowest limb of the integer part */
idiff = exp % GMP_NUMB_BITS; /* #int-part bits in up[uj] or 0 */
- uflags = idiff == 0 || (up[uj] << idiff) == 0 ? 0 : 2;
+ uflags = idiff == 0 || MPFR_LIMB_LSHIFT(up[uj],idiff) == 0 ? 0 : 2;
if (uflags == 0)
while (uj > 0)
if (up[--uj] != 0)
@@ -191,7 +191,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mpfr_rnd_t rnd_mode)
}
if (uflags == 0)
{ /* u is an integer; determine if it is representable in r */
- if (sh != 0 && rp[0] << (GMP_NUMB_BITS - sh) != 0)
+ if (sh != 0 && MPFR_LIMB_LSHIFT(rp[0], GMP_NUMB_BITS - sh) != 0)
uflags = 1; /* u is not representable in r */
else
{
@@ -288,7 +288,7 @@ mpfr_rint (mpfr_ptr r, mpfr_srcptr u, mpfr_rnd_t rnd_mode)
MPFR_RET(0);
MPFR_ASSERTD (rnd_away >= 0); /* rounding direction is defined */
- if (rnd_away && mpn_add_1(rp, rp, rn, MPFR_LIMB_ONE << sh))
+ if (rnd_away && mpn_add_1 (rp, rp, rn, MPFR_LIMB_ONE << sh))
{
if (exp == __gmpfr_emax)
return mpfr_overflow (r, rnd_mode, sign) >= 0 ?