Classes | Namespaces
poly.h File Reference

Classes for solving polynomials. More...

#include <iostream>
#include <complex>
#include <gsl/gsl_math.h>
#include <gsl/gsl_complex_math.h>
#include <gsl/gsl_complex.h>
#include <gsl/gsl_poly.h>
#include <o2scl/constants.h>
#include <o2scl/err_hnd.h>

Go to the source code of this file.

Classes

class  o2scl::quadratic_real
 Solve a quadratic polynomial with real coefficients and real roots [abstract base]. More...
 
class  o2scl::quadratic_real_coeff
 Solve a quadratic polynomial with real coefficients and complex roots [abstract base]. More...
 
class  o2scl::quadratic_complex
 Solve a quadratic polynomial with complex coefficients and complex roots [abstract base]. More...
 
class  o2scl::cubic_real
 Solve a cubic polynomial with real coefficients and real roots [abstract base]. More...
 
class  o2scl::cubic_real_coeff
 Solve a cubic polynomial with real coefficients and complex roots [abstract base]. More...
 
class  o2scl::cubic_complex
 Solve a cubic polynomial with complex coefficients and complex roots [abstract base]. More...
 
class  o2scl::quartic_real
 Solve a quartic polynomial with real coefficients and real roots [abstract base]. More...
 
class  o2scl::quartic_real_coeff
 Solve a quartic polynomial with real coefficients and complex roots [abstract base]. More...
 
class  o2scl::quartic_complex
 Solve a quartic polynomial with complex coefficients and complex roots [abstract base]. More...
 
class  o2scl::poly_real_coeff
 Solve a general polynomial with real coefficients and complex roots [abstract base]. More...
 
class  o2scl::poly_complex
 Solve a general polynomial with complex coefficients [abstract base]. More...
 
class  o2scl::cubic_real_coeff_cern
 Solve a cubic with real coefficients and complex roots (CERNLIB) More...
 
class  o2scl::quartic_real_coeff_cern
 Solve a quartic with real coefficients and complex roots (CERNLIB) More...
 
class  o2scl::quadratic_real_coeff_gsl
 Solve a quadratic with real coefficients and complex roots (GSL) More...
 
class  o2scl::cubic_real_coeff_gsl
 Solve a cubic with real coefficients and complex roots (GSL) More...
 
class  o2scl::quartic_real_gsl
 Solve a quartic with real coefficients and real roots (GSL) More...
 
class  o2scl::quartic_real_gsl2
 Solve a quartic with real coefficients and real roots (GSL) More...
 
class  o2scl::poly_real_coeff_gsl
 Solve a general polynomial with real coefficients (GSL) More...
 
class  o2scl::quadratic_complex_std
 Solve a quadratic with complex coefficients and complex roots. More...
 
class  o2scl::cubic_complex_std
 Solve a cubic with complex coefficients and complex roots. More...
 
class  o2scl::quartic_real_simple
 Solve a quartic with real coefficients and real roots. More...
 
class  o2scl::quartic_complex_simple
 Solve a quartic with complex coefficients and complex roots. More...
 

Namespaces

 o2scl
 The main O2scl namespace.
 

Detailed Description

Warning
One must be careful about using pow() in functions using complex<double> since pow(((complex<double>)0.0),3.0) returns (nan,nan). Instead, we should use pow(((complex<double>)0.0),3) which takes an integer for the second argument. The sqrt() function, always succeeds i.e. sqrt(((complex<double>)0.0))=0.0
Idea for Future:
The quartics are tested only for a4=1, which should probably be generalized.

Definition in file poly.h.

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).