[libc-commits] [libc] [libc] Make ceilf128 use the emulated float128 type (PR #207735)

via libc-commits libc-commits at lists.llvm.org
Thu Jul 30 07:58:18 PDT 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 h,cpp -- libc/shared/math/ceilf128.h libc/src/__support/math/ceilf128.h libc/src/math/ceilf128.h libc/src/math/generic/ceilf128.cpp libc/test/shared/shared_math_constexpr_test.cpp libc/test/shared/shared_math_test.cpp libc/test/src/math/ceilf128_test.cpp libc/test/src/math/smoke/ceilf128_test.cpp libc/utils/MPFRWrapper/MPCommon.cpp libc/utils/MPFRWrapper/MPCommon.h libc/utils/MPFRWrapper/MPFRUtils.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/ceilf128.h b/libc/src/__support/math/ceilf128.h
index 32050b9c8..7907b6b2f 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -24,9 +24,7 @@ LIBC_INLINE constexpr float128 ceilf128(float128 x) {
   return static_cast<float128>(fputil::ceil(Float128(x)));
 }
 #else
-LIBC_INLINE constexpr Float128 ceilf128(Float128 x) {
-  return fputil::ceil(x);
-}
+LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
 #endif // LIBC_TYPES_HAS_FLOAT128
 
 } // namespace math
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index 685518ed4..29ac61b0c 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -8,8 +8,8 @@
 
 #include "src/math/ceilf128.h"
 #include "src/__support/FPUtil/float128.h"
-#include "src/__support/math/ceilf128.h"
 #include "src/__support/macros/properties/types.h"
+#include "src/__support/math/ceilf128.h"
 
 using LIBC_NAMESPACE::fputil::Float128;
 
@@ -17,7 +17,7 @@ namespace LIBC_NAMESPACE_DECL {
 
 #ifdef LIBC_TYPES_HAS_FLOAT128
 LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
-  return  static_cast<float128>(math::ceilf128(Float128(x)));
+  return static_cast<float128>(math::ceilf128(Float128(x)));
 }
 #else
 LLVM_LIBC_FUNCTION(Float128, ceilf128, (Float128 x)) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/207735


More information about the libc-commits mailing list