mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-06-05 21:29:26 +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 __fpclassifyf(float);
|
||||||
int __fpclassifyd(double);
|
int __fpclassifyd(double);
|
||||||
int __fpclassifyl(long double);
|
int __fpclassifyl(long double);
|
||||||
|
int __signbit(long double);
|
||||||
|
|
||||||
#define fpclassify(x) _Generic((x), \
|
#define fpclassify(x) _Generic((x), \
|
||||||
float: __fpclassifyf, \
|
float: __fpclassifyf, \
|
||||||
|
@ -43,6 +44,7 @@ int __fpclassifyl(long double);
|
||||||
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
||||||
#define isnan(x) (fpclassify((long double)(x)) == FP_NAN)
|
#define isnan(x) (fpclassify((long double)(x)) == FP_NAN)
|
||||||
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
||||||
|
#define signbit(x) __signbit(x)
|
||||||
|
|
||||||
#ifndef __KeepNamespacePure__
|
#ifndef __KeepNamespacePure__
|
||||||
#define arctan(x) atan(x)
|
#define arctan(x) atan(x)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user