Class quartic_real_coeff_cern (o2scl)¶
-
template<class fp_t = double, class cx_t = std::complex<fp_t>>
class quartic_real_coeff_cern : public o2scl::quartic_real_coeff<double, std::complex<double>>¶ Solve a quartic with real coefficients and complex roots (CERNLIB)
Public Functions
-
inline virtual ~quartic_real_coeff_cern()¶
-
inline virtual int solve_rc(const fp_t a4, const fp_t b4, const fp_t c4, const fp_t d4, const fp_t e4, cx_t &x1, cx_t &x2, cx_t &x3, cx_t &x4)¶
Solves the polynomial \( a_4 x^4 + b_4 x^3 + c_4 x^2 + d_4 x + e_4= 0 \) giving the four complex solutions \( x=x_1 \) , \( x=x_2 \) , \( x=x_3 \) , and \( x=x_4 \) .
-
inline virtual int rrteq4(fp_t a, fp_t b, fp_t c, fp_t d, cx_t z[], fp_t &dc, int &mt)¶
The CERNLIB-like interface.
There are a couple differences with the original routine. The arrays z[] and u[] are now zero-indexed.
Todo
Future: Make v[] zero-indexed as well.
-
inline const char *type()¶
Return a string denoting the type (“quartic_real_coeff_cern”)
Public Members
-
cubic_real_coeff_cern<fp_t, cx_t> cub_obj¶
The object to solve for the associated cubic.
-
inline virtual ~quartic_real_coeff_cern()¶