24#include <gsl/gsl_math.h>
25#include <gsl/gsl_complex.h>
26#include <gsl/gsl_poly.h>
28#define SWAP(a,b) do { double tmp = b ; b = a ; a = tmp ; } while(0)
35 double q = (
a *
a - 3 *
b);
36 double r = (2 *
a *
a *
a - 9 *
a *
b + 27 *
c);
41 double Q3 = Q * Q * Q;
66 double sqrtQ = sqrt (Q);
90 double sqrtQ = sqrt (Q);
99 double norm = -2 *
sqrtQ;
100 double r0 = norm * cos (theta / 3) -
a / 3;
101 double r1 = norm * cos ((theta + 2.0 *
M_PI) / 3) -
a / 3;
102 double r2 = norm * cos ((theta - 2.0 *
M_PI) / 3) -
a / 3;
130 double sgnR = (
R >= 0 ? 1 : -1);
131 double A = -
sgnR * pow (fabs (
R) + sqrt (
R2 -
Q3), 1.0 / 3.0);
140 GSL_IMAG (*
z1) = -(sqrt (3.0) / 2.0) * fabs(A - B);
143 GSL_IMAG (*
z2) = (sqrt (3.0) / 2.0) * fabs(A - B);
148 GSL_IMAG (*z0) = -(sqrt (3.0) / 2.0) * fabs(A - B);
151 GSL_IMAG (*
z1) = (sqrt (3.0) / 2.0) * fabs(A - B);
#define R(a, b, c, d, e, f, g, h, i)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
#define R2(v, w, x, y, z, i)
int gsl_poly_complex_solve_cubic(double a, double b, double c, gsl_complex *z0, gsl_complex *z1, gsl_complex *z2)