3 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
4 long double modfl(long double x, long double *iptr)
13 #elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
15 static const long double toint = 1/LDBL_EPSILON;
17 long double modfl(long double x, long double *iptr)
19 union ldshape u = {x};
20 int e = (u.i.se & 0x7fff) - 0x3fff;
25 /* no fractional part */
26 if (e >= LDBL_MANT_DIG-1) {
30 return s ? -0.0 : 0.0;
35 *iptr = s ? -0.0 : 0.0;
39 /* raises spurious inexact */
41 y = absx + toint - toint - absx;
44 return s ? -0.0 : 0.0;