Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0026/drtwi.doc
There are 2 other files named drtwi.doc in the archive. Click here to see a list.
SUBROUTINE DRTWI

PURPOSE
   TO SOLVE GENERAL NONLINEAR EQUATIONS OF THE FORM X=FCT(X)
   BY MEANS OF WEGSTEIN-S ITERATION METHOD.

USAGE
   CALL DRTWI (X,VAL,FCT,XST,EPS,IEND,IER)
   PARAMETER FCT REQUIRES AN EXTERNAL STATEMENT.

DESCRIPTION OF PARAMETERS
   X	  - DOUBLE PRECISION RESULTANT ROOT OF EQUATION
	    X=FCT(X).
   VAL	  - DOUBLE PRECISION RESULTANT VALUE OF X-FCT(X)
	    AT ROOT X.
   FCT	  - NAME OF THE EXTERNAL DOUBLE PRECISION FUNCTION
	    SUBPROGRAM USED.
   XST	  - DOUBLE PRECISION INPUT VALUE WHICH SPECIFIES THE
	    INITIAL GUESS OF THE ROOT X.
   EPS	  - SINGLE PRECISION INPUT VALUE WHICH SPECIFIES THE
	    UPPER BOUND OF THE ERROR OF RESULT X.
   IEND   - MAXIMUM NUMBER OF ITERATION STEPS SPECIFIED.
   IER	  - RESULTANT ERROR PARAMETER CODED AS FOLLOWS
	     IER=0 - NO ERROR,
	     IER=1 - NO CONVERGENCE AFTER IEND ITERATION STEPS,
	     IER=2 - AT ANY ITERATION STEP THE DENOMINATOR OF
		     ITERATION FORMULA WAS EQUAL TO ZERO.

REMARKS
   THE PROCEDURE IS BYPASSED AND GIVES THE ERROR MESSAGE IER=2
   IF AT ANY ITERATION STEP THE DENOMINATOR OF ITERATION
   FORMULA WAS EQUAL TO ZERO. THAT MEANS THAT THERE IS AT
   LEAST ONE POINT IN THE RANGE IN WHICH ITERATION MOVES WITH
   DERIVATIVE OF FCT(X) EQUAL TO 1.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   THE EXTERNAL DOUBLE PRECISION FUNCTION SUBPROGRAM FCT(X)
   MUST BE FURNISHED BY THE USER.

METHOD
   SOLUTION OF EQUATION X=FCT(X) IS DONE BY MEANS OF
   WEGSTEIN-S ITERATION METHOD, WHICH STARTS AT THE INITIAL
   GUESS XST OF A ROOT X. ONE ITERATION STEP REQUIRES ONE
   EVALUATION OF FCT(X). FOR TEST ON SATISFACTORY ACCURACY SEE
   FORMULAE (2) OF MATHEMATICAL DESCRIPTION.
   FOR REFERENCE, SEE
   (1) G. N. LANCE, NUMERICAL METHODS FOR HIGH SPEED COMPUTERS,
       ILIFFE, LONDON, 1960, PP.134-138,
   (2) J. WEGSTEIN, ALGORITHM 2, CACM, VOL.3, ISS.2 (1960),
       PP.74,
   (3) H.C. THACHER, ALGORITHM 15, CACM, VOL.3, ISS.8 (1960),
       PP.475,
   (4) J.G. HERRIOT, ALGORITHM 26, CACM, VOL.3, ISS.11 (1960),
       PP.603.