summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-96/s_llroundl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/s_llroundl.c')
-rw-r--r--sysdeps/ieee754/ldbl-96/s_llroundl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/ieee754/ldbl-96/s_llroundl.c b/sysdeps/ieee754/ldbl-96/s_llroundl.c
index 4a537c871e..61df42d3c2 100644
--- a/sysdeps/ieee754/ldbl-96/s_llroundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_llroundl.c
@@ -1,5 +1,5 @@
/* Round long double value to long long int.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -59,13 +59,13 @@ __llroundl (long double x)
else
{
u_int32_t j = i1 + (0x80000000 >> (j0 - 31));
+
+ result = (long long int) i0;
if (j < i1)
- ++i0;
+ ++result;
- if (j0 == 31)
- result = (long long int) i0;
- else
- result = ((long long int) i0 << (j0 - 31)) | (j >> (63 - j0));
+ if (j0 > 31)
+ result = (result << (j0 - 31)) | (j >> (63 - j0));
}
}
else