function lambert_w_estimate_test ( )

%*****************************************************************************80
%
%% lambert_w_estimate_test() tests lambert_w_estimate().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    12 June 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lambert_w_estimate_test():\n' );
  fprintf ( 1, '  lambert_w_estimate() estimates the Lambert W function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '           X           W(X)        W(X)\n' );
  fprintf ( 1, '                   Tabulated       Estimate\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

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

    if ( n_data == 0 )
      break;
    end

    fx2 = lambert_w_estimate ( x );

    fprintf ( 1, ' %14.6g %14.6g %14.6g\n', x, fx, fx2 );

  end

  return
end
