C205: Zero of a Function of One Real Variable
Author(s): T. Pomentale | Library: MATHLIB
|
Submitter: K.S. Kölbig | Submitted: 20.04.1970
|
Language: Fortran | Revised: 15.03.1993
|
Subroutine subprograms RZERO and DZERO compute,
to an attempted specified accuracy, a zero of a real-valued function
f(x) lying in a given interval [a,b], where .
On CDC and Cray computers, the double-precision version DZERO
is not available.
Structure:
SUBROUTINE subprograms
User Entry Names: RZERO, DZERO
Files Referenced: Unit 6
External References: MTLMTR, ABEND,
user-supplied FUNCTION subprogram
Usage:
For (type REAL), (type
DOUBLE PRECISION),
CALL tZERO(A,B,X0,R,EPS,MAXF,F)
- A,B
- (type according to t) On entry, A and B
must specify the end-points of the search interval. Unchanged on exit.
- X0
- (type according to t) On exit, X0 is the
computed approximation to a zero of the function f(x).
- R
- (type according to t) On exit, the value of R is
such that X0 R, unless an error condition is
detected (see Error Handling).
- EPS
- (type according to t) On entry, EPS must be
equal to the accuracy parameter (see Accuracy). Unchanged on exit.
- MAXF
- (INTEGER) On entry, MAXF must be equal
to the maximum permitted number of references to the
function F within the iteration loop. Unchanged on exit.
- F
- (type according to t) Name of a user-supplied
FUNCTION subprogram, declared EXTERNAL in the calling
program.
The user-supplied function subprogram F must be of the form
FUNCTION F(X,I) and must set
. The INTEGER argument I
is set by RZERO before each reference to F as follows:
-
- First reference.
-
- Subsequent references.
-
- Final reference, before a normal
( )
exit.
Method:
A mixed strategy is used, based on the Muller method of
parabolic interpolation supplemented by bisection.
Accuracy:
The routine tries to compute a value X0 such that
If this accuracy is obtained with fewer than MAXF references
to the function F within the iteration loop, the subroutine
exits with R positive.
Error handling:
Error C205.1: .
X0 is set equal to zero and R
is set equal to .
Error C205.2: The number of calls to F exceeds MAXF.
X0 is set equal to zero and R is set to
.
A message is written on Unit 6, unless subroutine
MTLSET (N002) has been called.
Michel Goossens
Tue Jun 4 20:41:56 METDST 1996