[libc-commits] [libc] 58edd26 - [libc] Include -150 to the special cases at the beginning of exp2f function.
Tue Ly via libc-commits
libc-commits at lists.llvm.org
Mon Mar 14 07:06:37 PDT 2022
Author: Tue Ly
Date: 2022-03-14T10:06:27-04:00
New Revision: 58edd26255c768e29ca016c1831f8ac608ddc5e8
URL: https://github.com/llvm/llvm-project/commit/58edd26255c768e29ca016c1831f8ac608ddc5e8
DIFF: https://github.com/llvm/llvm-project/commit/58edd26255c768e29ca016c1831f8ac608ddc5e8.diff
LOG: [libc] Include -150 to the special cases at the beginning of exp2f function.
Added:
Modified:
libc/src/math/generic/exp2f.cpp
Removed:
################################################################################
diff --git a/libc/src/math/generic/exp2f.cpp b/libc/src/math/generic/exp2f.cpp
index b19cf8ebbd060..5c7961b969920 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;
More information about the libc-commits
mailing list