function value = factor_value_single ( r, x )

%*****************************************************************************80
%
%% factor_value_single evaluates a polynomial in factor form.
%
%  Input:
%
%    real r(d): the roots of the polynomial.
%
%    real X: the evaluation point.
%
%  Output:
%
%    real value: the value of the polynomial at X.
%
  d = length ( r );
  value = single ( 1.0 );
  for i = 1 : d
    value = single ( value ) * single ( x - r(i) );
  end

  return
end
