function elliptic_pia_test ( )

%*****************************************************************************80
%
%% elliptic_pia_test() tests elliptic_pia().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 May 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ELLIPTIC_PIA_TEST():\n' );
  fprintf ( 1, '  ELLIPTIC_PIA returns values of\n' );
  fprintf ( 1, '  the complete elliptic integral of the\n' );
  fprintf ( 1, '  third kind, with parameter angle A.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      N            A       Pi(N,A)           Pi(N,A)\n' );
  fprintf ( 1, '                           Tabulated         Calculated\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, n, a, pia ] = elliptic_pia_values ( n_data );

    if ( n_data == 0 )
      break
    end

    pia2 = elliptic_pia ( n, a );

    fprintf ( 1, '  %14.6f  %14.6f  %24.16g  %24.16g\n', n, a, pia, pia2 );

  end

  return
end
