Class cubic_real (o2scl)¶
-
class
o2scl
::
cubic_real
¶ Solve a cubic polynomial with real coefficients and real roots [abstract base].
Subclassed by o2scl::cubic_real_coeff
Public Functions
-
~cubic_real
()¶
-
int
solve_r
(const double a3, const double b3, const double c3, const double d3, double &x1, double &x2, double &x3) = 0¶ Solves the polynomial \( a_3 x^3 + b_3 x^2 + c_3 x + d_3= 0 \) giving the three solutions \( x=x_1 \) , \( x=x_2 \) , and \( x=x_3 \) .
-
double
disc_r
(const double a3, const double b3, const double c3, const double d3)¶ Compute the cubic discriminant, \( b^2 c^2 - 4 a c^3 - 4 b^3 d - 27 a^2 d^2 + 18 a b c d \).
-
const char *
type
()¶ Return a string denoting the type (“cubic_real”)
-