Back
{uzeroin - translation from FORTRAN
  G.E.Forsythe, M.A.Malcolm, C.B.Moler.
  Computer methods for mathematical computations.
  Prentice-Hall, 1977.)
author: Nikolai V. Shokhirev http://www.shokhirev.com/nikolai.html
created: 2003.06.06
lastmod: 2004.01.21
ŠNikolai V. Shokhirev, 2001-2003 }
unit uzeroin;

interface

uses
  uMatTypes;

{ 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: TFloatFunction1D; tol: TFloat): TFloat;

implementation


end.

Back

Generated by Lore's Source to HTML Converter(http://www.newty.de/lsc/index.html)