diff options
author | Tue Ly <lntue@google.com> | 2022-03-14 17:04:39 +0300 |
---|---|---|
committer | Tue Ly <lntue@google.com> | 2022-03-14 17:06:27 +0300 |
commit | 58edd26255c768e29ca016c1831f8ac608ddc5e8 (patch) | |
tree | b7fa975e8b62580b8bfe1b8b3aa1a6d7a52ab536 /libc | |
parent | da48f08abf3cb26d1fce4a6909c4fe2e63278d80 (diff) |
[libc] Include -150 to the special cases at the beginning of exp2f function.
Diffstat (limited to 'libc')
-rw-r--r-- | libc/src/math/generic/exp2f.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/math/generic/exp2f.cpp b/libc/src/math/generic/exp2f.cpp index b19cf8ebbd06..5c7961b96992 100644 --- a/libc/src/math/generic/exp2f.cpp +++ b/libc/src/math/generic/exp2f.cpp @@ -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; |