function r = r8poly2_roots_standard ( c )

%*****************************************************************************80
%
%% r8poly2_roots_standard() returns the two roots of a quadratic polynomial.
%
%  Discussion:
%
%    The polynomial has the form:
%
%      C(3) * X^2 + C(2) * X + C(1) = 0 
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 August 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real C(3), the coefficients of the polynomial.
%
%  Output:
%
%    complex R(2), the roots of the polynomial, which
%    might be real and distinct, real and equal, or complex conjugates.
%
  if ( c(3) == 0.0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'R8POLY2_ROOTS_STANDARD - Fatal error!\n' );
    fprintf ( 1, '  The coefficient C(3) is zero.\n' );
    error ( 'R8POLY2_ROOTS_STANDARD - Fatal error!' );
  end

  disc = c(2) * c(2) - 4.0 * c(3) * c(1);
  r(1) = ( - c(2) + sqrt ( disc ) ) / 2.0 / c(3);
  r(2) = ( - c(2) - sqrt ( disc ) ) / 2.0 / c(3);

  return
end
