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

Alexandre Julliard julliard at winehq.org
Tue Aug 18 16:34:24 CDT 2020


Module: wine
Branch: master
Commit: cb7b23a3f06824c43dd492f41abab78b96a53b88
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cb7b23a3f06824c43dd492f41abab78b96a53b88

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Aug 18 18:19:50 2020 +0200

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/math.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index abb9ef0a9c..a75b551210 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -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 */




More information about the wine-cvs mailing list