summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/s_remquol.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_remquol.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_remquol.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_remquol.c b/sysdeps/ieee754/ldbl-128/s_remquol.c
index 7356f5f4ef..2fcea6ecdf 100644
--- a/sysdeps/ieee754/ldbl-128/s_remquol.c
+++ b/sysdeps/ieee754/ldbl-128/s_remquol.c
@@ -1,5 +1,5 @@
/* Compute remainder and a congruent to the quotient.
- 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.
@@ -21,16 +21,17 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-ldouble.h>
-static const long double zero = 0.0;
+static const _Float128 zero = 0.0;
-long double
-__remquol (long double x, long double y, int *quo)
+_Float128
+__remquol (_Float128 x, _Float128 y, int *quo)
{
int64_t hx,hy;
- u_int64_t sx,lx,ly,qs;
+ uint64_t sx,lx,ly,qs;
int cquo;
GET_LDOUBLE_WORDS64 (hx, lx, x);
@@ -87,7 +88,7 @@ __remquol (long double x, long double y, int *quo)
}
else
{
- long double y_half = 0.5L * y;
+ _Float128 y_half = L(0.5) * y;
if (x > y_half)
{
x -= y;
@@ -103,10 +104,10 @@ __remquol (long double x, long double y, int *quo)
*quo = qs ? -cquo : cquo;
/* Ensure correct sign of zero result in round-downward mode. */
- if (x == 0.0L)
- x = 0.0L;
+ if (x == 0)
+ x = 0;
if (sx)
x = -x;
return x;
}
-weak_alias (__remquol, remquol)
+libm_alias_ldouble (__remquo, remquo)