poly34.h
Go to the documentation of this file.
1 // poly34.h : solution of cubic and quartic equation
2 // (c) Khashin S.I. http://math.ivanovo.ac.ru/dalgebra/Khashin/index.html
3 // khash2 (at) gmail.com
4 
5 
6 int SolveP3(double *x,double a,double b,double c); // solve cubic equation x^3 + a*x^2 + b*x + c = 0
7 int SolveP4(double *x,double a,double b,double c,double d); // solve equation x^4 + a*x^3 + b*x^2 + c*x + d = 0 by Dekart-Euler method
8 // x - array of size 4
9 // return 4: 4 real roots x[0], x[1], x[2], x[3], possible multiple roots
10 // return 2: 2 real roots x[0], x[1] and complex x[2]�i*x[3],
11 // return 0: two pair of complex roots: x[0]�i*x[1], x[2]�i*x[3],
12 int SolveP5(double *x,double a,double b,double c,double d,double e); // solve equation x^5 + a*x^4 + b*x^3 + c*x^2 + d*x + e = 0
13 
14 int SolveP4Bi(double *x, double b, double d); // solve equation x^4 + b*x^2 + d = 0
15 int SolveP4De(double *x, double b, double c, double d); // solve equation x^4 + b*x^2 + c*x + d = 0
16 void CSqrt( double x, double y, double &a, double &b); // returns as a+i*s, sqrt(x+i*y)
17 double N4Step(double x, double a,double b,double c,double d);// one Newton step for x^4 + a*x^3 + b*x^2 + c*x + d
18 
19  double SolveP5_1(double a,double b,double c,double d,double e); // return real root of x^5 + a*x^4 + b*x^3 + c*x^2 + d*x + e = 0
20 
21 // Solve2: let f(x ) = a*x^2 + b*x + c and
22 // f(x0) = f0,
23 // f(x1) = f1,
24 // f(x2) = f3
25 // Then r1, r2 - root of f(x)=0.
26 // Returns 0, if there are no roots, else return 2.
27 int Solve2( double x0, double x1, double x2, double f0, double f1, double f2, double &r1, double &r2);
28 
double SolveP5_1(double a, double b, double c, double d, double e)
Definition: poly34.cpp:226
int SolveP4(double *x, double a, double b, double c, double d)
Definition: poly34.cpp:201
int SolveP4Bi(double *x, double b, double d)
Definition: poly34.cpp:59
int SolveP3(double *x, double a, double b, double c)
Definition: poly34.cpp:15
int SolveP5(double *x, double a, double b, double c, double d, double e)
Definition: poly34.cpp:279
double N4Step(double x, double a, double b, double c, double d)
Definition: poly34.cpp:189
int SolveP4De(double *x, double b, double c, double d)
Definition: poly34.cpp:114
int Solve2(double x0, double x1, double x2, double f0, double f1, double f2, double &r1, double &r2)
Definition: poly34.cpp:292
void CSqrt(double x, double y, double &a, double &b)
Definition: poly34.cpp:47


asr_mild_calibration_tool
Author(s): Aumann Florian, Heller Florian, Meißner Pascal
autogenerated on Mon Dec 2 2019 03:11:43