msvcrt: Fix acosf implementation when returning Pi or Pi/2.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49718
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-08-18 18:19:50 +02:00 committed by Alexandre Julliard
parent 3786462a56
commit cb7b23a3f0
1 changed files with 2 additions and 2 deletions

View File

@ -259,7 +259,7 @@ float CDECL MSVCRT_acosf( float x )
if (ix >= 0x3f800000) {
if (ix == 0x3f800000) {
if (hx >> 31)
return 2 * pio2_hi + 7.5231638453e-37;
return 2 * pio2_lo + 2 * pio2_hi + 7.5231638453e-37;
return 0;
}
if (MSVCRT__isnanf(x)) return x;
@ -268,7 +268,7 @@ float CDECL MSVCRT_acosf( float x )
/* |x| < 0.5 */
if (ix < 0x3f000000) {
if (ix <= 0x32800000) /* |x| < 2**-26 */
return pio2_hi + 7.5231638453e-37;
return pio2_lo + pio2_hi + 7.5231638453e-37;
return pio2_hi - (x - (pio2_lo - x * acosf_R(x * x)));
}
/* x < -0.5 */