about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/s_lrintl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_lrintl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_lrintl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_lrintl.c b/sysdeps/ieee754/ldbl-128/s_lrintl.c
index b0e0cfc16b..d0b0aeb5c9 100644
--- a/sysdeps/ieee754/ldbl-128/s_lrintl.c
+++ b/sysdeps/ieee754/ldbl-128/s_lrintl.c
@@ -45,20 +45,20 @@ __lrintl (long double x)
   i0 &= 0x0000ffffffffffffLL;
   i0 |= 0x0001000000000000LL;
 
-  if (j0 < 48)
+  if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
     {
-      w = two112[sx] + x;
-      t = w - two112[sx];
-      GET_LDOUBLE_WORDS64 (i0, i1, t);
-      j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
-      i0 &= 0x0000ffffffffffffLL;
-      i0 |= 0x0001000000000000LL;
+      if (j0 < 48)
+	{
+	  w = two112[sx] + x;
+	  t = w - two112[sx];
+	  GET_LDOUBLE_WORDS64 (i0, i1, t);
+	  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+	  i0 &= 0x0000ffffffffffffLL;
+	  i0 |= 0x0001000000000000LL;
 
-      result = (j0 < 0 ? 0 : i0 >> (48 - j0));
-    }
-  else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
-    {
-      if (j0 >= 112)
+	  result = (j0 < 0 ? 0 : i0 >> (48 - j0));
+	}
+      else if (j0 >= 112)
 	result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
       else
 	{