[libc-commits] [libc] [libc][math][c23] Add asinf16() function (PR #124212)

via libc-commits libc-commits at lists.llvm.org
Mon Feb 3 06:38:06 PST 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 713482fccf82d33c5c4ddb24538958617e1eb957 dc173e35db3a16407c053cb444d2d4174c569c3f --extensions h,cpp -- libc/src/math/asinf16.h libc/src/math/generic/asinf16.cpp libc/test/src/math/asinf16_test.cpp libc/test/src/math/smoke/asinf16_test.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/src/math/generic/asinf16.cpp b/libc/src/math/generic/asinf16.cpp
index 4c42624c2a..f359f375e3 100644
--- a/libc/src/math/generic/asinf16.cpp
+++ b/libc/src/math/generic/asinf16.cpp
@@ -35,16 +35,16 @@ LLVM_LIBC_FUNCTION(float16, asinf16, (float16 x)) {
 
   // |x| <= 0x1p-1, |x| <= 0.5
   if (x_abs <= 0x3800) {
-    //asinf16(NaN) = NaN
+    // asinf16(NaN) = NaN
     if (xbits.is_nan()) {
       if (xbits.is_signaling_nan()) {
         fputil::raise_except_if_required(FE_INVALID);
-	return FPBits::quiet_nan().get_val();
+        return FPBits::quiet_nan().get_val();
       }
 
       return x;
     }
-    
+
     // asinf16(+/-0) = +/-0
     if (LIBC_UNLIKELY(x_abs == 0))
       return x;

``````````

</details>


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


More information about the libc-commits mailing list