summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_roundl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_roundl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
index 94a62dcd6c..e4a42318b2 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
@@ -1,6 +1,6 @@
/* Round to int long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,17 +15,20 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
/* This has been coded in assembler because GCC makes such a mess of it
when it's coded in C. */
+#define NO_MATH_REDIRECT
#include <math.h>
#include <math_private.h>
#include <math_ldbl_opt.h>
#include <float.h>
#include <ieee754.h>
+double round (double) asm ("__round");
+
long double
__roundl (long double x)
@@ -39,7 +42,7 @@ __roundl (long double x)
&& __builtin_isless (__builtin_fabs (xh),
__builtin_inf ()), 1))
{
- hi = __round (xh);
+ hi = round (xh);
if (hi != xh)
{
/* The high part is not an integer; the low part only
@@ -62,7 +65,7 @@ __roundl (long double x)
else
{
/* The high part is a nonzero integer. */
- lo = __round (xl);
+ lo = round (xl);
if (fabs (lo - xl) == 0.5)
{
if (xh > 0 && xl < 0)