[libc-commits] [libc] [libc][math] Implement `issignaling[f|l]` as a libc math function (PR #110556)

Shourya Goel via libc-commits libc-commits at lists.llvm.org
Tue Oct 1 08:12:05 PDT 2024


================
@@ -247,6 +247,14 @@ LIBC_INLINE T fdim(T x, T y) {
   return (x > y ? x - y : 0);
 }
 
+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()))
----------------
Sh0g0-1758 wrote:

Right. Done. 

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


More information about the libc-commits mailing list