[libc-commits] [libc] [llvm] [libc][math] Added missing floating point exception for atanpif16 (PR #186597)

via libc-commits libc-commits at lists.llvm.org
Sat Mar 14 07:27:28 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 -- libc/src/math/generic/atanpif16.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/math/generic/atanpif16.cpp b/libc/src/math/generic/atanpif16.cpp
index 6682b886f..c60c0c2d7 100644
--- a/libc/src/math/generic/atanpif16.cpp
+++ b/libc/src/math/generic/atanpif16.cpp
@@ -124,7 +124,8 @@ LLVM_LIBC_FUNCTION(float16, atanpif16, (float16 x)) {
     // clear the underflow raised by casting
     fputil::clear_except_if_required(FE_UNDERFLOW);
     int rounding = fputil::quick_get_round();
-    // values checked through exhaustive testing which rounded up/down and caused spurious or missing underflow
+    // values checked through exhaustive testing which rounded up/down and
+    // caused spurious or missing underflow
     bool except_value = (rounding == FE_UPWARD && xbits.uintval() == 0x0a48) ||
                         (rounding == FE_DOWNWARD && xbits.uintval() == 0x8a48);
 

``````````

</details>


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


More information about the libc-commits mailing list