aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c b/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c
index 515aa1e..0d6469d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c
@@ -87,6 +87,9 @@ long double __nextafterl(long double x, long double y)
math_force_eval (u); /* raise underflow flag */
__set_errno (ERANGE);
}
+ /* Avoid returning -0 in FE_DOWNWARD mode. */
+ if (x == 0.0L)
+ return 0.0L;
return x;
}
/* If the high double is an exact power of two and the low