[libc-commits] [libc] [libc][math] Implement `issignaling[f|l]` as a libc math function (PR #110556)
via libc-commits
libc-commits at lists.llvm.org
Mon Sep 30 13:01:58 PDT 2024
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 8815328b6bf0f8c5088f6df73ad853a5aba159d9 10976a1c5bb05bdabcf8d9c0d75c0f9d9f405e71 --extensions h,cpp -- libc/src/math/generic/issignaling.cpp libc/src/math/generic/issignalingf.cpp libc/src/math/generic/issignalingl.cpp libc/src/math/issignaling.h libc/src/math/issignalingf.h libc/src/math/issignalingl.h libc/test/src/math/smoke/IsSignalingTest.h libc/test/src/math/smoke/issignaling_test.cpp libc/test/src/math/smoke/issignalingf_test.cpp libc/test/src/math/smoke/issignalingl_test.cpp libc/src/__support/FPUtil/BasicOperations.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/FPUtil/BasicOperations.h b/libc/src/__support/FPUtil/BasicOperations.h
index 4e6ca52c18..90e977234a 100644
--- a/libc/src/__support/FPUtil/BasicOperations.h
+++ b/libc/src/__support/FPUtil/BasicOperations.h
@@ -250,7 +250,8 @@ LIBC_INLINE T fdim(T x, T y) {
template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
LIBC_INLINE int issignaling(const T &x) {
FPBits<T> sx(x);
- if (LIBC_UNLIKELY(sx.is_signaling_nan())) return 1;
+ if (LIBC_UNLIKELY(sx.is_signaling_nan()))
+ return 1;
return 0;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/110556
More information about the libc-commits
mailing list