[libc-commits] [libc] [libc][math][c++23] Add {ceil, floor, round, roundeven, trunc}bf16 math functions (PR #152352)

via libc-commits libc-commits at lists.llvm.org
Wed Aug 6 11:10:45 PDT 2025


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 HEAD~1 HEAD --extensions cpp,h -- libc/src/math/ceilbf16.h libc/src/math/floorbf16.h libc/src/math/generic/ceilbf16.cpp libc/src/math/generic/floorbf16.cpp libc/src/math/generic/roundbf16.cpp libc/src/math/generic/roundevenbf16.cpp libc/src/math/generic/truncbf16.cpp libc/src/math/roundbf16.h libc/src/math/roundevenbf16.h libc/src/math/truncbf16.h libc/test/src/math/smoke/ceilbf16_test.cpp libc/test/src/math/smoke/floorbf16_test.cpp libc/test/src/math/smoke/roundbf16_test.cpp libc/test/src/math/smoke/roundevenbf16_test.cpp libc/test/src/math/smoke/truncbf16_test.cpp libc/test/src/math/smoke/CeilTest.h libc/test/src/math/smoke/FloorTest.h libc/test/src/math/smoke/RoundTest.h libc/test/src/math/smoke/TruncTest.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/math/generic/roundevenbf16.cpp b/libc/src/math/generic/roundevenbf16.cpp
index 48f889f9b..39419e483 100644
--- a/libc/src/math/generic/roundevenbf16.cpp
+++ b/libc/src/math/generic/roundevenbf16.cpp
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/math/roundevenbf16.h"
 #include "src/__support/FPUtil/NearestIntegerOperations.h"
 #include "src/__support/FPUtil/bfloat16.h"
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
-#include "src/math/roundevenbf16.h"
 
 namespace LIBC_NAMESPACE_DECL {
 

``````````

</details>


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


More information about the libc-commits mailing list