function tu_product_test ( )

%*****************************************************************************80
%
%% tu_product_test() tests tu_product().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    16 July 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'TU_PRODUCT_TEST:\n' );
  fprintf ( 1, '  TU_PRODUCT(I,J;X) = T(I,X) * U(J,X)\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '   I   J      X               TI              UJ              TI*UJ       TU_PRODUCT\n' ); 
  fprintf ( 1, '\n' ); 
  for test = 1 : 10
    x = - 1.0 + 2.0 * rand ( 1, 1 );
    i = randi ( [ 0, 6 ], 1 );
    ti = t_polynomial_value ( i, x );
    j = randi ( [ -1, 4 ], 1 );
    uj = u_polynomial_value ( j, x );
    tiuj = tu_product ( i, j, x );
    fprintf ( 1, '  %2d  %2d  %14.6g  %14.6g  %14.6g  %14.6g  %14.6g\n', ...
      i, j, x, ti, uj, ti * uj, tiuj );
  end

  return
end
