[libc] [llvm] [libc][math] Refactor tanhf implementation to header-only in src/__support/math folder. (PR #178554)
Muhammad Bassiouni via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 06:31:14 PST 2026
================
@@ -0,0 +1,133 @@
+//===-- Single-precision tanh function -------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_TANHF_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_TANHF_H
+
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/PolyEval.h"
+#include "src/__support/FPUtil/multiply_add.h"
+#include "src/__support/FPUtil/nearest_integer.h"
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/math/exp10f_utils.h"
----------------
bassiounix wrote:
```suggestion
#include "exp10f_utils.h"
```
https://github.com/llvm/llvm-project/pull/178554
More information about the llvm-commits
mailing list