function r8poly2_ex_test ( )

%*****************************************************************************80
%
%% r8poly2_ex_test() tests r8poly2_ex().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 April 2009
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8POLY2_EX_TEST\n' );
  fprintf ( 1, '  R8POLY2_EX finds the extreme value\n' );
  fprintf ( 1, '  of a parabola determined by three points.\n' );

  a =  2.0;
  b = -4.0;
  c = 10.0;

  x1 = 1.0;
  y1 = a * x1 * x1 + b * x1 + c;
  x2 = 2.0;
  y2 = a * x2 * x2 + b * x2 + c;
  x3 = 3.0;
  y3 = a * x3 * x3 + b * x3 + c;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Parabolic coefficients:\n' );
  fprintf ( 1, '  A = %f, B = %f, C = %f\n', a, b, c );
  fprintf ( 1, '\n' );
  r8r8_print ( '  Point 1', x1, y1 );
  r8r8_print ( '  Point 2', x2, y2 );
  r8r8_print ( '  Point 3', x3, y3 );

  a = 0.0;
  b = 0.0;
  c = 0.0;

  [ xmin, ymin, ierror ] = r8poly2_ex ( x1, y1, x2, y2, x3, y3 );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  R8POLY2_EX returns XMIN = %f, YMIN = %f\n', xmin, ymin );

  return
end
