diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-05-10 22:25:14 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-05-10 22:25:14 -0400 |
commit | 9cfa3065c576e83949d659df0bba59e901671bc3 (patch) | |
tree | e694573164b6ca1a2123cc2bc4b429a62f3acaa2 /src/math/remquof.c | |
parent | 47c2a22fd6adcaf3f27b093df49bd97e3fdc16e7 (diff) | |
parent | 3738a96e052603403e085e9a1024289ba3e09188 (diff) | |
download | musl-9cfa3065c576e83949d659df0bba59e901671bc3.tar.gz musl-9cfa3065c576e83949d659df0bba59e901671bc3.tar.bz2 musl-9cfa3065c576e83949d659df0bba59e901671bc3.tar.xz musl-9cfa3065c576e83949d659df0bba59e901671bc3.zip |
Merge remote-tracking branch 'nsz/master'
Diffstat (limited to 'src/math/remquof.c')
-rw-r--r-- | src/math/remquof.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/math/remquof.c b/src/math/remquof.c index 11569ce8..536a050a 100644 --- a/src/math/remquof.c +++ b/src/math/remquof.c @@ -41,7 +41,7 @@ float remquof(float x, float y, int *quo) q = 0; goto fixup; } else if(hx==hy) { /* |x| = |y| return x*0*/ - *quo = 1; + *quo = sxy ? -1 : 1; return Zero[(uint32_t)sx>>31]; } @@ -92,6 +92,7 @@ float 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[(uint32_t)sx>>31]; } |