function toms243_test ( )

%*****************************************************************************80
%
%% TOMS243_TEST tests TOMS243.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 January 2018
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../toms243' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'TOMS243_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  TOMS243 computes the natural logarithm of a complex value.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '               X                               FX exact\n' );
  fprintf ( 1, '                                               FX computed\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, x, fx1 ] = c8_log_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fx2 = toms243 ( x );

    fprintf ( 1, '  ( %8.4f  %8.4f )  ( %18.12f, %18.12f )\n', ...
      real ( x ), imag ( x ), real ( fx1 ), imag ( fx1 ) );
    fprintf ( 1, '                          ( %18.12f, %18.12f )\n', ...
                              real ( fx2 ), imag ( fx2 ) );

  end

  fprintf ( 1, '\n' );
  fprintf ( 1, 'TOMS243_TEST:\n' );
  fprintf ( 1, '  Normal end of execution:\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../toms243' );

  return
end
