function r8mat_l1_solve_test ( )

%*****************************************************************************80
%
%% r8mat_l1_solve_test() tests r8mat_l1_solve().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 August 2016
%
%  Author:
%
%    John Burkardt
%
  n = 4;

  a = [ ...
    1.0,  0.0,  0.0,  0.0; ...
    2.0,  1.0,  0.0,  0.0; ...
    4.0,  5.0,  1.0,  0.0; ...
    7.0,  8.0,  9.0,  1.0 ];
  b = [ 1.0; 4.0; 17.0; 54.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8mat_l1_solve_test\n' );
  fprintf ( 1, '  r8mat_l1_solve solves a unit lower triangular system.\n' );

  r8mat_print ( n, n, a, '  Input matrix A:' );

  r8vec_print ( n, b, '  Right hand side b:' );

  x = r8mat_l1_solve ( n, a, b );

  r8vec_print ( n, x, '  Computed solution x:' );

  r = a * x - b;

  rnorm = norm ( r );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Norm of A*x-b = %g\n', rnorm );

  return
end
