function diophantine_bounds_print ( lo, hi )

%*****************************************************************************80
%
%% diophantine_bounds_print() prints bounds on solutions of a Diophantine equation.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 July 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer lo(n), hi(n): the lower and upper bounds for each component.
%    Any component of lo() can be -Inf, and any component of hi() can be +Inf.
%
  n = length ( lo );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Bounds imposed on Diophantine equation solutions:\n' );
  fprintf ( 1, '\n' );
  for i = 1 : n
    if ( isinf ( lo(i) ) && isinf ( hi(i) ) )
      fprintf ( 1, '  x(%d) is free\n', i );
    elseif ( isinf ( lo(i) ) )
      fprintf ( 1, '  x(%d) <= %d\n', i, hi(i) );
    elseif ( isinf ( hi(i) ) )
      fprintf ( 1, '  %d <= x(%d)\n', lo(i), i );
    else
      fprintf ( 1, '  %d <= x(%d) <= %d\n', lo(i), i, hi(i) );
    end
  end

  return
end

