Commit 11166aa0 authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

msvcrt: Make the sinh function NAN preserving.

parent 60d178b4
...@@ -4046,6 +4046,7 @@ double CDECL sin( double x ) ...@@ -4046,6 +4046,7 @@ double CDECL sin( double x )
double CDECL sinh( double x ) double CDECL sinh( double x )
{ {
UINT64 ux = *(UINT64*)&x; UINT64 ux = *(UINT64*)&x;
UINT64 sign = ux & 0x8000000000000000ULL;
UINT32 w; UINT32 w;
double t, h, absx; double t, h, absx;
...@@ -4070,7 +4071,10 @@ double CDECL sinh( double x ) ...@@ -4070,7 +4071,10 @@ double CDECL sinh( double x )
/* |x| > log(DBL_MAX) or nan */ /* |x| > log(DBL_MAX) or nan */
/* note: the result is stored to handle overflow */ /* note: the result is stored to handle overflow */
t = __expo2(absx, 2 * h); if (ux > 0x7ff0000000000000ULL)
*(UINT64*)&t = ux | sign | 0x0008000000000000ULL;
else
t = __expo2(absx, 2 * h);
return t; return t;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment