[libc] Include -150 to the special cases at the beginning of exp2f function.

This commit is contained in:
Tue Ly 2022-03-14 10:04:39 -04:00
parent da48f08abf
commit 58edd26255

View File

@ -73,8 +73,8 @@ LLVM_LIBC_FUNCTION(float, exp2f, (float x)) {
using FPBits = typename fputil::FPBits<float>;
FPBits xbits(x);
// When x < -150 or nan
if (unlikely(xbits.uintval() > 0xc316'0000U)) {
// When x =< -150 or nan
if (unlikely(xbits.uintval() >= 0xc316'0000U)) {
// exp(-Inf) = 0
if (xbits.is_inf())
return 0.0f;