aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm/s_remquol.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_remquol.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_remquol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_remquol.c b/sysdeps/ieee754/ldbl-128ibm/s_remquol.c
index ac22879..57c5059 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_remquol.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_remquol.c
@@ -107,6 +107,9 @@ __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 (sx)
x = -x;
return x;