fix atan2,rename {hypot,hypot3} to {norm2,norm3}
[liba.git] / src / poly.c
blob24497574bf467d832c79504628bbf146513f132e
1 #define LIBA_POLY_C
2 #include "a/poly.h"
4 void a_poly_swap_(a_float *a, a_float *b)
6 for (; a < --b; ++a)
8 a_float _c;
9 _c = *a;
10 *a = *b;
11 *b = _c;
15 a_float a_poly_eval_(a_float const *a, a_float const *b, a_float x)
17 a_float y;
18 for (y = *--b; b > a;)
20 y = y * x + *--b;
22 return y;
25 a_float a_poly_evar_(a_float const *a, a_float const *b, a_float x)
27 a_float y;
28 for (y = *a; ++a < b;)
30 y = y * x + *a;
32 return y;