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:
parent
9e3b3c9bac
commit
70c338c27a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue