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.


Detailed Description

Classes for solving polynomials.

Warning:
We should 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.


Data Structures

class  quadratic_real
 Solve a quadratic polynomial with real coefficients and real roots [abstract base]. More...
class  quadratic_real_coeff
 Solve a quadratic polynomial with real coefficients and complex roots [abstract base]. More...
class  quadratic_complex
 Solve a quadratic polynomial with complex coefficients and complex roots [abstract base]. More...
class  cubic_real
 Solve a cubic polynomial with real coefficients and real roots [abstract base]. More...
class  cubic_real_coeff
 Solve a cubic polynomial with real coefficients and complex roots [abstract base]. More...
class  cubic_complex
 Solve a cubic polynomial with complex coefficients and complex roots [abstract base]. More...
class  quartic_real
 Solve a quartic polynomial with real coefficients and real roots [abstract base]. More...
class  quartic_real_coeff
 Solve a quartic polynomial with real coefficients and complex roots [abstract base]. More...
class  quartic_complex
 Solve a quartic polynomial with complex coefficients and complex roots [abstract base]. More...
class  poly_real_coeff
 Solve a general polynomial with real coefficients and complex roots [abstract base]. More...
class  poly_complex
 Solve a general polynomial with complex coefficients [abstract base]. More...
class  cern_cubic_real_coeff
 Solve a cubic with real coefficients and complex roots (CERNLIB). More...
class  cern_quartic_real_coeff
 Solve a quartic with real coefficients and complex roots (CERNLIB). More...
class  gsl_quadratic_real_coeff
 Solve a quadratic with real coefficients and complex roots (GSL). More...
class  gsl_cubic_real_coeff
 Solve a cubic with real coefficients and complex roots (GSL). More...
class  gsl_quartic_real
 Solve a quartic with real coefficients and real roots (GSL). More...
class  gsl_quartic_real2
 Solve a quartic with real coefficients and real roots (GSL). More...
class  gsl_poly_real_coeff
 Solve a general polynomial with real coefficients (GSL). More...
class  quadratic_std_complex
 Solve a quadratic with complex coefficients and complex roots. More...
class  cubic_std_complex
 Solve a cubic with complex coefficients and complex roots. More...
class  simple_quartic_real
 Solve a quartic with real coefficients and real roots. More...
class  simple_quartic_complex
 Solve a quartic with complex coefficients and complex roots. More...

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page