function diophantine_2d_test01 ( )

%*****************************************************************************80
%
%% diophantine_2d_test01() tests diophantine_2d_basis().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 April 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'diophantine_2d_test01()\n' );
  fprintf ( 1, '  diophantine_2d_basis finds a basic solution for\n' );
  fprintf ( 1, '  one Diophantine equation in two variables.\n' );

  a = [ 91; 21 ];
  b = 7;
  diophantine_equation_print ( a, b );

  [ d, v, w ] = diophantine_2d_basis ( a, b );

  diophantine_basis_print ( d, v, w );

  r = diophantine_residual ( a, b, v );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The residual for the particular solution with c=0 is %d\n', r );

  return
end

