function value = companion_condition ( n, x )

%*****************************************************************************80
%
%% COMPANION_CONDITION returns the L1 condition of the COMPANION matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 January 2014
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of A.
%
%    real X(N), the coefficients of a polynomial.
%
%  Output:
%
%    real VALUE, the L1 condition.
%
  a_norm = abs ( x(1) );
  for i = 2 : n
    a_norm = max ( a_norm, 1.0 + abs ( x(i) ) );
  end

  b_norm = 1.0 / abs ( x(1) );
  for i = 2 : n
    b_norm = max ( b_norm, 1.0 + abs ( x(i) ) / abs ( x(1) ) );
  end

  value = a_norm * b_norm;

  return
end
