SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function.polynomial.root
Class QuarticByFerrari

java.lang.Object
  extended by com.numericalmethod.suanshu.analysis.function.polynomial.root.QuarticByFerrari
All Implemented Interfaces:
Quartic.QuarticSolver

public class QuarticByFerrari
extends java.lang.Object
implements Quartic.QuarticSolver

This solves the quartic equations by the Ferrari method.

Solve

ax4 + bx3 + cx2 + dx + e = 0
using quartic root-finding formula, which is based on Ferrari's method.

See Also:

Constructor Summary
QuarticByFerrari()
           
 
Method Summary
 NumberList solve(double a, double b, double c, double d, double e)
          Solve ax4 + bx3 + cx2 + dx + e = 0
 NumberList solve(double a, double b, double c, double d, double e, double epsilon)
          Solve ax4 + bx3 + cx2 + dx + e = 0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuarticByFerrari

public QuarticByFerrari()
Method Detail

solve

public NumberList solve(double a,
                        double b,
                        double c,
                        double d,
                        double e,
                        double epsilon)
Solve
ax4 + bx3 + cx2 + dx + e = 0

Parameters:
a - a
b - b
c - c
d - d
e - e
epsilon - a precision parameter: when a |beta| ≤ ε, it is considered 0
Returns:
the list of roots
See Also:
Wikipedia: Ferrari's solution

solve

public NumberList solve(double a,
                        double b,
                        double c,
                        double d,
                        double e)
Description copied from interface: Quartic.QuarticSolver
Solve
ax4 + bx3 + cx2 + dx + e = 0

Specified by:
solve in interface Quartic.QuarticSolver
Parameters:
a - a
b - b
c - c
d - d
e - e
Returns:
the list of roots

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.