7 #define check_d1(func, param, expected) \
9 int err; hex_union ur; hex_union up; \
10 double result = func(param); up.f = param; ur.f = result; \
11 errors += (err = (result != (expected))); \
13 ? printf("FAIL: %s(%g/"HEXFMT")=%g/"HEXFMT" (expected %g)\n", \
14 #func, (double)(param), (long long)up.hex, result, (long long)ur.hex, (double)(expected)) \
15 : printf("PASS: %s(%g)=%g\n", #func, (double)(param), result); \
18 #define HEXFMT "%08llx"
29 check_d1(rint
, 0.6, 1.0);
31 printf("Errors: %d\n", errors
);