function elliptic_fk_test ( )

%*****************************************************************************80
%
%% elliptic_fk_test() tests elliptic_fk().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 May 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ELLIPTIC_FK_TEST():\n' );
  fprintf ( 1, '  ELLIPTIC_FK returns values of\n' );
  fprintf ( 1, '  the complete elliptic integral of the\n' );
  fprintf ( 1, '  first kind, with parameter K.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      K       F(K)          F(K)\n' );
  fprintf ( 1, '          Tabulated         Calculated\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, k, fx ] = elliptic_fk_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fx2 = elliptic_fk ( k );

    fprintf ( 1, '  %14.6f  %24.16g  %24.16g\n', k, fx, fx2 );

  end

  return
end
