diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/s_remquol.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-96/s_remquol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-96/s_remquol.c b/sysdeps/ieee754/ldbl-96/s_remquol.c index 1462b54456..8d6b10ed61 100644 --- a/sysdeps/ieee754/ldbl-96/s_remquol.c +++ b/sysdeps/ieee754/ldbl-96/s_remquol.c @@ -101,6 +101,9 @@ __remquol (long double x, long double p, 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; |