\Header{polyroot}{Find Zeros of a Complex Polynomial}
\keyword{math}{polyroot}
\begin{Usage}
\begin{verbatim}
polyroot(z)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{z}] the vector of polynomial coefficients in decreasing order.
\end{ldescription}
\end{Arguments}
\begin{Description}
A polynomial of degree \eqn{n - 1}{},
\deqn{
p(x) = z_1 + z_2 x + \cdots + z_n x^{n-1}}{p(x) = z1 + z2 * x + \ldots + z[n] * x^(n-1)}
is given by its coefficient vector \texttt{z[1:n]}.
\texttt{polyroot} returns the \eqn{n-1}{} complex zeros of \eqn{p(x)}{}
using the Jenkins-Traub algorithm.\end{Description}
\begin{Value}
A complex vector of length \eqn{n - 1}{}, where \eqn{n}{} is
\texttt{length(z)}.\end{Value}
\begin{References}
Jenkins and Traub (1972).
\emph{TOMS Algorithm 419}.
Comm. ACM \bold{15}, 97-99.\end{References}
\begin{SeeAlso}
\texttt{\Link{uniroot}} for numerical root finding of arbitrary
functions;
\texttt{\Link{complex}} and the \texttt{zero} example in the demos
directory.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
polyroot(c(1, 2, 1))
round(polyroot(choose(8, 0:8)), 11) # guess what!
for (n1 in 1:4) print(polyroot(1:n1), digits = 4)
\end{ExampleCode}
\end{Examples}

