Class QuarticRootFormula

    • Constructor Detail

      • QuarticRootFormula

        public QuarticRootFormula()
    • Method Detail

      • solve

        public List<Number> solve​(double a,
                                  double b,
                                  double c,
                                  double d,
                                  double e)
        Description copied from interface: QuarticRoot.QuarticSolver
        Solve \(ax^4 + bx^3 + cx^2 + dx + e = 0\).
        Specified by:
        solve in interface QuarticRoot.QuarticSolver
        Parameters:
        a - a
        b - b
        c - c
        d - d
        e - e
        Returns:
        the list of roots
      • solve

        public List<Number> solve​(Polynomial polynomial)
        Solve \(ax^4 + bx^3 + cx^2 + dx + e = 0\).
        Parameters:
        polynomial - a quartic equation to be solved
        Returns:
        the roots of the quartic equation
        Throws:
        IllegalArgumentException - if the polynomial degree is not 4