[libc-commits] [libc] [libc][math][c++23] Add f{max, min}imum{, _mag, _mag_num, _num}bf16 math functions (PR #152881)

via libc-commits libc-commits at lists.llvm.org
Sat Aug 9 14:29:22 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 h,cpp -- libc/src/math/fmaximum_mag_numbf16.h libc/src/math/fmaximum_magbf16.h libc/src/math/fmaximum_numbf16.h libc/src/math/fmaximumbf16.h libc/src/math/fminimum_mag_numbf16.h libc/src/math/fminimum_magbf16.h libc/src/math/fminimum_numbf16.h libc/src/math/fminimumbf16.h libc/src/math/generic/fmaximum_mag_numbf16.cpp libc/src/math/generic/fmaximum_magbf16.cpp libc/src/math/generic/fmaximum_numbf16.cpp libc/src/math/generic/fmaximumbf16.cpp libc/src/math/generic/fminimum_mag_numbf16.cpp libc/src/math/generic/fminimum_magbf16.cpp libc/src/math/generic/fminimum_numbf16.cpp libc/src/math/generic/fminimumbf16.cpp libc/test/src/math/smoke/fmaximum_mag_numbf16_test.cpp libc/test/src/math/smoke/fmaximum_magbf16_test.cpp libc/test/src/math/smoke/fmaximum_numbf16_test.cpp libc/test/src/math/smoke/fmaximumbf16_test.cpp libc/test/src/math/smoke/fminimum_mag_numbf16_test.cpp libc/test/src/math/smoke/fminimum_magbf16_test.cpp libc/test/src/math/smoke/fminimum_numbf16_test.cpp libc/test/src/math/smoke/fminimumbf16_test.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/src/math/generic/fminimum_numbf16.cpp b/libc/src/math/generic/fminimum_numbf16.cpp
index a69864b40..4ca7b62b8 100644
--- a/libc/src/math/generic/fminimum_numbf16.cpp
+++ b/libc/src/math/generic/fminimum_numbf16.cpp
@@ -1,4 +1,5 @@
-//===-- Implementation of fminimum_numbf16 function ------------------------===//
+//===-- Implementation of fminimum_numbf16 function
+//------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/libc/test/src/math/smoke/fmaximum_mag_numbf16_test.cpp b/libc/test/src/math/smoke/fmaximum_mag_numbf16_test.cpp
index dd9fe1c74..9e435cc36 100644
--- a/libc/test/src/math/smoke/fmaximum_mag_numbf16_test.cpp
+++ b/libc/test/src/math/smoke/fmaximum_mag_numbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMaximumMagNumTest.h"
 
-#include "src/math/fmaximum_mag_numbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fmaximum_mag_numbf16.h"
 
 LIST_FMAXIMUM_MAG_NUM_TESTS(bfloat16, LIBC_NAMESPACE::fmaximum_mag_numbf16)
diff --git a/libc/test/src/math/smoke/fmaximum_magbf16_test.cpp b/libc/test/src/math/smoke/fmaximum_magbf16_test.cpp
index bce0c4f45..22a0bc338 100644
--- a/libc/test/src/math/smoke/fmaximum_magbf16_test.cpp
+++ b/libc/test/src/math/smoke/fmaximum_magbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMaximumMagTest.h"
 
-#include "src/math/fmaximum_magbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fmaximum_magbf16.h"
 
 LIST_FMAXIMUM_MAG_TESTS(bfloat16, LIBC_NAMESPACE::fmaximum_magbf16)
diff --git a/libc/test/src/math/smoke/fmaximum_numbf16_test.cpp b/libc/test/src/math/smoke/fmaximum_numbf16_test.cpp
index 9845e0f02..25dbe9f54 100644
--- a/libc/test/src/math/smoke/fmaximum_numbf16_test.cpp
+++ b/libc/test/src/math/smoke/fmaximum_numbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMaximumNumTest.h"
 
-#include "src/math/fmaximum_numbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fmaximum_numbf16.h"
 
 LIST_FMAXIMUM_NUM_TESTS(bfloat16, LIBC_NAMESPACE::fmaximum_numbf16)
diff --git a/libc/test/src/math/smoke/fminimum_mag_numbf16_test.cpp b/libc/test/src/math/smoke/fminimum_mag_numbf16_test.cpp
index feac14ade..ed3d4474a 100644
--- a/libc/test/src/math/smoke/fminimum_mag_numbf16_test.cpp
+++ b/libc/test/src/math/smoke/fminimum_mag_numbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMinimumMagNumTest.h"
 
-#include "src/math/fminimum_mag_numbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fminimum_mag_numbf16.h"
 
 LIST_FMINIMUM_MAG_NUM_TESTS(bfloat16, LIBC_NAMESPACE::fminimum_mag_numbf16)
diff --git a/libc/test/src/math/smoke/fminimum_magbf16_test.cpp b/libc/test/src/math/smoke/fminimum_magbf16_test.cpp
index a1566a938..94251e0f9 100644
--- a/libc/test/src/math/smoke/fminimum_magbf16_test.cpp
+++ b/libc/test/src/math/smoke/fminimum_magbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMinimumMagTest.h"
 
-#include "src/math/fminimum_magbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fminimum_magbf16.h"
 
 LIST_FMINIMUM_MAG_TESTS(bfloat16, LIBC_NAMESPACE::fminimum_magbf16)
diff --git a/libc/test/src/math/smoke/fminimum_numbf16_test.cpp b/libc/test/src/math/smoke/fminimum_numbf16_test.cpp
index b28b6621f..fe8bb51ff 100644
--- a/libc/test/src/math/smoke/fminimum_numbf16_test.cpp
+++ b/libc/test/src/math/smoke/fminimum_numbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMinimumNumTest.h"
 
-#include "src/math/fminimum_numbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fminimum_numbf16.h"
 
 LIST_FMINIMUM_NUM_TESTS(bfloat16, LIBC_NAMESPACE::fminimum_numbf16)
diff --git a/libc/test/src/math/smoke/fminimumbf16_test.cpp b/libc/test/src/math/smoke/fminimumbf16_test.cpp
index e9a2ad268..3667e9074 100644
--- a/libc/test/src/math/smoke/fminimumbf16_test.cpp
+++ b/libc/test/src/math/smoke/fminimumbf16_test.cpp
@@ -8,7 +8,7 @@
 
 #include "FMinimumTest.h"
 
-#include "src/math/fminimumbf16.h"
 #include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fminimumbf16.h"
 
 LIST_FMINIMUM_TESTS(bfloat16, LIBC_NAMESPACE::fminimumbf16)

``````````

</details>


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


More information about the libc-commits mailing list