summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/s_lroundl.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:51:23 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:51:23 +0000
commit9a47d57c4784163dcf838c7461c53de29ca7a61f (patch)
tree80c130f3da27db25996b0a5f93270df554dcd8b4 /sysdeps/ieee754/ldbl-128/s_lroundl.c
parente0b77a51a258fc7554aeb194ac6b219ee3078f0d (diff)
parent82dd75a7f436a19047325d62182590c9f9e23a78 (diff)
Merge branch 't/tls' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_lroundl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_lroundl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_lroundl.c b/sysdeps/ieee754/ldbl-128/s_lroundl.c
index f03262543f..f109157d67 100644
--- a/sysdeps/ieee754/ldbl-128/s_lroundl.c
+++ b/sysdeps/ieee754/ldbl-128/s_lroundl.c
@@ -1,5 +1,5 @@
/* Round long double value to long int.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 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.
@@ -23,13 +23,14 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-ldouble.h>
#include <fix-fp-int-convert-overflow.h>
long int
-__lroundl (long double x)
+__lroundl (_Float128 x)
{
int64_t j0;
- u_int64_t i1, i0;
+ uint64_t i1, i0;
long int result;
int sign;
@@ -62,7 +63,7 @@ __lroundl (long double x)
result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
else
{
- u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
+ uint64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
if (j < i1)
++i0;
@@ -88,13 +89,13 @@ __lroundl (long double x)
unspecified. */
#ifdef FE_INVALID
if (FIX_LDBL_LONG_CONVERT_OVERFLOW
- && !(sign == -1 && x > (long double) LONG_MIN - 0.5L))
+ && !(sign == -1 && x > (_Float128) LONG_MIN - L(0.5)))
{
feraiseexcept (FE_INVALID);
return sign == 1 ? LONG_MAX : LONG_MIN;
}
else if (!FIX_LDBL_LONG_CONVERT_OVERFLOW
- && x <= (long double) LONG_MIN - 0.5L)
+ && x <= (_Float128) LONG_MIN - L(0.5))
{
/* If truncation produces LONG_MIN, the cast will not raise
the exception, but may raise "inexact". */
@@ -110,4 +111,4 @@ __lroundl (long double x)
return sign * result;
}
-weak_alias (__lroundl, lroundl)
+libm_alias_ldouble (__lround, lround)