fix(FPEnvironment): Visual Studio Warning C4244 #3543

This commit is contained in:
Alex Fabijanic 2022-04-26 22:14:09 -05:00
parent 1aee1c25b7
commit 7f26310ef2

View File

@ -106,8 +106,8 @@ inline bool FPEnvironmentImpl::isInfiniteImpl(double value)
inline bool FPEnvironmentImpl::isInfiniteImpl(long double value)
{
if (_isnan(value) != 0) return false;
return _finite(value) == 0;
if (_isnan(static_cast<double>(value)) != 0) return false;
return _finite(static_cast<double>(value)) == 0;
}
@ -125,7 +125,7 @@ inline bool FPEnvironmentImpl::isNaNImpl(double value)
inline bool FPEnvironmentImpl::isNaNImpl(long double value)
{
return _isnan(value) != 0;
return _isnan(static_cast<double>(value)) != 0;
}