6 #define EPS FLT_EPSILON
7 #elif FLT_EVAL_METHOD==1
8 #define EPS DBL_EPSILON
9 #elif FLT_EVAL_METHOD==2
10 #define EPS LDBL_EPSILON
12 static const float_t toint = 1/EPS;
16 union {float f; uint32_t i;} u = {x};
17 int e = u.i>>23 & 0xff;
24 y = x - toint + toint;
26 y = x + toint - toint;
28 return s ? -0.0f : 0.0f;