function errors_test24 ( )

%*****************************************************************************80
%
%% ERRORS_TEST24
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 August 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Exercise 24                                |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Estimate the matrix exponential e^A.      |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  The matrix A is                            |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    -49 24                                   |\n' );
  fprintf ( 1, '|    -64 31                                   |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Correct value of e^A:                      |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|     -0.735759  0.551819                     |\n' );
  fprintf ( 1, '|     -1.471518  1.103638                     |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '+=============================================+\n' );

  n = 2;

  a = [ -49, 24; ...
        -64, 31 ];

  ae1 = r8mat_expm1 ( a );
  r8mat_print ( n, n, ae1, '  EXPM1(A):' );

  ae2 = r8mat_expm2 ( a );
  r8mat_print ( n, n, ae2, '  EXPM2(A):' );

  ae3 = r8mat_expm3 ( a );
  r8mat_print ( n, n, ae3, '  EXPM3(A):' );

  return
end
