function r8po_det_test ( )

%*****************************************************************************80
%
%% R8PO_DET_TEST tests R8PO_DET.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;
  a = zeros ( n, n );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8PO_DET_TEST\n' );
  fprintf ( 1, '  R8PO_DET computes the determinant of\n' );
  fprintf ( 1, '  a symmetric positive definite matrix\n' );
  fprintf ( 1, '  factored by R8PO_FA,\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );
%
%  Set the matrix.
%
  for i = 1 : n
    for j = 1 : n
      if ( j == i - 1 )
        a(i,j) = -1.0;
      elseif ( j == i )
        a(i,j) = 2.0;
      elseif ( j == i + 1 )
        a(i,j) = -1.0;
      else
        a(i,j) = 0.0;
      end
    end
  end

  r8po_print ( n, a, '  Matrix A:' )
%
%  Factor the matrix.
%
  [ r, info ] = r8po_fa ( n, a );
%
%  Compute the determinant.
%
  det = r8po_det ( n, r );
 
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Determinant of A = %g\n', det );

  return
end
