[libc-commits] [libc] [llvm] [libc][math] Refractor logf to Header only (PR #176834)
via libc-commits
libc-commits at lists.llvm.org
Sat Jan 24 10:46:50 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libc/shared/math/logf.h libc/src/__support/math/logf.h libc/shared/math.h libc/src/math/generic/logf.cpp libc/test/shared/shared_math_test.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/math/logf.h b/libc/src/__support/math/logf.h
index f5561dec6..eeb515c8b 100644
--- a/libc/src/__support/math/logf.h
+++ b/libc/src/__support/math/logf.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_LOGF_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_LOGF_H
+#include "common_constants.h" // Lookup table for (1/f) and log(f)
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
@@ -18,7 +19,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h"
-#include "common_constants.h" // Lookup table for (1/f) and log(f)
// This is an algorithm for log(x) in single precision which is correctly
// rounded for all rounding modes, based on the implementation of log(x) from
``````````
</details>
https://github.com/llvm/llvm-project/pull/176834
More information about the libc-commits
mailing list