function r8_erf_test ( )

%*****************************************************************************80
%
%% r8_erf_test() tests r8_erf().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 August 2010
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8_erf_test():\n' );
  fprintf ( 1, '  r8_erf() evaluates the error function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '     X      Exact F   R8_ERF(X)\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, x, fx ] = erf_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fx2 = r8_erf ( x );

    fprintf ( 1, '  %6f  %12f  %12f\n', x, fx, fx2 );

  end

  return
end
