[libc-commits] [libc] [libc][math] Implement issubnormal macro. (PR #109572)

via libc-commits libc-commits at lists.llvm.org
Sun Sep 22 14:02:12 PDT 2024


================
@@ -19,5 +19,8 @@
 #define fpclassify(x)                                                          \
   __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
 #define isnormal(x) __builtin_isnormal(x)
+#define issubnormal(x)                                                         \
+  (__builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, \
----------------
lntue wrote:

how about `(fpclassify(x) == FP_SUBNORMAL)`?

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


More information about the libc-commits mailing list