function r8_beta_test ( )

%*****************************************************************************80
%
%% R8_BETA_TEST tests R8_BETA.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL 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 ( 1 )

    [ 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
