mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-02 19:29:21 +00:00
Implement the signbit() macro.
This uses a new helper function.
This commit is contained in:
parent
a3006e46b1
commit
8fd091e119
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user