[libc-commits] [libc] [libc] fix build errors caused by atanhf16. (PR #151838)

Muhammad Bassiouni via libc-commits libc-commits at lists.llvm.org
Sat Aug 2 13:26:18 PDT 2025


https://github.com/bassiounix created https://github.com/llvm/llvm-project/pull/151838

None

>From 1db66d56722ce17eb204e50118d1eb3c3600829a Mon Sep 17 00:00:00 2001
From: bassiounix <muhammad.m.bassiouni at gmail.com>
Date: Sat, 2 Aug 2025 23:25:28 +0300
Subject: [PATCH] [libc] fix build errors caused by atanhf16.

---
 libc/src/__support/math/atanhf16.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/__support/math/atanhf16.h b/libc/src/__support/math/atanhf16.h
index 9146e1e31b815..80929dd30fa34 100644
--- a/libc/src/__support/math/atanhf16.h
+++ b/libc/src/__support/math/atanhf16.h
@@ -109,7 +109,7 @@ static constexpr float LOG_F_FLOAT[128] = {
 // x should be positive, normal finite value
 // TODO: Simplify range reduction and polynomial degree for float16.
 //       See issue #137190.
-LIBC_INLINE static constexpr float log_eval_f(float x) {
+LIBC_INLINE static float log_eval_f(float x) {
   // For x = 2^ex * (1 + mx), logf(x) = ex * logf(2) + logf(1 + mx).
   using FPBits = fputil::FPBits<float>;
   FPBits xbits(x);



More information about the libc-commits mailing list