function r83_np_det_test ( )

%*****************************************************************************80
%
%% R83_NP_DET_TEST tests R83_NP_DET.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 May 2016
%
%  Author:
%
%    John Burkardt
%
  n = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R83_NP_DET_TEST\n' );
  fprintf ( 1, '  R83_NP_DET computes the determinant of a tridiagonal\n' );
  fprintf ( 1, '  matrix factored by R83_NP_FA.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );
%
%  Set the matrix.
%
  a = r83_dif2 ( n, n );
%
%  Factor the matrix.
%
  [ a_lu, info ] = r83_np_fa ( n, a );

  if ( info ~= 0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'R83_NP_DET_TEST - Warning!\n' );
    fprintf ( 1, '  R83_NP_FA returns INFO = %d\n', info );
  end

  r83_print ( n, n, a_lu, '  The factored R83 matrix:' );
%
%  Compute the determinant.
%
  det = r83_np_det ( n, a_lu );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  R83_NP_DET computes determinant = %g\n', det );
  fprintf ( 1, '  Exact determinant = %d\n', n + 1 );

  return
end
