[BACK]Return to durand_kerner.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Implift

File: [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Implift / durand_kerner.ads (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:28 2000 UTC (23 years, 7 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with Standard_Floating_Numbers;          use Standard_Floating_Numbers;
with Standard_Complex_Vectors;           use Standard_Complex_Vectors;

generic 

  with procedure Write ( step : in natural; z,res : in Vector );

  -- DESCRIPTION :
  --   This routine allows to write intermediate results after each iteration,
  --   such as the step number, the approximations z and the residuals res.
  --   If no output is wanted, supply an empty body for Write.

procedure Durand_Kerner ( p : in Vector; z,res : in out Vector;
                          maxsteps : in natural; eps : in double_float;
                          nb : out natural );

-- DESCRIPTION :
--   This routine computes all roots of a given polynomial
--   in one unknown, applying the method of Durand Kerner.
--   This method is also known as the method of Weierstrass.

-- ON ENTRY :
--   p           the polynomial defined by
--                 p[k] + p[k+1]*x + p[k+2]*x^2 + .. + p[k+n]*x^n,
--               with k = p'first;
--   z           initial approximations for the roots;
--   res         the residuals of the roots;
--   maxsteps    is the maximum number of steps that are allowed;
--   eps         the required accuracy.

-- ON RETURN :
--   z           the computed roots;
--   res         the residuals of the roots;
--   nb          the number of steps.