function r8poly_shift_test ( )

%*****************************************************************************80
%
%% r8poly_shift_test() tests r8poly_shift().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 August 2018
%
%  Author:
%
%    John Burkardt
%

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8poly_shift_test():\n' );
  fprintf ( 1, '  r8poly_shift() shifts an R8POLY p(x) to q(z)\n' );
  fprintf ( 1, '  where z=scale*x+shift.\n' );

  order = 3;
  degree = 2;

  c = [ 6.0; -1.0; 2.0 ];
  r8poly_print ( c, '  p(x):' )

  scale = 2.0;
  shift = 3.0;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  z = scale * x + shift\n' );
  fprintf ( 1, '  Scale = %g\n', scale );
  fprintf ( 1, '  Shift = %g\n', shift );

  c2 = r8poly_shift ( degree, c, scale, shift );
  r8poly_print ( c2, '  q(z):' )

  c3 = [ 12.0, -3.5, 0.5 ];
  r8poly_print ( c3, '  Expected q(z):' );

  return
end
