diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_lrintl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_lrintl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_lrintl.c b/sysdeps/ieee754/ldbl-128/s_lrintl.c index 350b100b9b..66f9a429fc 100644 --- a/sysdeps/ieee754/ldbl-128/s_lrintl.c +++ b/sysdeps/ieee754/ldbl-128/s_lrintl.c @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and Jakub Jelinek <jj@ultra.linux.cz>, 1999. @@ -75,7 +75,10 @@ __lrintl (long double x) i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; - result = ((long int) i0 << (j0 - 48)) | (i1 >> (112 - j0)); + if (j0 == 48) + result = (long int) i0; + else + result = ((long int) i0 << (j0 - 48)) | (i1 >> (112 - j0)); } } else |