polyroot                package:base                R Documentation

_F_i_n_d _Z_e_r_o_s _o_f _a _R_e_a_l _o_r _C_o_m_p_l_e_x _P_o_l_y_n_o_m_i_a_l

_D_e_s_c_r_i_p_t_i_o_n:

     Find zeros of a real or complex polynomial.

_U_s_a_g_e:

     polyroot(z)

_A_r_g_u_m_e_n_t_s:

       z: the vector of polynomial coefficients in increasing order.

_D_e_t_a_i_l_s:

     A polynomial of degree n - 1,

              p(x) = z1 + z2 * x + ... + z[n] * x^(n-1)

     is given by its coefficient vector `z[1:n]'. `polyroot' returns
     the n-1 complex zeros of p(x) using the Jenkins-Traub algorithm.

     If the coefficient vector `z' has zeroes for the highest powers,
     these are discarded.

_V_a_l_u_e:

     A complex vector of length n - 1, where n is the position of the
     largest non-zero element of `z'.

_R_e_f_e_r_e_n_c_e_s:

     Jenkins and Traub (1972) TOMS Algorithm 419. Comm. ACM, 15, 97-99.

_S_e_e _A_l_s_o:

     `uniroot' for numerical root finding of arbitrary functions;
     `complex' and the `zero' example in the demos directory.

_E_x_a_m_p_l_e_s:

     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)
     polyroot(c(1, 2, 1, 0, 0)) # same as the first

