function lambert_w_test ( )

%*****************************************************************************80
%
%% lambert_w_test() tests lambert_w().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    06 October 2006
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lambert_w_test():\n' );
  fprintf ( 1, '  lambert_w() estimates the Lambert W function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '           X           W(X)        W(X)\n' );
  fprintf ( 1, '                   Tabulated   Computed\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 ( x );

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

  end

  return
end
