msvcrt: Don't set errno in _logb(f) if x is ±INF.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-07-27 02:26:24 -06:00 committed by Alexandre Julliard
parent 9e3b3c9bac
commit 70c338c27a
1 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ INT CDECL MSVCRT__isnanf( float num )
*/
float CDECL MSVCRT__logbf( float num )
{
if (!finitef(num)) *MSVCRT__errno() = MSVCRT_EDOM;
if (isnanf(num)) *MSVCRT__errno() = MSVCRT_EDOM;
else if (!num) *MSVCRT__errno() = MSVCRT_ERANGE;
return logbf(num);
}
@ -789,7 +789,7 @@ __int64 CDECL _abs64( __int64 n )
*/
double CDECL MSVCRT__logb(double num)
{
if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
if (isnan(num)) *MSVCRT__errno() = MSVCRT_EDOM;
else if (!num) *MSVCRT__errno() = MSVCRT_ERANGE;
return logb(num);
}