summaryrefslogtreecommitdiff
path: root/libm/s_nextafter.c
diff options
context:
space:
mode:
Diffstat (limited to 'libm/s_nextafter.c')
-rw-r--r--libm/s_nextafter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libm/s_nextafter.c b/libm/s_nextafter.c
index ee4621cc7..73a8ab2be 100644
--- a/libm/s_nextafter.c
+++ b/libm/s_nextafter.c
@@ -32,7 +32,7 @@ double nextafter(double x, double y)
if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || /* x is nan */
((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) /* y is nan */
return x+y;
- if(x==y) return x; /* x=y, return x */
+ if(x==y) return y; /* x=y, return y */
if((ix|lx)==0) { /* x == 0 */
INSERT_WORDS(x,hy&0x80000000,1); /* return +-minsubnormal */
y = x*x;
@@ -68,3 +68,5 @@ double nextafter(double x, double y)
return x;
}
libm_hidden_def(nextafter)
+strong_alias_untyped(nextafter, nexttoward)
+libm_hidden_def(nexttoward)