10 #define TEST(expr, res) \
11 if (sizeof (expr) != res) \
13 printf ("sizeof(%s) == %zu, expected %zu\n", #expr, \
14 sizeof (expr), (size_t) (res)); \
18 TEST (creal (1.0), sizeof (double));
19 TEST (creal (1.0 + 1.0i
), sizeof (double));
20 TEST (creal (1.0l), sizeof (long double));
21 TEST (creal (1.0l + 1.0li
), sizeof (long double));
22 TEST (creal (1.0f
), sizeof (float));
23 TEST (creal (1.0f
+ 1.0fi
), sizeof (float));
25 TEST (cimag (1.0), sizeof (double));
26 TEST (cimag (1.0 + 1.0i
), sizeof (double));
27 TEST (cimag (1.0l), sizeof (long double));
28 TEST (cimag (1.0l + 1.0li
), sizeof (long double));
29 TEST (cimag (1.0f
), sizeof (float));
30 TEST (cimag (1.0f
+ 1.0fi
), sizeof (float));
32 TEST (fabs (1.0), sizeof (double));
33 TEST (fabs (1.0 + 1.0i
), sizeof (double));
34 TEST (fabs (1.0l), sizeof (long double));
35 TEST (fabs (1.0l + 1.0li
), sizeof (long double));
36 TEST (fabs (1.0f
), sizeof (float));
37 TEST (fabs (1.0f
+ 1.0fi
), sizeof (float));
39 TEST (carg (1.0), sizeof (double));
40 TEST (carg (1.0 + 1.0i
), sizeof (double));
41 TEST (carg (1.0l), sizeof (long double));
42 TEST (carg (1.0l + 1.0li
), sizeof (long double));
43 TEST (carg (1.0f
), sizeof (float));
44 TEST (carg (1.0f
+ 1.0fi
), sizeof (float));