Package math.tartaglia
Class TartagliaSolver
- java.lang.Object
-
- math.tartaglia.TartagliaSolver
-
public class TartagliaSolver extends java.lang.ObjectObjects of this class are real value solvers of the system: cx^3+ax+b=0.- Author:
- JIBOYE OLuwagbemiro Olaoluwa
-
-
Constructor Summary
Constructors Constructor Description TartagliaSolver(double c, double a, double b)
-
Method Summary
Modifier and Type Method Description doublegetA()doublegetB()doublegetC()voidnormalizeCofficients()Make the value of c to be equal to one by dividing through a,b,c by its valuevoidsetA(double a)voidsetB(double b)voidsetC(double c)java.lang.Stringsolve()Finds the real roots of the equation.
-
-
-
Method Detail
-
getA
public double getA()
-
setA
public void setA(double a)
-
getB
public double getB()
-
setB
public void setB(double b)
-
getC
public double getC()
-
setC
public void setC(double c)
-
normalizeCofficients
public void normalizeCofficients()
Make the value of c to be equal to one by dividing through a,b,c by its value
-
solve
public java.lang.String solve()
Finds the real roots of the equation.
-
-