function u_polynomial_value_test ( )

%*****************************************************************************80
%
%% U_POLYNOMIAL_VALUE_TEST tests U_POLYNOMIAL_VALUE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    11 July 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'U_POLYNOMIAL_VALUE_TEST:\n' );
  fprintf ( 1, '  U_POLYNOMIAL_VALUE evaluates the Chebyshev polynomial U(n,x).\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '                        Tabulated                 Computed\n' );
  fprintf ( 1, '     N        X           U(n,x)                    U(n,x)                     Error\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( 1 )

    [ n_data, n, x, fx1 ] = u_polynomial_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fx2 = u_polynomial_value ( n, x );
    e = fx1 - fx2;

    fprintf ( 1, '  %4d  %12f  %24.16e  %24.16e  %8.2g\n', n, x, fx1, fx2, e );

  end

  return
end
