Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorTue Ly <lntue@google.com>2022-03-14 17:04:39 +0300
committerTue Ly <lntue@google.com>2022-03-14 17:06:27 +0300
commit58edd26255c768e29ca016c1831f8ac608ddc5e8 (patch)
treeb7fa975e8b62580b8bfe1b8b3aa1a6d7a52ab536 /libc
parentda48f08abf3cb26d1fce4a6909c4fe2e63278d80 (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.cpp4
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;