diff options
Diffstat (limited to 'math/math.h')
-rw-r--r-- | math/math.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/math/math.h b/math/math.h index 064cc56e1b..0a099596f1 100644 --- a/math/math.h +++ b/math/math.h @@ -331,6 +331,13 @@ enum /* Return nonzero value if X is subnormal. */ # define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL) + +/* Return nonzero value if X is zero. */ +# ifdef __SUPPORT_SNAN__ +# define iszero(x) (fpclassify (x) == FP_ZERO) +# else +# define iszero(x) ((x) == 0) +# endif #endif /* Use IEC_60559_BFP_EXT. */ #ifdef __USE_MISC |