1 #define MAIN(x) poly##x
5 static void print_(a_float
const *a
, a_size n
)
8 a_forenum(a_size
, i
, n
)
10 printf(A_FLOAT_PRI("", "g"), a
[i
]);
11 if (i
< n
- 1) { putchar(','); }
16 int main(int argc
, char *argv
[]) // NOLINT(misc-definitions-in-headers)
21 a_float x4
[] = {A_FLOAT_C(1.0), A_FLOAT_C(2.0), A_FLOAT_C(3.0), A_FLOAT_C(4.0)};
23 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 4, x
));
26 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 4, x
));
29 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_evar(x4
, 4, x
));
31 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 3, x
));
34 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_eval(x4
, 3, x
));
36 printf("=" A_FLOAT_PRI("", "g") "\n", a_poly_evar(x4
, 3, x
));