1 #define MAIN(x) poly##x
5 static void print_(a_float
const *a
, a_size n
)
9 A_FORENUM(a_size
, i
, n
)
11 printf(A_FLOAT_PRI("", "g"), a
[i
]);
12 if (i
< n
- 1) { (void)putchar(','); }
17 int main(int argc
, char *argv
[]) /* NOLINT(misc-definitions-in-headers) */
20 a_float x4
[] = {A_FLOAT_C(1.0), A_FLOAT_C(2.0), A_FLOAT_C(3.0), A_FLOAT_C(4.0)};
22 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 4, x
));
25 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 4, x
));
28 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_evar(x4
, 4, x
));
30 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 3, x
));
33 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 3, x
));
35 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_evar(x4
, 3, x
));