Class QuarticRootFerrari

    • Constructor Detail

      • QuarticRootFerrari

        public QuarticRootFerrari()
    • Method Detail

      • solve

        public List<Number> solve​(double a,
                                  double b,
                                  double c,
                                  double d,
                                  double e,
                                  double epsilon)
        Solve \(ax^4 + bx^3 + cx^2 + dx + e = 0\).
        Parameters:
        a - a
        b - b
        c - c
        d - d
        e - e
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
        Returns:
        the list of roots
        See Also:
        Wikipedia: Ferrari's solution
      • 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