summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/s_remquof.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msun/src/s_remquof.c')
-rw-r--r--lib/msun/src/s_remquof.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/msun/src/s_remquof.c b/lib/msun/src/s_remquof.c
index 3141642..f7b4c00 100644
--- a/lib/msun/src/s_remquof.c
+++ b/lib/msun/src/s_remquof.c
@@ -46,7 +46,7 @@ remquof(float x, float y, int *quo)
q = 0;
goto fixup; /* |x|<|y| return x or x-y */
} else if(hx==hy) {
- *quo = 1;
+ *quo = (sxy ? -1 : 1);
return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/
}
@@ -88,6 +88,7 @@ remquof(float x, float y, int *quo)
/* convert back to floating value and restore the sign */
if(hx==0) { /* return sign(x)*0 */
+ q &= 0x7fffffff;
*quo = (sxy ? -q : q);
return Zero[(u_int32_t)sx>>31];
}
OpenPOWER on IntegriCloud