Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Implift/durand_kerner.ads, Revision 1.1.1.1
1.1 maekawa 1: with Standard_Floating_Numbers; use Standard_Floating_Numbers;
2: with Standard_Complex_Vectors; use Standard_Complex_Vectors;
3:
4: generic
5:
6: with procedure Write ( step : in natural; z,res : in Vector );
7:
8: -- DESCRIPTION :
9: -- This routine allows to write intermediate results after each iteration,
10: -- such as the step number, the approximations z and the residuals res.
11: -- If no output is wanted, supply an empty body for Write.
12:
13: procedure Durand_Kerner ( p : in Vector; z,res : in out Vector;
14: maxsteps : in natural; eps : in double_float;
15: nb : out natural );
16:
17: -- DESCRIPTION :
18: -- This routine computes all roots of a given polynomial
19: -- in one unknown, applying the method of Durand Kerner.
20: -- This method is also known as the method of Weierstrass.
21:
22: -- ON ENTRY :
23: -- p the polynomial defined by
24: -- p[k] + p[k+1]*x + p[k+2]*x^2 + .. + p[k+n]*x^n,
25: -- with k = p'first;
26: -- z initial approximations for the roots;
27: -- res the residuals of the roots;
28: -- maxsteps is the maximum number of steps that are allowed;
29: -- eps the required accuracy.
30:
31: -- ON RETURN :
32: -- z the computed roots;
33: -- res the residuals of the roots;
34: -- nb the number of steps.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>