function determ = companion_determinant ( n, x )

%*****************************************************************************80
%
%% companion_determinant() returns the determinant of the COMPANION matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 October 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of A.
%
%    Input, real X(N), the coefficients of a polynomial.
%
%  Output:
%
%    real DETERM, the determinant.
%
  if ( mod ( n, 2 ) == 1 )
    determ = + x(1);
  else
    determ = - x(1);
  end

  return
end
