X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Finternal%2Flibm.h;h=a71c4c05ab092b77bfd2c24e8a6eaab569745bea;hp=2092763e1e6cd561daaf76a7bdfe6e02a7046bca;hb=328810d32524e4928fec50b57e37e1bf330b2e40;hpb=9e2a895aaaa4a3985e94ae4f3e24c1af65f9bb34 diff --git a/src/internal/libm.h b/src/internal/libm.h index 2092763e..a71c4c05 100644 --- a/src/internal/libm.h +++ b/src/internal/libm.h @@ -32,6 +32,19 @@ union dshape { uint64_t bits; }; +#define FORCE_EVAL(x) do { \ + if (sizeof(x) == sizeof(float)) { \ + volatile float __x; \ + __x = (x); \ + } else if (sizeof(x) == sizeof(double)) { \ + volatile double __x; \ + __x = (x); \ + } else { \ + volatile long double __x; \ + __x = (x); \ + } \ +} while(0) + /* Get two 32 bit ints from a double. */ #define EXTRACT_WORDS(hi,lo,d) \ do { \ @@ -135,6 +148,7 @@ float __tandf(double,int); float __expo2f(float); float complex __ldexp_cexpf(float complex,int); +int __rem_pio2l(long double, long double *); long double __sinl(long double, long double, int); long double __cosl(long double, long double); long double __tanl(long double, long double, int); @@ -172,14 +186,6 @@ union lcomplex { long double a[2]; }; -// FIXME: move to complex.h ? -#define creal(z) ((double)(z)) -#define crealf(z) ((float)(z)) -#define creall(z) ((long double)(z)) -#define cimag(z) ((union dcomplex){(z)}.a[1]) -#define cimagf(z) ((union fcomplex){(z)}.a[1]) -#define cimagl(z) ((union lcomplex){(z)}.a[1]) - /* x + y*I is not supported properly by gcc */ #define cpack(x,y) ((union dcomplex){.a={(x),(y)}}.z) #define cpackf(x,y) ((union fcomplex){.a={(x),(y)}}.z)