Martin Storsjo : msvcrt: Make the sinhf function NAN preserving.

Alexandre Julliard julliard at winehq.org
Wed Jul 28 15:37:42 CDT 2021


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

Author: Martin Storsjo <martin at martin.st>
Date:   Wed Jul 28 14:41:57 2021 +0200

msvcrt: Make the sinhf function NAN preserving.

Signed-off-by: Martin Storsjo <martin at martin.st>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 92bf12b4d54..29912431bcd 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -1699,7 +1699,10 @@ float CDECL sinhf( float x )
     }
 
     /* |x| > logf(FLT_MAX) or nan */
-    t = __expo2f(absx, 2 * h);
+    if (ui > 0x7f800000)
+        *(DWORD*)&t = *(DWORD*)&x | 0x400000;
+    else
+        t = __expo2f(absx, 2 * h);
     return t;
 }
 




More information about the wine-cvs mailing list