[libc-commits] [libc] [libc][math] Implement `issignaling` and `iscanonical` macro. (PR #111403)

Shourya Goel via libc-commits libc-commits at lists.llvm.org
Tue Oct 8 23:18:57 PDT 2024


================
@@ -11,6 +11,19 @@
 
 #include "math-macros.h"
 
+#ifndef __cplusplus
+#define issignaling(x)                                                         \
+  _Generic((x),                                                                \
+      float: issignalingf,                                                     \
+      double: issignaling,                                                     \
+      long double: issignalingl)(x)
+#define iscanonical(x)                                                         \
+  _Generic((x),                                                                \
+      float: iscanonicalf,                                                     \
+      double: iscanonical,                                                     \
+      long double: iscanonicall)(x)
+#endif
----------------
Sh0g0-1758 wrote:

However, we can keep the overloading set of functions in C++ mode, @lntue and I discussed about it and wanted to check with you about it. 

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


More information about the libc-commits mailing list