$R(x) = \frac {P(x)} {Q(x)} =\frac
{A_P*P_1(x)*P_2(x)*...*P_m(x)*g_P(x)}
{A_Q*Q_1(x)*Q_2(x)*...*Q_n(x)*g_Q(x)}$ .

where $P_j(x) =(x- r_j)^{p_j}$, for $ j = 1,2, ... , m$,
$Q_i(x) =(x- s_i)^{q_i}$, for $ i = 1,2, ... , n$, and
$g_P$ and $g_Q$ are monic polynomials with no real roots.