function errors_test065 ( )

%*****************************************************************************80
%
%% ERRORS_TEST065
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    21 August 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Exercise 6.5                               |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    A = [ 888445  887112 ]                   |\n' );
  fprintf ( 1, '|        [ 887112  885781 ]                   |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    det ( A ) = 1                            |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    B = [ 1 ]                                |\n' );
  fprintf ( 1, '|        [ 0 ]                                |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Solve:                                     |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    A * X = B                                |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Correct X:                                 |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    885781                                   |\n' );
  fprintf ( 1, '|   -887112                                   |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '\n' );

  n = 2;

  a = [ 888445.0, 887112.0; ...
        887112.0, 885781.0 ];

  b = [ 1.0; 0.0 ];

  x = [ 885781.0; -887112.0 ];

  x2 = a \ b;

  r2 = a * x2 - b;

  r8vec3_print ( n, x, x2, r2, '  Exact X, approx X, residual:' );

  return
end
