From 8fd091e119c9cd71129fb036b0b2be0ab529e329 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Tue, 9 Mar 2021 00:23:27 -0600 Subject: [PATCH] Implement the signbit() macro. This uses a new helper function. --- ORCACDefs/math.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ORCACDefs/math.h b/ORCACDefs/math.h index 8cb7e4f..ea92fa8 100644 --- a/ORCACDefs/math.h +++ b/ORCACDefs/math.h @@ -33,6 +33,7 @@ typedef long double double_t; int __fpclassifyf(float); int __fpclassifyd(double); int __fpclassifyl(long double); +int __signbit(long double); #define fpclassify(x) _Generic((x), \ float: __fpclassifyf, \ @@ -43,6 +44,7 @@ int __fpclassifyl(long double); #define isinf(x) (fpclassify(x) == FP_INFINITE) #define isnan(x) (fpclassify((long double)(x)) == FP_NAN) #define isnormal(x) (fpclassify(x) == FP_NORMAL) +#define signbit(x) __signbit(x) #ifndef __KeepNamespacePure__ #define arctan(x) atan(x)