mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
Add fpclassify() macro and some other stuff from C99 to <math.h>.
fpclassify() is a type-generic macro that is implemented via new internal library routines.
This commit is contained in:
parent
cad042b95b
commit
17a7fc5487
@ -13,7 +13,31 @@
|
||||
#ifndef __math__
|
||||
#define __math__
|
||||
|
||||
typedef long double float_t;
|
||||
typedef long double double_t;
|
||||
|
||||
#define HUGE_VAL 1e5000
|
||||
#define HUGE_VALF 1e5000F
|
||||
#define HUGE_VALL 1e5000L
|
||||
|
||||
#define INFINITY 1e5000F
|
||||
|
||||
#define NAN (0.0F/0.0F)
|
||||
|
||||
#define FP_INFINITE 0xFE
|
||||
#define FP_NAN 0xFD
|
||||
#define FP_NORMAL 0x00
|
||||
#define FP_SUBNORMAL 0x01
|
||||
#define FP_ZERO 0xFF
|
||||
|
||||
int __fpclassifyf(float);
|
||||
int __fpclassifyd(double);
|
||||
int __fpclassifyl(long double);
|
||||
|
||||
#define fpclassify(x) _Generic((x), \
|
||||
float: __fpclassifyf, \
|
||||
double: __fpclassifyd, \
|
||||
long double: __fpclassifyl)(x)
|
||||
|
||||
#ifndef __KeepNamespacePure__
|
||||
#define arctan(x) atan(x)
|
||||
|
Loading…
Reference in New Issue
Block a user