Up \Optimization

{@abstract(uzeroin - translation from FORTRAN <br>
  G.E.Forsythe, M.A.Malcolm, C.B.Moler.<br>
  Computer methods for mathematical computations.<br>
  Prentice-Hall, 1977.)
author: Nikolai Shokhirev  )
created: June 06, 2003)
last modified: January 21, 2004)
ŠNikolai V. Shokhirev, 2001-2003 }
unit uzeroin;

interface

uses
  uMatTypes;
type
  FloatFunc1D = function(const x1: TFloat): TFloat;

{   a zero of the function f(x) is computed in the interval ax, bx .

 input..

 ax   left endpoint of initial interval
 bx   right endpoint of initial interval
 f   function subprogram which evaluates f(x) for any x in the interval ax, bx
 tol  desired length of the interval of uncertainty of the final result (.ge. 0.0)

 output..

 zeroin abcissa approximating a zero of f in the interval ax, bx

   It is assumed that  f(ax)  and  f(bx)  have opposite signs without a check.
 zeroin returns a zero x in the given interval [ax, bx] to within a tolerance
 4*macheps*abs(x) + tol, where macheps is the relative machine precision.
   This function subprogram is a slightly modified translation of the algol 60
 procedure zero given in richard brent, algorithms for minimization without
 derivatives, prentice - hall, inc. (1973). }
function zeroin(ax, bx: TFloat; f: FloatFunc1D; tol: TFloat): TFloat;

implementation


end.

Up \Optimization