4 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5 int ilogbl(long double x)
9 #elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
10 int ilogbl(long double x)
12 #pragma STDC FENV_ACCESS ON
13 union ldshape u = {x};
15 int e = u.i.se & 0x7fff;
23 for (e = -0x3fff+1; m>>63 == 0; e--, m<<=1);
28 return m<<1 ? FP_ILOGBNAN : INT_MAX;
32 #elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
33 int ilogbl(long double x)
35 #pragma STDC FENV_ACCESS ON
36 union ldshape u = {x};
37 int e = u.i.se & 0x7fff;
46 return ilogbl(x) - 120;
51 return u.f ? FP_ILOGBNAN : INT_MAX;