function rref_determinant_test ( )

%*****************************************************************************80
%
%% rref_determinant_test() tests rref_determinant().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 December 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rref_determinant_test():\n' );
  fprintf ( 1, '  rref_determinant() uses the reduced row echelon form \n' );
  fprintf ( 1, '  of a square matrix to compute the determinant.\n' );

  n = 4;

  A = [ ...
     5,  7,  6,  5; ...
     7, 10,  8,  7; ...
     6,  8, 10,  9; ...
     5,  7,  9, 10 ];
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix A:\n' );
  disp ( A );

  a_det = rref_determinant ( A );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Estimated determinant of A = %g:\n', a_det );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  MATLAB det(A) = %g\n', det ( A ) );

  return
end

