function bernstein_to_monomial_matrix_test ( )

%*****************************************************************************80
%
%% bernstein_to_monomial_matrix_test() tests bernstein_to_monomial_matrix().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 February 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'bernstein_to_monomial_matrix_test():\n' );
  fprintf ( 1, '  bernstein_to_monomial_matrix() returns the matrix A which maps\n' );
  fprintf ( 1, '  polynomial coefficients from Bernstein to Power form.\n' );

  n = 5;
  a = bernstein_to_monomial_matrix ( n );
  r8mat_print ( n + 1, n + 1, a, '  A = bernstein_to_monomial_matrix(5):' );

  b = monomial_to_bernstein_matrix ( n );
  r8mat_print ( n + 1, n + 1, b, '  B = monomial_to_bernstein_matrix(5):' );

  c = a * b;
  e = r8mat_is_identity ( n + 1, c );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  |A*B-I| = %g\n', e );

  return
end
