65 G4double t=0.0, aa=0.0,
bb=0.0, cc=0.0, factor=1.0;
67 G4double xm=0.0, ff=0.0, df=0.0, dx=0.0;
68 G4int cnt=0, nz=0, i=0, j=0, jj=0, l=0, nm1=0, zerok=0;
73 static const G4double xx = std::sqrt(0.5);
75 static const G4double cosr = std::cos(rot),
82 if (!(op[0] != 0.0)) {
return -1; }
86 while (!(op[n] != 0.0))
93 if (n < 1) {
return -1; }
97 std::vector<G4double> temp(degr+1) ;
98 std::vector<G4double> pt(degr+1) ;
101 qp.assign(degr+1,0) ;
103 qk.assign(degr+1,0) ;
104 svk.assign(degr+1,0) ;
115 zeror[degr-1] = -
p[1]/
p[0];
122 Quadratic(
p[0],
p[1],
p[2],&zeror[degr-2],&zeroi[degr-2],
123 &zeror[degr-1],&zeroi[degr-1]);
135 if (x > max) { max = x; }
136 if (x != 0.0 && x <
min) {
min = x; }
147 if ( ((sc <= 1.0) && (max >= 10.0))
148 || ((sc > 1.0) && (infin/sc >= max))
149 || ((infin/sc >= max) && (max >= 10)) )
158 {
p[i] = factor*
p[i]; }
166 pt[i] = (std::fabs(
p[i]));
179 if (xm < x) { x = xm; }
189 { ff = ff*xm + pt[i]; }
190 if (ff <= 0.0) {
break; }
197 while (std::fabs(dx/x) > 0.005)
221 zerok = (k[n-1] == 0);
233 k[j] = t*k[j-1]+
p[j];
236 zerok = (std::fabs(k[n-1]) <= std::fabs(
bb)*eta*10.0);
246 zerok = (!(k[n-1] != 0.0));
257 for (cnt = 0;cnt < 20;cnt++)
264 xxx = cosr*xo - sinr*yo;
265 yo = sinr*xo + cosr*yo;
271 ComputeFixedShiftPolynomial(20*(cnt+1),&nz);
static G4Pow * GetInstance()
G4double powN(G4double x, G4int n) const
const XML_Char int const XML_Char int const XML_Char * base
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double deg