diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_truncl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/s_truncl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c index a915a01ac6..163492f22c 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c @@ -1,6 +1,6 @@ /* Truncate (toward zero) 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,14 +15,19 @@ 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/>. */ +#define NO_MATH_REDIRECT #include <math.h> #include <math_private.h> #include <math_ldbl_opt.h> #include <float.h> #include <ieee754.h> +double ceil (double) asm ("__ceil"); +double floor (double) asm ("__floor"); +double trunc (double) asm ("__trunc"); + long double __truncl (long double x) @@ -36,7 +41,7 @@ __truncl (long double x) && __builtin_isless (__builtin_fabs (xh), __builtin_inf ()), 1)) { - hi = __trunc (xh); + hi = trunc (xh); if (hi != xh) { /* The high part is not an integer; the low part does not @@ -47,7 +52,7 @@ __truncl (long double x) else { /* The high part is a nonzero integer. */ - lo = xh > 0 ? __floor (xl) : __ceil (xl); + lo = xh > 0 ? floor (xl) : ceil (xl); xh = hi; xl = lo; ldbl_canonicalize_int (&xh, &xl); |