summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/s_llrintl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_llrintl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_llrintl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_llrintl.c b/sysdeps/ieee754/ldbl-128/s_llrintl.c
index ee66454e2f..5804f57d11 100644
--- a/sysdeps/ieee754/ldbl-128/s_llrintl.c
+++ b/sysdeps/ieee754/ldbl-128/s_llrintl.c
@@ -48,8 +48,6 @@ __llrintl (long double x)
if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
{
- if (j0 < -1)
- return 0;
w = two112[sx] + x;
t = w - two112[sx];
GET_LDOUBLE_WORDS64 (i0, i1, t);
@@ -57,7 +55,9 @@ __llrintl (long double x)
i0 &= 0x0000ffffffffffffLL;
i0 |= 0x0001000000000000LL;
- if (j0 <= 48)
+ if (j0 < 0)
+ result = 0;
+ else if (j0 <= 48)
result = i0 >> (48 - j0);
else
result = ((long long int) i0 << (j0 - 48)) | (i1 >> (112 - j0));