Lines Matching refs:deg

20 static xreal cauchy(const int deg, xcomplex *P)  in cauchy()  argument
22 xreal x, xm, f, dx, df, *tmp = new xreal[deg+1]; in cauchy()
24 for(int i = 0; i<=deg; i++){ tmp[i] = xabs(P[i]); }; in cauchy()
27 x = xroot(tmp[deg],deg) / xroot(tmp[0],deg); in cauchy()
28 if(tmp[deg - 1] != 0.0) { in cauchy()
30 xm = tmp[deg] / tmp[deg-1]; in cauchy()
34 tmp[deg] = -tmp[deg]; in cauchy()
41 for(int i = 1; i <= deg; i++) in cauchy()
53 for(int i = 1; i <= deg; i++){ in cauchy()
74 static void scale(const int deg, xcomplex* P) in scale() argument
84 for(int i = 0; i <= deg; i++) { in scale()
104 for(int i = 0; i<= deg; i++){ xscalbln(&P[i],sc); } in scale()
110 static void noshft(const int l1, int deg, xcomplex *P, xcomplex *H) in noshft() argument
116 for(i = 0; i < deg; i++) in noshft()
117 H[i] = (P[i] * (deg-i)) / deg; in noshft()
120 if(xnorm(H[deg - 1]) > xeta(P[deg-1])*xeta(P[deg-1])* 10*10 * xnorm(P[deg - 1])) { in noshft()
121 t = -P[deg] / H[deg-1]; in noshft()
122 for(i = 0; i < deg-1; i++){ in noshft()
123 j = deg - i - 1; in noshft()
129 for(i = 0; i < deg-1; i++) { in noshft()
130 j = deg - i - 1; in noshft()
141 static xcomplex polyev(const int deg, const xcomplex &s, const xcomplex *Q, xcomplex *q) { in polyev() argument
143 for(int i = 1; i <= deg; i++){ q[i] = q[i-1] * s + Q[i]; }; in polyev()
144 return q[deg]; in polyev()
150 static xcomplex calct(bool *bol, int deg, xcomplex &Ps, xcomplex *H, xcomplex *h, xcomplex &s){ in calct() argument
151 xcomplex Hs = polyev(deg-1, s, H, h); in calct()
152 *bol = xnorm(Hs) <= xeta(H[deg-1])*xeta(H[deg-1]) * 10*10 * xnorm(H[deg-1]); in calct()
162 static void nexth(const bool bol, int deg, xcomplex &t, xcomplex *H, xcomplex *h, xcomplex *p){ in nexth() argument
164 for(int j = 1; j < deg; j++) in nexth()
170 for(int j = 1; j < deg; j++) in nexth()
182 static xreal errev(const int deg, const xcomplex *p, const xreal ms, const xreal &mp){ in errev() argument
186 for(int i = 0; i <= deg; i++) in errev()
198 static bool vrshft(const int l3, int deg, xcomplex *P, xcomplex *p, xcomplex *H, xcomplex *h, xcomp… in vrshft() argument
210 Ps = polyev(deg, *s, P, p); in vrshft()
214 xreal zz = 20.0 * errev(deg, p, ms, mp); in vrshft()
220 if(mp <= 20.0 * errev(deg, p, ms, mp)) { in vrshft()
240 Ps = polyev(deg, *s, P, p); in vrshft()
242 t = calct(&bol, deg, Ps, H, h, *s); in vrshft()
243 nexth(bol, deg, t, H, h, p); in vrshft()
256 _20: t = calct(&bol, deg, Ps, H, h, *s); in vrshft()
257 nexth(bol, deg, t, H, h, p); in vrshft()
258 t = calct(&bol, deg, Ps, H, h, *s); in vrshft()
275 static bool fxshft(const int l2, int deg, xcomplex *P, xcomplex *p, xcomplex *H, xcomplex *h, xcomp… in fxshft() argument
279 xcomplex *tmp = new xcomplex[deg+1]; in fxshft()
281 Ps = polyev(deg, *s, P, p); in fxshft()
286 t = calct(&bol, deg, Ps, H, h, *s); in fxshft()
293 nexth(bol, deg, t, H, h, p); in fxshft()
294 t = calct(&bol, deg, Ps, H, h, *s); in fxshft()
304 for(int i = 0; i < deg; i++) in fxshft()
308 conv = vrshft(10, deg, P, p, H, h, zero, s); in fxshft()
313 for(int i = 0; i < deg; i++) in fxshft()
317 Ps = polyev(deg, *s, P, p); in fxshft()
318 t = calct(&bol, deg, Ps, H, h, *s); in fxshft()
329 conv = vrshft(10, deg, P, p, H, h, zero, s); in fxshft()
359 int deg = degree; in cpoly() local
362 while(poly[deg] == 0){ in cpoly()
363 Roots[degree - deg] = 0; in cpoly()
364 deg--; in cpoly()
367 if (deg == 0) goto done; in cpoly()
370 for(int i = 0; i <= deg; i++) { P[i] = poly[i]; } in cpoly()
372 scale(deg, P); in cpoly()
376 if(deg <= 1){ in cpoly()
378 deg = 0; in cpoly()
383 bnd = cauchy(deg, P); in cpoly()
388 noshft(5, deg, P, H); in cpoly()
397 conv = fxshft(10 * cnt2, deg, P, p, H, h, &zero, &s); in cpoly()
401 Roots[degree - deg] = zero; in cpoly()
404 deg--; in cpoly()
405 for(int i = 0; i <= deg; i++){ P[i] = p[i]; }; in cpoly()
421 return degree - deg; in cpoly()