function value = r8poly3_discriminant ( a, b, c, d )

%*****************************************************************************80
%
%% r8poly3_discriminant() returns the discriminant of a cubic polynomial.
%
%  Discussion:
%
%    The polynomial has the form
%
%      A * X^3 + B * X^2 + C * X + D = 0
%
%    If the discriminant is zero, then the polynomial has a multiple root.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 July 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, C, D, the coefficients of the polynomial.
%    A must not be zero.
%
%  Output:
%
%    real VALUE, the discriminant.
%
  value = 18.0 * a * b * c * d – 4.0 * b^3 * d + b^2 * c^2 ...
    – 4.0 * a * c^3 – 27.0 * a^2 * d^2;

  return
end
