Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0026/dprbm.doc
There are 2 other files named dprbm.doc in the archive. Click here to see a list.
SUBROUTINE DPRBM
PURPOSE
TO CALCULATE ALL REAL AND COMPLEX ROOTS OF A GIVEN
POLYNOMIAL WITH REAL COEFFICIENTS.
USAGE
CALL DPRBM (C,IC,RR,RC,POL,IR,IER)
DESCRIPTION OF PARAMETERS
C - DOUBLE PRECISION INPUT VECTOR CONTAINING THE
COEFFICIENTS OF THE GIVEN POLYNOMIAL. COEFFICIENTS
ARE ORDERED FROM LOW TO HIGH. ON RETURN COEFFI-
CIENTS ARE DIVIDED BY THE LAST NONZERO TERM.
IC - DIMENSION OF VECTORS C, RR, RC, AND POL.
RR - RESULTANT DOUBLE PRECISION VECTOR OF REAL PARTS
OF THE ROOTS.
RC - RESULTANT DOUBLE PRECISION VECTOR OF COMPLEX PARTS
OF THE ROOTS.
POL - RESULTANT DOUBLE PRECISION VECTOR OF COEFFICIENTS
OF THE POLYNOMIAL WITH CALCULATED ROOTS.
COEFFICIENTS ARE ORDERED FROM LOW TO HIGH (SEE
REMARK 4).
IR - OUTPUT VALUE SPECIFYING THE NUMBER OF CALCULATED
ROOTS. NORMALLY IR IS EQUAL TO IC-1.
IER - RESULTANT ERROR PARAMETER CODED AS FOLLOWS
IER=0 - NO ERROR,
IER=1 - SUBROUTINE DPQFB RECORDS POOR CONVERGENCE
AT SOME QUADRATIC FACTORIZATION WITHIN
100 ITERATION STEPS,
IER=2 - POLYNOMIAL IS DEGENERATE, I.E. ZERO OR
CONSTANT,
OR OVERFLOW IN NORMALIZATION OF GIVEN
POLYNOMIAL,
IER=3 - THE SUBROUTINE IS BYPASSED DUE TO
SUCCESSIVE ZERO DIVISORS OR OVERFLOWS
IN QUADRATIC FACTORIZATION OR DUE TO
COMPLETELY UNSATISFACTORY ACCURACY,
IER=-1 - CALCULATED COEFFICIENT VECTOR HAS LESS
THAN SIX CORRECT SIGNIFICANT DIGITS.
THIS REVEALS POOR ACCURACY OF CALCULATED
ROOTS.
REMARKS
(1) REAL PARTS OF THE ROOTS ARE STORED IN RR(1) UP TO RR(IR)
AND CORRESPONDING COMPLEX PARTS IN RC(1) UP TO RC(IR).
(2) ERROR MESSAGE IER=1 INDICATES POOR CONVERGENCE WITHIN
100 ITERATION STEPS AT SOME QUADRATIC FACTORIZATION
PERFORMED BY SUBROUTINE DPQFB.
(3) NO ACTION BESIDES ERROR MESSAGE IER=2 IN CASE OF A ZERO
OR CONSTANT POLYNOMIAL. THE SAME ERROR MESSAGE IS GIVEN
IN CASE OF AN OVERFLOW IN NORMALIZATION OF GIVEN
POLYNOMIAL.
(4) ERROR MESSAGE IER=3 INDICATES SUCCESSIVE ZERO DIVISORS
OR OVERFLOWS OR COMPLETELY UNSATISFACTORY ACCURACY AT
ANY QUADRATIC FACTORIZATION PERFORMED BY
SUBROUTINE DPQFB. IN THIS CASE CALCULATION IS BYPASSED.
IR RECORDS THE NUMBER OF CALCULATED ROOTS.
POL(1),...,POL(J-IR) ARE THE COEFFICIENTS OF THE
REMAINING POLYNOMIAL, WHERE J IS THE ACTUAL NUMBER OF
COEFFICIENTS IN VECTOR C (NORMALLY J=IC).
(5) IF CALCULATED COEFFICIENT VECTOR HAS LESS THAN SIX
CORRECT SIGNIFICANT DIGITS THOUGH ALL QUADRATIC
FACTORIZATIONS SHOWED SATISFACTORY ACCURACY, THE ERROR
MESSAGE IER=-1 IS GIVEN.
(6) THE FINAL COMPARISON BETWEEN GIVEN AND CALCULATED
COEFFICIENT VECTOR IS PERFORMED ONLY IF ALL ROOTS HAVE
BEEN CALCULATED. IN THIS CASE THE NUMBER OF ROOTS IR IS
EQUAL TO THE ACTUAL DEGREE OF THE POLYNOMIAL (NORMALLY
IR=IC-1). THE MAXIMAL RELATIVE ERROR OF THE COEFFICIENT
VECTOR IS RECORDED IN RR(IR+1).
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
SUBROUTINE DPQFB QUADRATIC FACTORIZATION OF A POLYNOMIAL
BY BAIRSTOW ITERATION.
METHOD
THE ROOTS OF THE POLYNOMIAL ARE CALCULATED BY MEANS OF
SUCCESSIVE QUADRATIC FACTORIZATION PERFORMED BY BAIRSTOW
ITERATION. X**2 IS USED AS INITIAL GUESS FOR THE FIRST
QUADRATIC FACTOR, AND FURTHER EACH CALCULATED QUADRATIC
FACTOR IS USED AS INITIAL GUESS FOR THE NEXT ONE. AFTER
COMPUTATION OF ALL ROOTS THE COEFFICIENT VECTOR IS
CALCULATED AND COMPARED WITH THE GIVEN ONE.
FOR REFERENCE, SEE J. H. WILKINSON, THE EVALUATION OF THE
ZEROS OF ILL-CONDITIONED POLYNOMIALS (PART ONE AND TWO),
NUMERISCHE MATHEMATIK, VOL.1 (1959), PP.150-180.