double
horner
(
double
*
coeff
,
int
n
,
double
x
){
int
i
;
double
p
;
p
=
coeff
[
n
];
for
(
i
=
n
-
1
;
i
>=
0
;
i
--)
p
=
p
*
x
+
coeff
[
i
];
return
p
;
}
// horner