Interpreter: use numeric_limits instead of FLT_MAX.

Minor cleanup, and fixes compilation on some systems.
This commit is contained in:
magumagu 2014-05-24 01:52:45 -07:00 committed by Tony Wasserka
parent cffa848b99
commit 440246a190
1 changed files with 2 additions and 1 deletions

View File

@ -321,7 +321,8 @@ inline double ApproximateReciprocal(double val)
}
// Special case small inputs
if (exponent < (895LL << 52))
return sign ? -FLT_MAX : FLT_MAX;
return sign ? -std::numeric_limits<float>::max() :
std::numeric_limits<float>::max();
// Special case large inputs
if (exponent >= (1149LL << 52))
return sign ? -0.0f : 0.0f;