function c = factor_to_poly ( r )

%*****************************************************************************80
%
%% factor_to_poly returns the coefficients of a polynomial given in factor form.
%
%  Input:
%
%    real r(n): the roots of the polynomial.
%
%  Output:
%
%    real c(n+1): the coefficients of the polynomial.
%
  n = length ( r );
  c = 1.0;
  for i = 1 : n
    c = poly_multiply ( c, [ -r(i), 1.0 ] );
  end
  return
end
