diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_remquo.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_remquo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_remquo.c b/sysdeps/ieee754/dbl-64/s_remquo.c index e07efa89f8..b081d26b0d 100644 --- a/sysdeps/ieee754/dbl-64/s_remquo.c +++ b/sysdeps/ieee754/dbl-64/s_remquo.c @@ -101,6 +101,9 @@ __remquo (double x, double y, int *quo) *quo = qs ? -cquo : cquo; + /* Ensure correct sign of zero result in round-downward mode. */ + if (x == 0.0) + x = 0.0; if (sx) x = -x; return x; |