X-Git-Url: http://nsz.repo.hu/git/?p=libm;a=blobdiff_plain;f=include%2Ftgmath.h;h=75f8aa6fd131281b6a0d58b42d8d1bd8a1ac1176;hp=169601a59bd6c1d63cf05338c2ca58b40934ec94;hb=da2f1654bc418e800e8dce3e2caf80d36692e0b5;hpb=fc04675a09587031d5daebcb877b73976890b71d diff --git a/include/tgmath.h b/include/tgmath.h index 169601a..75f8aa6 100644 --- a/include/tgmath.h +++ b/include/tgmath.h @@ -40,6 +40,13 @@ double complex: c ## __fun, \ long double complex: c ## __fun ## l, \ default: __fun) +#define __tg_real_complex_fabs(x) _Generic(x, \ + float: fabsf, \ + long double: fabsl, \ + float complex: cabsf, \ + double complex: cabs, \ + long double complex: cabsl, \ + default: fabs) #define acos(x) __tg_real_complex(acos, (x))(x) #define acosh(x) __tg_real_complex(acosh, (x))(x) @@ -63,7 +70,7 @@ #define exp(x) __tg_real_complex(exp, (x))(x) #define exp2(x) __tg_real(exp2, (x))(x) #define expm1(x) __tg_real(expm1, (x))(x) -#define fabs(x) __tg_real_complex(fabs, (x))(x) +#define fabs(x) __tg_real_complex_fabs(x)(x) #define fdim(x) __tg_real(fdim, (x))(x) #define floor(x) __tg_real(floor, (x))(x) #define fma(x,y,z) __tg_real_3(fma, (x), (y), (z))((x), (y), (z))