[libc-commits] [libc] [libc][math] Implement fpclassify macro. (PR #109519)
via libc-commits
libc-commits at lists.llvm.org
Sat Sep 21 06:39:58 PDT 2024
================
@@ -14,5 +14,6 @@
#define isnan(x) __builtin_isnan(x)
#define signbit(x) __builtin_signbit(x)
#define iszero(x) (x == 0)
+#define fpclassify(a, b, c, d, e, f) __builtin_fpclassify(a, b, c, d, e, f)
----------------
lntue wrote:
The `fpclassify` macro from C standard only takes 1 argument. You'll need to `#include "math-macros.h"` and use `FP_*` macros as the first 5 arguments for `__builtin_fpclassify`. See the description of `__builtin_fpclassify` at: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005ffpclassify
https://github.com/llvm/llvm-project/pull/109519
More information about the libc-commits
mailing list