Commit d20b89cf authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

msvcrt: Don't set errno in sqrt(f) if x is positive infinity.

parent 57cdf8bf
...@@ -279,7 +279,7 @@ float CDECL MSVCRT_sinhf( float x ) ...@@ -279,7 +279,7 @@ float CDECL MSVCRT_sinhf( float x )
*/ */
float CDECL MSVCRT_sqrtf( float x ) float CDECL MSVCRT_sqrtf( float x )
{ {
if (x < 0.0 || !finitef(x)) *MSVCRT__errno() = MSVCRT_EDOM; if (x < 0.0) *MSVCRT__errno() = MSVCRT_EDOM;
return sqrtf(x); return sqrtf(x);
} }
...@@ -476,7 +476,7 @@ double CDECL MSVCRT_sinh( double x ) ...@@ -476,7 +476,7 @@ double CDECL MSVCRT_sinh( double x )
*/ */
double CDECL MSVCRT_sqrt( double x ) double CDECL MSVCRT_sqrt( double x )
{ {
if (x < 0.0 || !isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM; if (x < 0.0) *MSVCRT__errno() = MSVCRT_EDOM;
return sqrt(x); return sqrt(x);
} }
......
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