Skip to content

Commit 270958a

Browse files
committed
Add back LIBC_MATH_HAS_SKIP_ACCURATE_PASS check
1 parent dc07f52 commit 270958a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libc/src/math/generic/asinhf16.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
namespace LIBC_NAMESPACE_DECL {
2121

22+
#ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
2223
static constexpr size_t N_EXCEPTS = 8;
2324

2425
static constexpr fputil::ExceptValues<float16, N_EXCEPTS> ASINHF16_EXCEPTS{{
@@ -41,6 +42,7 @@ static constexpr fputil::ExceptValues<float16, N_EXCEPTS> ASINHF16_EXCEPTS{{
4142
// x = -0x1.26cp+4, asinhf16(x) = -0x1.cd8p+1 (RZ)
4243
{0xcc9b, 0xc336, 0, 1, 1}
4344
}};
45+
#endif // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
4446

4547
LLVM_LIBC_FUNCTION(float16, asinhf16, (float16 x)) {
4648
using FPBits = fputil::FPBits<float16>;
@@ -58,9 +60,11 @@ LLVM_LIBC_FUNCTION(float16, asinhf16, (float16 x)) {
5860
return x;
5961
}
6062

63+
#ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
6164
// Handle exceptional values
6265
if (auto r = ASINHF16_EXCEPTS.lookup(x_u); LIBC_UNLIKELY(r.has_value()))
6366
return r.value();
67+
#endif // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
6468

6569
float xf = x;
6670
const float SIGN[2] = {1.0f, -1.0f};

0 commit comments

Comments
 (0)