code: public static double cubicDiscriminant(double a, double b, double c, double d) {
  		return 18.0*d*c*b*a -4*c*c*c*a + c*c*b*b -4*d*b*b*b - 27*d*d*a*a;
  	}
docs: <p>The cubic discriminant is used to determine the type of roots.</p>
  <ul>
  <li>if d {@code >} 0, then three distinct real roots</li>
  <li>if d = 0, then it has a multiple root and all will be real</li>
  <li>if d {@code <} 0, then one real and two non-real complex conjugate roots</li>
  </ul>
  
  <p>
  From http://en.wikipedia.org/wiki/Cubic_function November 17, 2011
  </p>
  
  @param a polynomial coefficient.
  @param b polynomial coefficient.
  @param c polynomial coefficient.
  @param d polynomial coefficient.
  @return Cubic discriminant