Class quadratic_real (o2scl)¶
-
class
o2scl
::
quadratic_real
¶ Solve a quadratic polynomial with real coefficients and real roots [abstract base].
Subclassed by o2scl::quadratic_real_coeff
Public Functions
-
~quadratic_real
()¶
-
int
solve_r
(const double a2, const double b2, const double c2, double &x1, double &x2) = 0¶ Solves the polynomial \( a_2 x^2 + b_2 x + c_2 = 0 \) giving the two solutions \( x=x_1 \) and \( x=x_2 \) .
-
double
disc_r
(double a2, double b2, double c2)¶ Compute the quadratic discriminant, \( b^2-4ac \).
-
const char *
type
()¶ Return a string denoting the type (“quadratic_real”)
-