mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Remove a duplicate function, cleanup sorting and use consistent argument names in math.h.
Add missing math.h tests and make each test a single line for easier comparison with math.h. Add missing cmath undefs and functions and use constexpr instead of static.
This commit is contained in:
@@ -35,13 +35,13 @@ typedef double double_t;
|
|||||||
#define FP_SUBNORMAL 0x08
|
#define FP_SUBNORMAL 0x08
|
||||||
#define FP_ZERO 0x10
|
#define FP_ZERO 0x10
|
||||||
|
|
||||||
#define fpclassify(x) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
|
|
||||||
#define signbit(x) __builtin_signbit(x)
|
|
||||||
#define finite(x) __builtin_finite(x)
|
#define finite(x) __builtin_finite(x)
|
||||||
|
#define fpclassify(x) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
|
||||||
#define isfinite(x) __builtin_isfinite(x)
|
#define isfinite(x) __builtin_isfinite(x)
|
||||||
#define isnormal(x) __builtin_isnormal(x)
|
#define isnormal(x) __builtin_isnormal(x)
|
||||||
#define isnan(x) __builtin_isnan(x)
|
#define isnan(x) __builtin_isnan(x)
|
||||||
#define isinf(x) __builtin_isinf(x)
|
#define isinf(x) __builtin_isinf(x)
|
||||||
|
#define signbit(x) __builtin_signbit(x)
|
||||||
|
|
||||||
float acosf(float x);
|
float acosf(float x);
|
||||||
float acoshf(float x);
|
float acoshf(float x);
|
||||||
@@ -60,19 +60,19 @@ float fabsf(float x);
|
|||||||
float fmaxf(float x, float y);
|
float fmaxf(float x, float y);
|
||||||
float floorf(float x);
|
float floorf(float x);
|
||||||
float fmodf(float x, float y);
|
float fmodf(float x, float y);
|
||||||
float frexpf(float x, int *eptr);
|
float frexpf(float x, int *exp);
|
||||||
float hypotf(float x, float y);
|
float hypotf(float x, float y);
|
||||||
float ldexpf(float x, int n);
|
float ldexpf(float x, int exp);
|
||||||
float lgammaf(float x);
|
float lgammaf(float x);
|
||||||
float lgammaf_r(float x, int *signgamp);
|
float lgammaf_r(float x, int *signgamp);
|
||||||
float log1pf(float x);
|
float log1pf(float x);
|
||||||
float log10f(float x);
|
float log10f(float x);
|
||||||
float logf(float x);
|
float logf(float x);
|
||||||
float modff(float value, float *iptr);
|
float modff(float x, float *iptr);
|
||||||
float nearbyintf(float x);
|
float nearbyintf(float x);
|
||||||
float powf(float x, float y);
|
float powf(float x, float y);
|
||||||
float roundf(float x);
|
float roundf(float x);
|
||||||
float scalbnf(float x, int n);
|
float scalbnf(float x, int exp);
|
||||||
float sinf(float x);
|
float sinf(float x);
|
||||||
float sinhf(float x);
|
float sinhf(float x);
|
||||||
float sqrtf(float x);
|
float sqrtf(float x);
|
||||||
@@ -99,7 +99,7 @@ double fabs(double x);
|
|||||||
double fmax(double x, double y);
|
double fmax(double x, double y);
|
||||||
double floor(double x);
|
double floor(double x);
|
||||||
double fmod(double x, double y);
|
double fmod(double x, double y);
|
||||||
double frexp(double x, int *eptr);
|
double frexp(double x, int *exp);
|
||||||
double hypot(double x, double y);
|
double hypot(double x, double y);
|
||||||
double lgamma(double x);
|
double lgamma(double x);
|
||||||
double lgamma_r(double x, int *signgamp);
|
double lgamma_r(double x, int *signgamp);
|
||||||
@@ -108,14 +108,13 @@ double log1p(double x);
|
|||||||
double log10(double x);
|
double log10(double x);
|
||||||
double log2(double x);
|
double log2(double x);
|
||||||
double logb(double x);
|
double logb(double x);
|
||||||
double modf(double value, double *iptr);
|
double modf(double x, double *iptr);
|
||||||
double nearbyint(double x);
|
double nearbyint(double x);
|
||||||
double pow(double x, double y);
|
double pow(double x, double y);
|
||||||
double nearbyint(double x);
|
|
||||||
double rint(double x);
|
double rint(double x);
|
||||||
double round(double x);
|
double round(double x);
|
||||||
double scalb(double x, double fn);
|
double scalb(double x, double exp);
|
||||||
double scalbn(double x, int n);
|
double scalbn(double x, int exp);
|
||||||
double sin(double x);
|
double sin(double x);
|
||||||
double sinh(double x);
|
double sinh(double x);
|
||||||
double sqrt(double x);
|
double sqrt(double x);
|
||||||
@@ -124,6 +123,8 @@ double tanh(double x);
|
|||||||
double tgamma(double x);
|
double tgamma(double x);
|
||||||
double trunc(double x);
|
double trunc(double x);
|
||||||
|
|
||||||
|
extern int signgam;
|
||||||
|
|
||||||
/* The C99 standard says that any libc function can be re-declared as a macro.
|
/* The C99 standard says that any libc function can be re-declared as a macro.
|
||||||
* (See N1124 paragraph 7.1.4). This means that C files willing to actually
|
* (See N1124 paragraph 7.1.4). This means that C files willing to actually
|
||||||
* implement said functions should either re-define the prototype or #undef the
|
* implement said functions should either re-define the prototype or #undef the
|
||||||
@@ -145,18 +146,19 @@ double trunc(double x);
|
|||||||
#define fabsf(x) __builtin_fabsf(x)
|
#define fabsf(x) __builtin_fabsf(x)
|
||||||
#define floorf(x) __builtin_floorf(x)
|
#define floorf(x) __builtin_floorf(x)
|
||||||
#define fmodf(x, y) __builtin_fmodf(x, y)
|
#define fmodf(x, y) __builtin_fmodf(x, y)
|
||||||
#define frexpf(x, y) __builtin_frexpf(x, y)
|
#define frexpf(x, exp) __builtin_frexpf(x, exp)
|
||||||
#define ldexpf(x, n) __builtin_ldexpf(x, n)
|
#define ldexpf(x, exp) __builtin_ldexpf(x, exp)
|
||||||
#define lgammaf(x) __builtin_lgammaf(x)
|
#define lgammaf(x) __builtin_lgammaf(x)
|
||||||
#define lgammaf_r(x, signgamp) __builtin_lgammaf_r(x, signgamp)
|
#define lgammaf_r(x, signgamp) __builtin_lgammaf_r(x, signgamp)
|
||||||
#define log1pf(x) __builtin_log1pf(x)
|
#define log1pf(x) __builtin_log1pf(x)
|
||||||
#define log10f(x) __builtin_log10f(x)
|
#define log10f(x) __builtin_log10f(x)
|
||||||
#define logf(x) __builtin_logf(x)
|
#define logf(x) __builtin_logf(x)
|
||||||
#define nanf(s) __builtin_nanf(s)
|
#define modff(x, iptr) __builtin_modff(x, iptr)
|
||||||
|
#define nanf(tagp) __builtin_nanf(tagp)
|
||||||
#define nearbyintf(x) __builtin_nearbyintf(x)
|
#define nearbyintf(x) __builtin_nearbyintf(x)
|
||||||
#define powf(x, y) __builtin_powf(x, y)
|
#define powf(x, y) __builtin_powf(x, y)
|
||||||
#define roundf(x) __builtin_roundf(x)
|
#define roundf(x) __builtin_roundf(x)
|
||||||
#define scalbnf(x, n) __builtin_scalbnf(x, n)
|
#define scalbnf(x, exp) __builtin_scalbnf(x, exp)
|
||||||
#define sinf(x) __builtin_sinf(x)
|
#define sinf(x) __builtin_sinf(x)
|
||||||
#define sinhf(x) __builtin_sinhf(x)
|
#define sinhf(x) __builtin_sinhf(x)
|
||||||
#define sqrtf(x) __builtin_sqrtf(x)
|
#define sqrtf(x) __builtin_sqrtf(x)
|
||||||
@@ -182,7 +184,8 @@ double trunc(double x);
|
|||||||
#define fabs(x) __builtin_fabs(x)
|
#define fabs(x) __builtin_fabs(x)
|
||||||
#define floor(x) __builtin_floor(x)
|
#define floor(x) __builtin_floor(x)
|
||||||
#define fmod(x, y) __builtin_fmod(x, y)
|
#define fmod(x, y) __builtin_fmod(x, y)
|
||||||
#define ldexp(x, n) __builtin_scalbn(x, n)
|
#define frexp(x, exp) __builtin_frexp(x, exp)
|
||||||
|
#define ldexp(x, exp) __builtin_scalbn(x, exp)
|
||||||
#define lgamma(x) __builtin_lgamma(x)
|
#define lgamma(x) __builtin_lgamma(x)
|
||||||
#define lgamma_r(x, signgamp) __builtin_lgamma_r(x, signgamp)
|
#define lgamma_r(x, signgamp) __builtin_lgamma_r(x, signgamp)
|
||||||
#define log(x) __builtin_log(x)
|
#define log(x) __builtin_log(x)
|
||||||
@@ -190,11 +193,14 @@ double trunc(double x);
|
|||||||
#define log10(x) __builtin_log10(x)
|
#define log10(x) __builtin_log10(x)
|
||||||
#define log2(x) __builtin_log2(x)
|
#define log2(x) __builtin_log2(x)
|
||||||
#define logb(x) __builtin_logb(x)
|
#define logb(x) __builtin_logb(x)
|
||||||
#define nan(s) __builtin_nan(s)
|
#define modf(x, iptr) __builtin_modf(x, iptr)
|
||||||
|
#define nan(tagp) __builtin_nan(tagp)
|
||||||
|
#define nearbyint(x) __builtin_nearbyint(x)
|
||||||
#define pow(x, y) __builtin_pow(x, y)
|
#define pow(x, y) __builtin_pow(x, y)
|
||||||
#define rint(x) __builtin_rint(x)
|
#define rint(x) __builtin_rint(x)
|
||||||
#define round(x) __builtin_round(x)
|
#define round(x) __builtin_round(x)
|
||||||
#define scalbn(x, n) __builtin_scalbn(x, n)
|
#define scalb(x, exp) __builtin_scalb(x, exp)
|
||||||
|
#define scalbn(x, exp) __builtin_scalbn(x, exp)
|
||||||
#define sin(x) __builtin_sin(x)
|
#define sin(x) __builtin_sin(x)
|
||||||
#define sinh(x) __builtin_sinh(x)
|
#define sinh(x) __builtin_sinh(x)
|
||||||
#define sqrt(x) __builtin_sqrt(x)
|
#define sqrt(x) __builtin_sqrt(x)
|
||||||
@@ -203,8 +209,6 @@ double trunc(double x);
|
|||||||
#define tgamma(x) __builtin_tgamma(x)
|
#define tgamma(x) __builtin_tgamma(x)
|
||||||
#define trunc(x) __builtin_trunc(x)
|
#define trunc(x) __builtin_trunc(x)
|
||||||
|
|
||||||
extern int signgam;
|
|
||||||
|
|
||||||
LIBA_END_DECLS
|
LIBA_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
295
liba/test/math.c
295
liba/test/math.c
@@ -1,210 +1,97 @@
|
|||||||
// This file tests that each math fuction links.
|
// This file tests that each math fuction links.
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
int test_fpclassifyf(float x) {
|
int test_fpclassifyf(float x) { return fpclassify(x); }
|
||||||
return fpclassify(x);
|
int test_signbitf(float x) { return signbit(x); }
|
||||||
}
|
int test_finitef(float x) { return finite(x); }
|
||||||
int test_isfinitef(float x) {
|
int test_isfinitef(float x) { return isfinite(x); }
|
||||||
return isfinite(x);
|
int test_isnormalf(float x) { return isnormal(x); }
|
||||||
}
|
int test_isnanf(float x) { return isnan(x); }
|
||||||
int test_isnormalf(float x) {
|
int test_isinff(float x) { return isinf(x); }
|
||||||
return isnormal(x);
|
|
||||||
}
|
|
||||||
int test_isnanf(float x) {
|
|
||||||
return isnan(x);
|
|
||||||
}
|
|
||||||
int test_isinff(float x) {
|
|
||||||
return isinf(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
float test_acosf(float x) {
|
float test_acosf(float x) { return acosf(x); }
|
||||||
return acosf(x);
|
float test_acoshf(float x) { return acoshf(x); }
|
||||||
}
|
float test_asinf(float x) { return asinf(x); }
|
||||||
float test_acoshf(float x) {
|
float test_asinhf(float x) { return asinhf(x); }
|
||||||
return acoshf(x);
|
float test_atanf(float x) { return atanf(x); }
|
||||||
}
|
float test_atan2f(float y, float x) { return atan2f(y, x); }
|
||||||
float test_asinf(float x) {
|
float test_atanhf(float x) { return atanhf(x); }
|
||||||
return asinf(x);
|
float test_ceilf(float x) { return ceilf(x); }
|
||||||
}
|
float test_copysignf(float x, float y) { return copysignf(x, y); }
|
||||||
float test_asinhf(float x) {
|
float test_cosf(float x) { return cosf(x); }
|
||||||
return asinhf(x);
|
float test_coshf(float x) { return coshf(x); }
|
||||||
}
|
float test_expf(float x) { return expf(x); }
|
||||||
float test_atanf(float x) {
|
float test_expm1f(float x) { return expm1f(x); }
|
||||||
return atanf(x);
|
float test_fabsf(float x) { return fabsf(x); }
|
||||||
}
|
float test_floorf(float x) { return floorf(x); }
|
||||||
float test_atan2f(float y, float x) {
|
float test_fmodf(float x, float y) { return fmodf(x, y); }
|
||||||
return atan2f(y, x);
|
float test_frexpf(float x, int *exp) { return frexpf(x, exp); }
|
||||||
}
|
float test_ldexpf(float x, int exp) { return ldexpf(x, exp); }
|
||||||
float test_atanhf(float x) {
|
float test_lgammaf(float x) { return lgammaf(x); }
|
||||||
return atanhf(x);
|
float test_lgammaf_r(float x, int *signgamp) { return lgammaf_r(x, signgamp); }
|
||||||
}
|
float test_log1pf(float x) { return log1pf(x); }
|
||||||
float test_ceilf(float x) {
|
float test_log10f(float x) { return log10f(x); }
|
||||||
return ceilf(x);
|
float test_logf(float x) { return logf(x); }
|
||||||
}
|
float test_modff(float x, float *iptr) { return modff(x, iptr); }
|
||||||
float test_copysignf(float x, float y) {
|
float test_nanf(const char *s) { return nanf(s); }
|
||||||
return copysignf(x, y);
|
float test_nearbyintf(float x) { return nearbyintf(x); }
|
||||||
}
|
float test_powf(float x, float y) { return powf(x, y); }
|
||||||
float test_cosf(float x) {
|
float test_roundf(float x) { return roundf(x); }
|
||||||
return cosf(x);
|
float test_scalbnf(float x, int exp) { return scalbnf(x, exp); }
|
||||||
}
|
float test_sinf(float x) { return sinf(x); }
|
||||||
float test_coshf(float x) {
|
float test_sinhf(float x) { return sinhf(x); }
|
||||||
return coshf(x);
|
float test_sqrtf(float x) { return sqrtf(x); }
|
||||||
}
|
float test_tanf(float x) { return tanf(x); }
|
||||||
float test_expf(float x) {
|
float test_tanhf(float x) { return tanhf(x); }
|
||||||
return expf(x);
|
float test_truncf(float x) { return truncf(x); }
|
||||||
}
|
|
||||||
float test_expm1f(float x) {
|
|
||||||
return expm1f(x);
|
|
||||||
}
|
|
||||||
float test_fabsf(float x) {
|
|
||||||
return fabsf(x);
|
|
||||||
}
|
|
||||||
float test_floorf(float x) {
|
|
||||||
return floorf(x);
|
|
||||||
}
|
|
||||||
float test_fmodf(float x, float y) {
|
|
||||||
return fmodf(x, y);
|
|
||||||
}
|
|
||||||
float test_lgammaf(float x) {
|
|
||||||
return lgammaf(x);
|
|
||||||
}
|
|
||||||
float test_lgammaf_r(float x, int *signgamp) {
|
|
||||||
return lgammaf_r(x, signgamp);
|
|
||||||
}
|
|
||||||
float test_log1pf(float x) {
|
|
||||||
return log1pf(x);
|
|
||||||
}
|
|
||||||
float test_log10f(float x) {
|
|
||||||
return log10f(x);
|
|
||||||
}
|
|
||||||
float test_logf(float x) {
|
|
||||||
return logf(x);
|
|
||||||
}
|
|
||||||
float test_nanf(const char *s) {
|
|
||||||
return nanf(s);
|
|
||||||
}
|
|
||||||
float test_nearbyintf(float x) {
|
|
||||||
return nearbyintf(x);
|
|
||||||
}
|
|
||||||
float test_powf(float x, float y) {
|
|
||||||
return powf(x, y);
|
|
||||||
}
|
|
||||||
float test_roundf(float x) {
|
|
||||||
return roundf(x);
|
|
||||||
}
|
|
||||||
float test_scalbnf(float x, int n) {
|
|
||||||
return scalbnf(x, n);
|
|
||||||
}
|
|
||||||
float test_sinf(float x) {
|
|
||||||
return sinf(x);
|
|
||||||
}
|
|
||||||
float test_sinhf(float x) {
|
|
||||||
return sinhf(x);
|
|
||||||
}
|
|
||||||
float test_sqrtf(float x) {
|
|
||||||
return sqrtf(x);
|
|
||||||
}
|
|
||||||
float test_tanf(float x) {
|
|
||||||
return tanf(x);
|
|
||||||
}
|
|
||||||
float test_tanhf(float x) {
|
|
||||||
return tanhf(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
int test_fpclassify(double x) {
|
int test_fpclassify(double x) { return fpclassify(x); }
|
||||||
return fpclassify(x);
|
int test_signbit(double x) { return signbit(x); }
|
||||||
}
|
int test_finite(double x) { return finite(x); }
|
||||||
int test_isfinite(double x) {
|
int test_isfinite(double x) { return isfinite(x); }
|
||||||
return isfinite(x);
|
int test_isnormal(double x) { return isnormal(x); }
|
||||||
}
|
int test_isnan(double x) { return isnan(x); }
|
||||||
int test_isnormal(double x) {
|
int test_isinf(double x) { return isinf(x); }
|
||||||
return isnormal(x);
|
|
||||||
}
|
|
||||||
int test_isnan(double x) {
|
|
||||||
return isnan(x);
|
|
||||||
}
|
|
||||||
int test_isinf(double x) {
|
|
||||||
return isinf(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
double test_acos(double x) {
|
double test_acos(double x) { return acos(x); }
|
||||||
return acos(x);
|
double test_acosh(double x) { return acosh(x); }
|
||||||
}
|
double test_asin(double x) { return asin(x); }
|
||||||
double test_acosh(double x) {
|
double test_asinh(double x) { return asinh(x); }
|
||||||
return acosh(x);
|
double test_atan(double x) { return atan(x); }
|
||||||
}
|
double test_atan2(double y, double x) { return atan2(y, x); }
|
||||||
double test_asin(double x) {
|
double test_atanh(double x) { return atanh(x); }
|
||||||
return asin(x);
|
double test_ceil(double x) { return ceil(x); }
|
||||||
}
|
double test_copysign(double x, double y) { return copysign(x, y); }
|
||||||
double test_asinh(double x) {
|
double test_cos(double x) { return cos(x); }
|
||||||
return asinh(x);
|
double test_cosh(double x) { return cosh(x); }
|
||||||
}
|
double test_erf(double x) { return erf(x); }
|
||||||
double test_atan(double x) {
|
double test_erfc(double x) { return erfc(x); }
|
||||||
return atan(x);
|
double test_exp(double x) { return exp(x); }
|
||||||
}
|
double test_expm1(double x) { return expm1(x); }
|
||||||
double test_atanh(double x) {
|
double test_fabs(double x) { return fabs(x); }
|
||||||
return atanh(x);
|
double test_floor(double x) { return floor(x); }
|
||||||
}
|
double test_fmod(double x, double y) { return fmod(x, y); }
|
||||||
double test_ceil(double x) {
|
double test_frexp(double x, int *exp) { return frexp(x, exp); }
|
||||||
return ceil(x);
|
double test_ldexp(double x, int exp) { return ldexp(x, exp); }
|
||||||
}
|
double test_lgamma(double x) { return lgamma(x); }
|
||||||
double test_copysign(double x, double y) {
|
double test_lgamma_r(double x, int *signgamp) { return lgamma_r(x, signgamp); }
|
||||||
return copysign(x, y);
|
double test_log(double x) { return log(x); }
|
||||||
}
|
double test_log1p(double x) { return log1p(x); }
|
||||||
double test_cos(double x) {
|
double test_log10(double x) { return log10(x); }
|
||||||
return cos(x);
|
double test_log2(double x) { return log2(x); }
|
||||||
}
|
double test_logb(double x) { return logb(x); }
|
||||||
double test_cosh(double x) {
|
double test_modf(double x, double *iptr) { return modf(x, iptr); }
|
||||||
return cosh(x);
|
double test_nan(const char *s) { return nan(s); }
|
||||||
}
|
double test_nearbyint(double x) { return nearbyint(x); }
|
||||||
double test_exp(double x) {
|
double test_pow(double x, double y) { return pow(x, y); }
|
||||||
return exp(x);
|
double test_rint(double x) { return rint(x); }
|
||||||
}
|
double test_round(double x) { return round(x); }
|
||||||
double test_expm1(double x) {
|
double test_scalb(double x, double exp) { return scalb(x, exp); }
|
||||||
return expm1(x);
|
double test_scalbn(double x, int exp) { return scalbn(x, exp); }
|
||||||
}
|
double test_sin(double x) { return sin(x); }
|
||||||
double test_fabs(double x) {
|
double test_sinh(double x) { return sinh(x); }
|
||||||
return fabs(x);
|
double test_sqrt(double x) { return sqrt(x); }
|
||||||
}
|
double test_tan(double x) { return tan(x); }
|
||||||
double test_floor(double x) {
|
double test_tanh(double x) { return tanh(x); }
|
||||||
return floor(x);
|
double test_tgamma(double x) { return tgamma(x); }
|
||||||
}
|
double test_trunc(double x) { return trunc(x); }
|
||||||
double test_lgamma(double x) {
|
|
||||||
return lgamma(x);
|
|
||||||
}
|
|
||||||
double test_lgamma_r(double x, int *signgamp) {
|
|
||||||
return lgamma_r(x, signgamp);
|
|
||||||
}
|
|
||||||
double test_log1p(double x) {
|
|
||||||
return log1p(x);
|
|
||||||
}
|
|
||||||
double test_log10(double x) {
|
|
||||||
return log10(x);
|
|
||||||
}
|
|
||||||
double test_log(double x) {
|
|
||||||
return log(x);
|
|
||||||
}
|
|
||||||
double test_pow(double x, double y) {
|
|
||||||
return pow(x, y);
|
|
||||||
}
|
|
||||||
double test_round(double x) {
|
|
||||||
return round(x);
|
|
||||||
}
|
|
||||||
double test_scalbn(double x, int n) {
|
|
||||||
return scalbn(x, n);
|
|
||||||
}
|
|
||||||
double test_sin(double x) {
|
|
||||||
return sin(x);
|
|
||||||
}
|
|
||||||
double test_sinh(double x) {
|
|
||||||
return sinh(x);
|
|
||||||
}
|
|
||||||
double test_sqrt(double x) {
|
|
||||||
return sqrt(x);
|
|
||||||
}
|
|
||||||
double test_tan(double x) {
|
|
||||||
return tan(x);
|
|
||||||
}
|
|
||||||
double test_tanh(double x) {
|
|
||||||
return tanh(x);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#undef finite
|
||||||
#undef fpclassify
|
#undef fpclassify
|
||||||
#undef isfinite
|
#undef isfinite
|
||||||
#undef isnormal
|
#undef isnormal
|
||||||
#undef isnan
|
#undef isnan
|
||||||
#undef isinf
|
#undef isinf
|
||||||
|
#undef signbit
|
||||||
|
|
||||||
#undef acosf
|
#undef acosf
|
||||||
#undef acoshf
|
#undef acoshf
|
||||||
@@ -26,12 +28,15 @@
|
|||||||
#undef fmaxf
|
#undef fmaxf
|
||||||
#undef floorf
|
#undef floorf
|
||||||
#undef fmodf
|
#undef fmodf
|
||||||
|
#undef frexpf
|
||||||
#undef hypotf
|
#undef hypotf
|
||||||
|
#undef ldexpf
|
||||||
#undef lgammaf
|
#undef lgammaf
|
||||||
#undef lgammaf_r
|
#undef lgammaf_r
|
||||||
#undef log1pf
|
#undef log1pf
|
||||||
#undef log10f
|
#undef log10f
|
||||||
#undef logf
|
#undef logf
|
||||||
|
#undef modff
|
||||||
#undef nanf
|
#undef nanf
|
||||||
#undef nearbyintf
|
#undef nearbyintf
|
||||||
#undef powf
|
#undef powf
|
||||||
@@ -42,12 +47,14 @@
|
|||||||
#undef sqrtf
|
#undef sqrtf
|
||||||
#undef tanf
|
#undef tanf
|
||||||
#undef tanhf
|
#undef tanhf
|
||||||
|
#undef truncf
|
||||||
|
|
||||||
#undef acos
|
#undef acos
|
||||||
#undef acosh
|
#undef acosh
|
||||||
#undef asin
|
#undef asin
|
||||||
#undef asinh
|
#undef asinh
|
||||||
#undef atan
|
#undef atan
|
||||||
|
#undef atan2
|
||||||
#undef atanh
|
#undef atanh
|
||||||
#undef ceil
|
#undef ceil
|
||||||
#undef copysign
|
#undef copysign
|
||||||
@@ -61,88 +68,129 @@
|
|||||||
#undef fmax
|
#undef fmax
|
||||||
#undef floor
|
#undef floor
|
||||||
#undef fmod
|
#undef fmod
|
||||||
|
#undef frexp
|
||||||
#undef hypot
|
#undef hypot
|
||||||
|
#undef ldexp
|
||||||
#undef lgamma
|
#undef lgamma
|
||||||
#undef lgamma_r
|
#undef lgamma_r
|
||||||
|
#undef log
|
||||||
#undef log1p
|
#undef log1p
|
||||||
#undef log10
|
#undef log10
|
||||||
#undef log
|
#undef log2
|
||||||
|
#undef logb
|
||||||
|
#undef modf
|
||||||
|
#undef nan
|
||||||
|
#undef nearbyint
|
||||||
#undef pow
|
#undef pow
|
||||||
|
#undef rint
|
||||||
#undef round
|
#undef round
|
||||||
|
#undef scalb
|
||||||
#undef scalbn
|
#undef scalbn
|
||||||
#undef sin
|
#undef sin
|
||||||
#undef sinh
|
#undef sinh
|
||||||
#undef sqrt
|
#undef sqrt
|
||||||
#undef tan
|
#undef tan
|
||||||
#undef tanh
|
#undef tanh
|
||||||
|
#undef tgamma
|
||||||
|
#undef trunc
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
|
inline constexpr int fpclassify(float x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x); }
|
||||||
|
inline constexpr bool isfinite(float x) { return __builtin_isfinite(x); }
|
||||||
|
inline constexpr bool isinf(float x) { return __builtin_isinf(x); }
|
||||||
|
inline constexpr bool isnan(float x) { return __builtin_isnan(x); }
|
||||||
|
inline constexpr bool isnormal(float x) { return __builtin_isnormal(x); }
|
||||||
|
inline constexpr bool signbit(float x) { return __builtin_signbit(x); }
|
||||||
|
|
||||||
static inline double acos(double x) { return __builtin_acos(x); }
|
inline constexpr float acos(float x) { return __builtin_acosf(x); }
|
||||||
static inline float acos(float x) { return __builtin_acosf(x); }
|
inline constexpr float acosh(float x) { return __builtin_acoshf(x); }
|
||||||
static inline double acosh(double x) { return __builtin_acosh(x); }
|
inline constexpr float asin(float x) { return __builtin_asinf(x); }
|
||||||
static inline float acosh(float x) { return __builtin_acoshf(x); }
|
inline constexpr float asinh(float x) { return __builtin_asinhf(x); }
|
||||||
static inline double asin(double x) { return __builtin_asin(x); }
|
inline constexpr float atan(float x) { return __builtin_atanf(x); }
|
||||||
static inline float asin(float x) { return __builtin_asinf(x); }
|
inline constexpr float atan2(float y, float x) { return __builtin_atan2f(y, x); }
|
||||||
static inline double asinh(double x) { return __builtin_asinh(x); }
|
inline constexpr float atanh(float x) { return __builtin_atanhf(x); }
|
||||||
static inline float asinh(float x) { return __builtin_asinhf(x); }
|
inline constexpr float ceil(float x) { return __builtin_ceilf(x); }
|
||||||
static inline double atan(double x) { return __builtin_atan(x); }
|
inline constexpr float copysign(float x, float y) { return __builtin_copysignf(x, y); }
|
||||||
static inline float atan(float x) { return __builtin_atanf(x); }
|
inline constexpr float cos(float x) { return __builtin_cosf(x); }
|
||||||
static inline double atanh(double x) { return __builtin_atanh(x); }
|
inline constexpr float cosh(float x) { return __builtin_coshf(x); }
|
||||||
static inline float atanh(float x) { return __builtin_atanhf(x); }
|
inline constexpr float exp(float x) { return __builtin_expf(x); }
|
||||||
static inline double ceil(double x) { return __builtin_ceil(x); }
|
inline constexpr float expm1(float x) { return __builtin_expm1f(x); }
|
||||||
static inline float ceil(float x) { return __builtin_ceilf(x); }
|
inline constexpr float fabs(float x) { return __builtin_fabsf(x); }
|
||||||
static inline double copysign(double x, double y) { return __builtin_copysign(x, y); }
|
inline constexpr float floor(float x) { return __builtin_floorf(x); }
|
||||||
static inline float copysign(float x, float y) { return __builtin_copysignf(x, y); }
|
inline constexpr float fmax(float x, float y) { return __builtin_fmaxf(x, y); }
|
||||||
static inline double cos(double x) { return __builtin_cos(x); }
|
inline constexpr float fmod(float x, float y) { return __builtin_fmodf(x, y); }
|
||||||
static inline float cos(float x) { return __builtin_cosf(x); }
|
inline constexpr float frexp(float x, int *exp) { return __builtin_frexpf(x, exp); }
|
||||||
static inline double cosh(double x) { return __builtin_cosh(x); }
|
inline constexpr float ldexp(float x, int exp) { return __builtin_ldexpf(x, exp); }
|
||||||
static inline float cosh(float x) { return __builtin_coshf(x); }
|
inline constexpr float lgamma(float x) { return __builtin_lgammaf(x); }
|
||||||
static inline double erf(double x) { return __builtin_erf(x); }
|
inline constexpr float lgamma_r(float x, int *signgamp) { return __builtin_lgammaf_r(x, signgamp); }
|
||||||
static inline double erfc(double x) { return __builtin_erfc(x); }
|
inline constexpr float log1p(float x) { return __builtin_log1pf(x); }
|
||||||
static inline double exp(double x) { return __builtin_exp(x); }
|
inline constexpr float log10(float x) { return __builtin_log10f(x); }
|
||||||
static inline float exp(float x) { return __builtin_expf(x); }
|
inline constexpr float log(float x) { return __builtin_logf(x); }
|
||||||
static inline double fabs(double x) { return __builtin_fabs(x); }
|
inline constexpr float modf(float x, float *iptr) { return __builtin_modff(x, iptr); }
|
||||||
static inline float fabs(float x) { return __builtin_fabsf(x); }
|
inline constexpr float nanf(const char *tagp) { return __builtin_nanf(tagp); }
|
||||||
static inline double fmax(double x, double y) { return __builtin_fmax(x, y); }
|
inline constexpr float nearbyint(float x) { return __builtin_nearbyintf(x); }
|
||||||
static inline float fmax(float x, float y) { return __builtin_fmaxf(x, y); }
|
inline constexpr float pow(float x, float y) { return __builtin_powf(x, y); }
|
||||||
static inline double floor(double x) { return __builtin_floor(x); }
|
inline constexpr float round(float x) { return __builtin_roundf(x); }
|
||||||
static inline float floor(float x) { return __builtin_floorf(x); }
|
inline constexpr float scalbn(float x, int exp) { return __builtin_scalbnf(x, exp); }
|
||||||
static inline double fmod(double x, double y) { return __builtin_fmod(x, y); }
|
inline constexpr float sin(float x) { return __builtin_sinf(x); }
|
||||||
static inline float fmod(float x, float y) { return __builtin_fmodf(x, y); }
|
inline constexpr float sinh(float x) { return __builtin_sinhf(x); }
|
||||||
static inline int fpclassify(double x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x); }
|
inline constexpr float sqrt(float x) { return __builtin_sqrtf(x); }
|
||||||
static inline int fpclassify(float x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x); }
|
inline constexpr float tan(float x) { return __builtin_tanf(x); }
|
||||||
static inline double hypot(double x, double y) { return __builtin_hypot(x, y); }
|
inline constexpr float tanh(float x) { return __builtin_tanhf(x); }
|
||||||
static inline float hypotf(float x, float y) { return __builtin_hypotf(x, y); }
|
inline constexpr float trunc(float x) { return __builtin_truncf(x); }
|
||||||
static inline bool isfinite(double x) { return __builtin_isfinite(x); }
|
|
||||||
static inline bool isfinite(float x) { return __builtin_isfinite(x); }
|
inline constexpr int fpclassify(double x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x); }
|
||||||
static inline bool isinf(double x) { return __builtin_isinf(x); }
|
inline constexpr bool isfinite(double x) { return __builtin_isfinite(x); }
|
||||||
static inline bool isinf(float x) { return __builtin_isinf(x); }
|
inline constexpr bool isinf(double x) { return __builtin_isinf(x); }
|
||||||
static inline bool isnan(double x) { return __builtin_isnan(x); }
|
inline constexpr bool isnan(double x) { return __builtin_isnan(x); }
|
||||||
static inline bool isnan(float x) { return __builtin_isnan(x); }
|
inline constexpr bool isnormal(double x) { return __builtin_isnormal(x); }
|
||||||
static inline bool isnormal(double x) { return __builtin_isnormal(x); }
|
inline constexpr bool signbit(double x) { return __builtin_signbit(x); }
|
||||||
static inline bool isnormal(float x) { return __builtin_isnormal(x); }
|
|
||||||
static inline double lgamma(double x) { return __builtin_lgamma(x); }
|
inline constexpr double acos(double x) { return __builtin_acos(x); }
|
||||||
static inline float lgamma(float x) { return __builtin_lgammaf(x); }
|
inline constexpr double acosh(double x) { return __builtin_acosh(x); }
|
||||||
static inline double log10(double x) { return __builtin_log10(x); }
|
inline constexpr double asin(double x) { return __builtin_asin(x); }
|
||||||
static inline float log10(float x) { return __builtin_log10f(x); }
|
inline constexpr double asinh(double x) { return __builtin_asinh(x); }
|
||||||
static inline double log(double x) { return __builtin_log(x); }
|
inline constexpr double atan(double x) { return __builtin_atan(x); }
|
||||||
static inline float log(float x) { return __builtin_logf(x); }
|
inline constexpr double atan2(double y, double x) { return __builtin_atan2(y, x); }
|
||||||
static inline double pow(double x, double y) { return __builtin_pow(x, y); }
|
inline constexpr double atanh(double x) { return __builtin_atanh(x); }
|
||||||
static inline float pow(float x, float y) { return __builtin_powf(x, y); }
|
inline constexpr double ceil(double x) { return __builtin_ceil(x); }
|
||||||
static inline double round(double x) { return __builtin_round(x); }
|
inline constexpr double copysign(double x, double y) { return __builtin_copysign(x, y); }
|
||||||
static inline float round(float x) { return __builtin_roundf(x); }
|
inline constexpr double cos(double x) { return __builtin_cos(x); }
|
||||||
static inline double sin(double x) { return __builtin_sin(x); }
|
inline constexpr double cosh(double x) { return __builtin_cosh(x); }
|
||||||
static inline float sin(float x) { return __builtin_sinf(x); }
|
inline constexpr double erf(double x) { return __builtin_erf(x); }
|
||||||
static inline double sinh(double x) { return __builtin_sinh(x); }
|
inline constexpr double erfc(double x) { return __builtin_erfc(x); }
|
||||||
static inline float sinh(float x) { return __builtin_sinhf(x); }
|
inline constexpr double exp(double x) { return __builtin_exp(x); }
|
||||||
static inline double sqrt(double x) { return __builtin_sqrt(x); }
|
inline constexpr double expm1(double x) { return __builtin_expm1(x); }
|
||||||
static inline float sqrt(float x) { return __builtin_sqrtf(x); }
|
inline constexpr double fabs(double x) { return __builtin_fabs(x); }
|
||||||
static inline double tan(double x) { return __builtin_tan(x); }
|
inline constexpr double floor(double x) { return __builtin_floor(x); }
|
||||||
static inline float tan(float x) { return __builtin_tanf(x); }
|
inline constexpr double fmax(double x, double y) { return __builtin_fmax(x, y); }
|
||||||
static inline double tanh(double x) { return __builtin_tanh(x); }
|
inline constexpr double fmod(double x, double y) { return __builtin_fmod(x, y); }
|
||||||
static inline float tanh(float x) { return __builtin_tanhf(x); }
|
inline constexpr double frexp(double x, int *exp) { return __builtin_frexp(x, exp); }
|
||||||
|
inline constexpr double hypot(double x, double y) { return __builtin_hypot(x, y); }
|
||||||
|
inline constexpr double ldexp(double x, int exp) { return __builtin_scalbn(x, exp); }
|
||||||
|
inline constexpr double lgamma(double x) { return __builtin_lgamma(x); }
|
||||||
|
inline constexpr double lgamma_r(double x, int *signgamp) { return __builtin_lgamma_r(x, signgamp); }
|
||||||
|
inline constexpr double log(double x) { return __builtin_log(x); }
|
||||||
|
inline constexpr double log1p(double x) { return __builtin_log1p(x); }
|
||||||
|
inline constexpr double log10(double x) { return __builtin_log10(x); }
|
||||||
|
inline constexpr double log2(double x) { return __builtin_log2(x); }
|
||||||
|
inline constexpr double logb(double x) { return __builtin_logb(x); }
|
||||||
|
inline constexpr double modf(double x, double *iptr) { return __builtin_modf(x, iptr); }
|
||||||
|
inline constexpr double nan(const char *tagp) { return __builtin_nan(tagp); }
|
||||||
|
inline constexpr double nearbyint(double x) { return __builtin_nearbyint(x); }
|
||||||
|
inline constexpr double pow(double x, double y) { return __builtin_pow(x, y); }
|
||||||
|
inline constexpr double rint(double x) { return __builtin_rint(x); }
|
||||||
|
inline constexpr double round(double x) { return __builtin_round(x); }
|
||||||
|
inline constexpr double scalb(double x, double exp) { return __builtin_scalb(x, exp); }
|
||||||
|
inline constexpr double scalbn(double x, int exp) { return __builtin_scalbn(x, exp); }
|
||||||
|
inline constexpr double sin(double x) { return __builtin_sin(x); }
|
||||||
|
inline constexpr double sinh(double x) { return __builtin_sinh(x); }
|
||||||
|
inline constexpr double sqrt(double x) { return __builtin_sqrt(x); }
|
||||||
|
inline constexpr double tan(double x) { return __builtin_tan(x); }
|
||||||
|
inline constexpr double tanh(double x) { return __builtin_tanh(x); }
|
||||||
|
inline constexpr double tgamma(double x) { return __builtin_tgamma(x); }
|
||||||
|
inline constexpr double trunc(double x) { return __builtin_trunc(x); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user