mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-23 22:52:23 +03:00
Merge remote-tracking branch 'nsz/master'
This commit is contained in:
commit
9cfa3065c5
@ -44,7 +44,7 @@ double remquo(double x, double y, int *quo)
|
||||
goto fixup;
|
||||
}
|
||||
if (lx == ly) { /* |x| = |y| return x*0 */
|
||||
*quo = 1;
|
||||
*quo = sxy ? -1 : 1;
|
||||
return Zero[(uint32_t)sx>>31];
|
||||
}
|
||||
}
|
||||
@ -127,6 +127,7 @@ double remquo(double x, double y, int *quo)
|
||||
|
||||
/* convert back to floating value and restore the sign */
|
||||
if ((hx|lx) == 0) { /* return sign(x)*0 */
|
||||
q &= 0x7fffffff;
|
||||
*quo = sxy ? -q : q;
|
||||
return Zero[(uint32_t)sx>>31];
|
||||
}
|
||||
@ -144,10 +145,10 @@ double remquo(double x, double y, int *quo)
|
||||
hx >>= n;
|
||||
} else if (n <= 31) {
|
||||
lx = (hx<<(32-n))|(lx>>n);
|
||||
hx = sx;
|
||||
hx = 0;
|
||||
} else {
|
||||
lx = hx>>(n-32);
|
||||
hx = sx;
|
||||
hx = 0;
|
||||
}
|
||||
}
|
||||
fixup:
|
||||
|
@ -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];
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ long double remquol(long double x, long double y, int *quo)
|
||||
goto fixup; /* |x|<|y| return x or x-y */
|
||||
}
|
||||
if (ux.bits.manh == uy.bits.manh && ux.bits.manl == uy.bits.manl) {
|
||||
*quo = 1;
|
||||
*quo = sxy ? -1 : 1;
|
||||
return Zero[sx]; /* |x|=|y| return x*0*/
|
||||
}
|
||||
}
|
||||
@ -152,6 +152,7 @@ long double remquol(long double x, long double y, int *quo)
|
||||
|
||||
/* convert back to floating value and restore the sign */
|
||||
if ((hx|lx) == 0) { /* return sign(x)*0 */
|
||||
q &= 0x7fffffff;
|
||||
*quo = sxy ? -q : q;
|
||||
return Zero[sx];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user