gcd                 package:polynom                 R Documentation

_G_C_D _a_n_d _L_C_M _f_o_r _P_o_l_y_n_o_m_i_a_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute the greatest common divisor (GCD) and least common
     multiple (LCM) of a collection of polynomials and polylists.

_U_s_a_g_e:

     ## S3 method for class 'polylist':
     GCD(...)
     ## S3 method for class 'polynomial':
     GCD(...)
     ## S3 method for class 'polylist':
     LCM(...)
     ## S3 method for class 'polynomial':
     LCM(...)

_A_r_g_u_m_e_n_t_s:

     ...: a list of objects of class 'polynomial' or 'polylist'.

_E_x_a_m_p_l_e_s:

     pl <- polylist(poly.from.roots(-1),
                    poly.from.roots(c(-1, -1)),
                    poly.from.roots(1))
     GCD(pl)
     GCD(pl[-3])
     LCM(pl)
     LCM(pl, pl, pl[[2]])

