function r8_beta_test ( )

%*****************************************************************************80
%
%% r8_beta_test() tests r8_beta().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 March 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8_beta_test():\n' );
  fprintf ( 1, '  r8_beta() evaluates the Beta function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      X              Y         BETA(X,Y)         R8_BETA(X,Y)\n' );
  fprintf ( 1, '                               tabulated         computed.\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, x, y, fxy1 ] = beta_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fxy2 = r8_beta ( x, y );

    fprintf ( 1, '  %12g  %12g  %24.16g  %24.16g\n', x, y, fxy1, fxy2 );

  end

  return
end
