function hyper_2f1_complex_test ( )

%*****************************************************************************80
%
%% hyper_2f1_complex_test() tests hyper_2f1().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 December 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'hyper_2f1_complex_test():\n' );
  fprintf ( 1, '  Test hyper_2f1() with complex argument.\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, a, b, c, z, fz1 ] = hyper_2f1_complex_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fz2 = hyper_2f1 ( a, b, c, z );

    fprintf ( 1, '\n' );

    fprintf ( 1, '  a,b,c,z:     %6f  %6f  %6f  (%6f,%6f)\n', ...
      a, b, c, real ( z ), imag ( z ) );

    fprintf ( 1, '  f exact:     (%14.6g,%14.6g)\n', real ( fz1 ), imag ( fz1 ) );

    fprintf ( 1, '  f computed:  (%14.6g,%14.6g)\n', real ( fz2 ), imag ( fz2 ) );

    fprintf ( 1, '  error:       %14.6g\n', abs ( fz1 - fz2 ) );
 
  end

  return
end
