25 #ifndef __CLANG_TGMATH_H
26 #define __CLANG_TGMATH_H
36 #if defined(__APPLE__) && __STDC_HOSTED__ && __has_include_next(<tgmath.h>)
37 # include_next <tgmath.h>
44 #define _TG_ATTRSp __attribute__((__overloadable__))
45 #define _TG_ATTRS __attribute__((__overloadable__, __always_inline__))
65 #define __tg_promote1(__x) (__typeof__(__tg_promote(__x)))
66 #define __tg_promote2(__x, __y) (__typeof__(__tg_promote(__x) + \
68 #define __tg_promote3(__x, __y, __z) (__typeof__(__tg_promote(__x) + \
90 static double _Complex
94 static long double _Complex
99 #define acos(__x) __tg_acos(__tg_promote1((__x))(__x))
115 static float _Complex
119 static double _Complex
123 static long double _Complex
128 #define asin(__x) __tg_asin(__tg_promote1((__x))(__x))
144 static float _Complex
148 static double _Complex
152 static long double _Complex
157 #define atan(__x) __tg_atan(__tg_promote1((__x))(__x))
173 static float _Complex
177 static double _Complex
181 static long double _Complex
186 #define acosh(__x) __tg_acosh(__tg_promote1((__x))(__x))
202 static float _Complex
206 static double _Complex
210 static long double _Complex
215 #define asinh(__x) __tg_asinh(__tg_promote1((__x))(__x))
231 static float _Complex
235 static double _Complex
239 static long double _Complex
244 #define atanh(__x) __tg_atanh(__tg_promote1((__x))(__x))
260 static float _Complex
264 static double _Complex
268 static long double _Complex
273 #define cos(__x) __tg_cos(__tg_promote1((__x))(__x))
289 static float _Complex
293 static double _Complex
297 static long double _Complex
302 #define sin(__x) __tg_sin(__tg_promote1((__x))(__x))
318 static float _Complex
322 static double _Complex
326 static long double _Complex
331 #define tan(__x) __tg_tan(__tg_promote1((__x))(__x))
347 static float _Complex
351 static double _Complex
355 static long double _Complex
360 #define cosh(__x) __tg_cosh(__tg_promote1((__x))(__x))
376 static float _Complex
380 static double _Complex
384 static long double _Complex
389 #define sinh(__x) __tg_sinh(__tg_promote1((__x))(__x))
405 static float _Complex
409 static double _Complex
413 static long double _Complex
418 #define tanh(__x) __tg_tanh(__tg_promote1((__x))(__x))
434 static float _Complex
438 static double _Complex
442 static long double _Complex
447 #define exp(__x) __tg_exp(__tg_promote1((__x))(__x))
463 static float _Complex
467 static double _Complex
471 static long double _Complex
476 #define log(__x) __tg_log(__tg_promote1((__x))(__x))
492 static float _Complex
496 static double _Complex
500 static long double _Complex
503 {
return cpowl(__x, __y);}
506 #define pow(__x, __y) __tg_pow(__tg_promote2((__x), (__y))(__x), \
507 __tg_promote2((__x), (__y))(__y))
523 static float _Complex
527 static double _Complex
531 static long double _Complex
536 #define sqrt(__x) __tg_sqrt(__tg_promote1((__x))(__x))
565 #define fabs(__x) __tg_fabs(__tg_promote1((__x))(__x))
582 #define atan2(__x, __y) __tg_atan2(__tg_promote2((__x), (__y))(__x), \
583 __tg_promote2((__x), (__y))(__y))
600 #define cbrt(__x) __tg_cbrt(__tg_promote1((__x))(__x))
617 #define ceil(__x) __tg_ceil(__tg_promote1((__x))(__x))
634 #define copysign(__x, __y) __tg_copysign(__tg_promote2((__x), (__y))(__x), \
635 __tg_promote2((__x), (__y))(__y))
652 #define erf(__x) __tg_erf(__tg_promote1((__x))(__x))
669 #define erfc(__x) __tg_erfc(__tg_promote1((__x))(__x))
686 #define exp2(__x) __tg_exp2(__tg_promote1((__x))(__x))
703 #define expm1(__x) __tg_expm1(__tg_promote1((__x))(__x))
720 #define fdim(__x, __y) __tg_fdim(__tg_promote2((__x), (__y))(__x), \
721 __tg_promote2((__x), (__y))(__y))
738 #define floor(__x) __tg_floor(__tg_promote1((__x))(__x))
745 {
return fmaf(__x, __y, __z);}
750 {
return fma(__x, __y, __z);}
755 {
return fmal(__x, __y, __z);}
758 #define fma(__x, __y, __z) \
759 __tg_fma(__tg_promote3((__x), (__y), (__z))(__x), \
760 __tg_promote3((__x), (__y), (__z))(__y), \
761 __tg_promote3((__x), (__y), (__z))(__z))
778 #define fmax(__x, __y) __tg_fmax(__tg_promote2((__x), (__y))(__x), \
779 __tg_promote2((__x), (__y))(__y))
796 #define fmin(__x, __y) __tg_fmin(__tg_promote2((__x), (__y))(__x), \
797 __tg_promote2((__x), (__y))(__y))
814 #define fmod(__x, __y) __tg_fmod(__tg_promote2((__x), (__y))(__x), \
815 __tg_promote2((__x), (__y))(__y))
832 #define frexp(__x, __y) __tg_frexp(__tg_promote1((__x))(__x), __y)
849 #define hypot(__x, __y) __tg_hypot(__tg_promote2((__x), (__y))(__x), \
850 __tg_promote2((__x), (__y))(__y))
867 #define ilogb(__x) __tg_ilogb(__tg_promote1((__x))(__x))
884 #define ldexp(__x, __y) __tg_ldexp(__tg_promote1((__x))(__x), __y)
901 #define lgamma(__x) __tg_lgamma(__tg_promote1((__x))(__x))
918 #define llrint(__x) __tg_llrint(__tg_promote1((__x))(__x))
935 #define llround(__x) __tg_llround(__tg_promote1((__x))(__x))
952 #define log10(__x) __tg_log10(__tg_promote1((__x))(__x))
969 #define log1p(__x) __tg_log1p(__tg_promote1((__x))(__x))
986 #define log2(__x) __tg_log2(__tg_promote1((__x))(__x))
1003 #define logb(__x) __tg_logb(__tg_promote1((__x))(__x))
1020 #define lrint(__x) __tg_lrint(__tg_promote1((__x))(__x))
1037 #define lround(__x) __tg_lround(__tg_promote1((__x))(__x))
1054 #define nearbyint(__x) __tg_nearbyint(__tg_promote1((__x))(__x))
1071 #define nextafter(__x, __y) __tg_nextafter(__tg_promote2((__x), (__y))(__x), \
1072 __tg_promote2((__x), (__y))(__y))
1089 #define nexttoward(__x, __y) __tg_nexttoward(__tg_promote1((__x))(__x), (__y))
1106 #define remainder(__x, __y) __tg_remainder(__tg_promote2((__x), (__y))(__x), \
1107 __tg_promote2((__x), (__y))(__y))
1114 {
return remquof(__x, __y, __z);}
1119 {
return remquo(__x, __y, __z);}
1124 {
return remquol(__x, __y, __z);}
1127 #define remquo(__x, __y, __z) \
1128 __tg_remquo(__tg_promote2((__x), (__y))(__x), \
1129 __tg_promote2((__x), (__y))(__y), \
1147 #define rint(__x) __tg_rint(__tg_promote1((__x))(__x))
1164 #define round(__x) __tg_round(__tg_promote1((__x))(__x))
1181 #define scalbn(__x, __y) __tg_scalbn(__tg_promote1((__x))(__x), __y)
1198 #define scalbln(__x, __y) __tg_scalbln(__tg_promote1((__x))(__x), __y)
1215 #define tgamma(__x) __tg_tgamma(__tg_promote1((__x))(__x))
1232 #define trunc(__x) __tg_trunc(__tg_promote1((__x))(__x))
1261 #define carg(__x) __tg_carg(__tg_promote1((__x))(__x))
1290 #define cimag(__x) __tg_cimag(__tg_promote1((__x))(__x))
1294 static float _Complex
1298 static double _Complex
1302 static long double _Complex
1306 static float _Complex
1310 static double _Complex
1314 static long double _Complex
1319 #define conj(__x) __tg_conj(__tg_promote1((__x))(__x))
1323 static float _Complex
1327 static double _Complex
1331 static long double _Complex
1335 static float _Complex
1339 static double _Complex
1343 static long double _Complex
1348 #define cproj(__x) __tg_cproj(__tg_promote1((__x))(__x))
1377 #define creal(__x) __tg_creal(__tg_promote1((__x))(__x))
static __inline unsigned char unsigned int unsigned int __y
static float _TG_ATTRS __tg_sin(float __x)
static float _TG_ATTRS __tg_fmax(float __x, float __y)
#define fma(__x, __y, __z)
static float _Complex _TG_ATTRS __tg_conj(float __x)
static float _TG_ATTRS __tg_cosh(float __x)
static float _TG_ATTRS __tg_round(float __x)
static float _TG_ATTRS __tg_tgamma(float __x)
static float _TG_ATTRS __tg_expm1(float __x)
static float _TG_ATTRS __tg_nexttoward(float __x, long double __y)
static float _TG_ATTRS __tg_fma(float __x, float __y, float __z)
static float _TG_ATTRS __tg_exp(float __x)
static float _TG_ATTRS __tg_acos(float __x)
static float _TG_ATTRS __tg_carg(float __x)
static float _TG_ATTRS __tg_asinh(float __x)
static float _TG_ATTRS __tg_erf(float __x)
static float _TG_ATTRS __tg_logb(float __x)
static float _TG_ATTRS __tg_erfc(float __x)
static float _TG_ATTRS __tg_atan2(float __x, float __y)
static float _TG_ATTRS __tg_log(float __x)
static float _TG_ATTRS __tg_fdim(float __x, float __y)
static float _TG_ATTRS __tg_creal(float __x)
static float _TG_ATTRS __tg_nextafter(float __x, float __y)
#define remainder(__x, __y)
static long long _TG_ATTRS __tg_llrint(float __x)
static long _TG_ATTRS __tg_lrint(float __x)
static float _TG_ATTRS __tg_lgamma(float __x)
static float _TG_ATTRS __tg_remquo(float __x, float __y, int *__z)
char __v64qi __attribute__((__vector_size__(64)))
void _Argument_type_is_not_arithmetic
static float _TG_ATTRS __tg_fmin(float __x, float __y)
#define copysign(__x, __y)
#define nexttoward(__x, __y)
static float _TG_ATTRS __tg_hypot(float __x, float __y)
static float _TG_ATTRS __tg_log2(float __x)
static float _TG_ATTRS __tg_frexp(float __x, int *__y)
static float _TG_ATTRS __tg_log10(float __x)
static float _TG_ATTRS __tg_nearbyint(float __x)
static float _TG_ATTRS __tg_atan(float __x)
static float _TG_ATTRS __tg_copysign(float __x, float __y)
static __inline unsigned char unsigned int __x
static long long _TG_ATTRS __tg_llround(float __x)
static float _Complex _TG_ATTRS __tg_cproj(float __x)
static float _TG_ATTRS __tg_sinh(float __x)
static float _TG_ATTRS __tg_ldexp(float __x, int __y)
static float _TG_ATTRS __tg_rint(float __x)
static float _TG_ATTRS __tg_fabs(float __x)
static float _TG_ATTRS __tg_acosh(float __x)
static float _TG_ATTRS __tg_asin(float __x)
static float _TG_ATTRS __tg_tan(float __x)
static float _TG_ATTRS __tg_ceil(float __x)
static float _TG_ATTRS __tg_pow(float __x, float __y)
#define remquo(__x, __y, __z)
static float _TG_ATTRS __tg_scalbln(float __x, long __y)
static long _TG_ATTRS __tg_lround(float __x)
#define nextafter(__x, __y)
static _Argument_type_is_not_arithmetic __overloadable__
static float _TG_ATTRS __tg_cimag(float __x)
static float _TG_ATTRS __tg_remainder(float __x, float __y)
static float _TG_ATTRS __tg_scalbn(float __x, int __y)
static float _TG_ATTRS __tg_exp2(float __x)
static float _TG_ATTRS __tg_trunc(float __x)
static float _TG_ATTRS __tg_fmod(float __x, float __y)
__DEVICE__ float nexttowardf(float __from, double __to)
static int _TG_ATTRS __tg_ilogb(float __x)
static float _TG_ATTRS __tg_floor(float __x)
#define scalbln(__x, __y)
static float _TG_ATTRS __tg_log1p(float __x)
static float _TG_ATTRS __tg_cbrt(float __x)
static float _TG_ATTRS __tg_cos(float __x)
static _Argument_type_is_not_arithmetic __tg_promote(...) __attribute__((__unavailable__
static float _TG_ATTRS __tg_sqrt(float __x)
static float _TG_ATTRS __tg_atanh(float __x)
static float _TG_ATTRS __tg_tanh(float __x)