diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_llroundl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_llroundl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_llroundl.c b/sysdeps/ieee754/ldbl-128/s_llroundl.c index 9129c15e1f..b4609cdfd0 100644 --- a/sysdeps/ieee754/ldbl-128/s_llroundl.c +++ b/sysdeps/ieee754/ldbl-128/s_llroundl.c @@ -1,5 +1,5 @@ /* Round long double value to long long int. - 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. @@ -58,7 +58,10 @@ __llroundl (long double x) if (j < i1) ++i0; - result = ((long long int) i0 << (j0 - 48)) | (j >> (112 - j0)); + if (j0 == 48) + result = (long long int) i0; + else + result = ((long long int) i0 << (j0 - 48)) | (j >> (112 - j0)); } } else |