3 #if FLT_EVAL_METHOD==0 || FLT_EVAL_METHOD==1
4 #define EPS DBL_EPSILON
5 #elif FLT_EVAL_METHOD==2
6 #define EPS LDBL_EPSILON
8 static const double_t toint
= 1/EPS
;
10 double round(double x
)
12 union {double f
; uint64_t i
;} u
= {x
};
13 int e
= u
.i
>> 52 & 0x7ff;
21 /* raise inexact if x!=0 */
22 FORCE_EVAL(x
+ toint
);
25 y
= x
+ toint
- toint
- x
;