summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/s_llroundl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_llroundl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_llroundl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_llroundl.c b/sysdeps/ieee754/ldbl-128/s_llroundl.c
index bfc81cc534..1973e1bffd 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-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 long int
-__llroundl (long double x)
+__llroundl (_Float128 x)
{
int64_t j0;
- u_int64_t i1, i0;
+ uint64_t i1, i0;
long long int result;
int sign;
@@ -55,7 +56,7 @@ __llroundl (long double x)
result = ((long 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;
@@ -79,13 +80,13 @@ __llroundl (long double x)
unspecified. */
#ifdef FE_INVALID
if (FIX_LDBL_LLONG_CONVERT_OVERFLOW
- && !(sign == -1 && x > (long double) LLONG_MIN - 0.5L))
+ && !(sign == -1 && x > (_Float128) LLONG_MIN - L(0.5)))
{
feraiseexcept (FE_INVALID);
return sign == 1 ? LLONG_MAX : LLONG_MIN;
}
else if (!FIX_LDBL_LLONG_CONVERT_OVERFLOW
- && x <= (long double) LLONG_MIN - 0.5L)
+ && x <= (_Float128) LLONG_MIN - L(0.5))
{
/* If truncation produces LLONG_MIN, the cast will not raise
the exception, but may raise "inexact". */
@@ -99,4 +100,4 @@ __llroundl (long double x)
return sign * result;
}
-weak_alias (__llroundl, llroundl)
+libm_alias_ldouble (__llround, llround)