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

via libc-commits libc-commits at lists.llvm.org
Mon Jun 29 04:17:56 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 cpp,h -- libc/src/__support/FPUtil/float128.h libc/test/src/__support/FPUtil/float128_test.cpp libc/shared/math/ceilf128.h libc/src/__support/CPP/type_traits/is_floating_point.h libc/src/__support/FPUtil/FPBits.h libc/src/__support/FPUtil/cast.h libc/src/__support/FPUtil/dyadic_float.h libc/src/__support/FPUtil/generic/add_sub.h libc/src/__support/big_int.h libc/src/__support/macros/properties/types.h libc/src/__support/math/ceilf128.h libc/src/math/ceilf128.h libc/src/math/generic/ceilf128.cpp libc/test/shared/shared_math_test.cpp libc/test/src/__support/integer_literals_test.cpp libc/test/src/math/ceilf128_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/shared/math/ceilf128.h b/libc/shared/math/ceilf128.h
index 25611636e..d7fe00fe8 100644
--- a/libc/shared/math/ceilf128.h
+++ b/libc/shared/math/ceilf128.h
@@ -10,8 +10,8 @@
 #define LLVM_LIBC_SHARED_MATH_CEILF128_H
 
 #include "shared/libc_common.h"
-#include "src/__support/math/ceilf128.h"
 #include "src/__support/FPUtil/float128.h"
+#include "src/__support/math/ceilf128.h"
 
 using LIBC_NAMESPACE::fputil::Float128;
 
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index 40de768fe..32b694337 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -9,9 +9,9 @@
 #ifndef LLVM_LIBC_SRC_MATH_CEILF128_H
 #define LLVM_LIBC_SRC_MATH_CEILF128_H
 
+#include "src/__support/FPUtil/float128.h"
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/types.h"
-#include "src/__support/FPUtil/float128.h"
 
 using LIBC_NAMESPACE::fputil::Float128;
 
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index e359ef9cb..acb5ed3b8 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/math/ceilf128.h"
-#include "src/__support/math/ceilf128.h"
 #include "src/__support/FPUtil/float128.h"
+#include "src/__support/math/ceilf128.h"
 
 using LIBC_NAMESPACE::fputil::Float128;
 
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 165591594..c71e44f71 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -575,13 +575,13 @@ TEST(LlvmLibcSharedMathTest, AllLongDouble) {
 
 #endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
 
-// Emulated float128 
+// Emulated float128
 // TODO: style
 #include "src/__support/FPUtil/float128.h"
 
 using LIBC_NAMESPACE::fputil::Float128;
 
-TEST(LlvmLibcSharedMathTest, AllEmuFloat128){
+TEST(LlvmLibcSharedMathTest, AllEmuFloat128) {
   EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
 }
 
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index e01221f4a..accb766e1 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -8,8 +8,8 @@
 
 #include "CeilTest.h"
 
-#include "src/math/ceilf128.h"
 #include "src/__support/FPUtil/float128.h"
+#include "src/math/ceilf128.h"
 
 using LIBC_NAMESPACE::fputil::Float128;
 

``````````

</details>


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


More information about the libc-commits mailing list