function w_polynomial_ab_value_test ( )

%*****************************************************************************80
%
%% W_POLYNOMIAL_AB_VALUE_TEST tests W_POLYNOMIAL_AB_VALUE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    20 July 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'W_POLYNOMIAL_AB_VALUE_TEST:\n' );
  fprintf ( 1, '  W_POLYNOMIAL_AB_VALUE evaluates the shifted Chebyshev \n' );
  fprintf ( 1, '  polynomial WAB(n,x).\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Here, we will use the new domain [0,1].\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '                        Tabulated                 Computed\n' );
  fprintf ( 1, '     N        X01       W01(n,x)                  W01(n,x)                     Error\n' );
  fprintf ( 1, '\n' );

  a = 0.0;
  b = 1.0;

  n_data = 0;

  while ( 1 )

    [ n_data, n, x01, fx1 ] = w_polynomial_01_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fx2 = w_polynomial_ab_value ( a, b, n, x01 );
    e = fx1 - fx2;

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

  end

  return
end
