Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0026/polrt.doc
There are 2 other files named polrt.doc in the archive. Click here to see a list.
SUBROUTINE POLRT
PURPOSE
COMPUTES THE REAL AND COMPLEX ROOTS OF A REAL POLYNOMIAL
USAGE
CALL POLRT(XCOF,COF,M,ROOTR,ROOTI,IER)
DESCRIPTION OF PARAMETERS
XCOF -VECTOR OF M+1 COEFFICIENTS OF THE POLYNOMIAL
ORDERED FROM SMALLEST TO LARGEST POWER
COF -WORKING VECTOR OF LENGTH M+1
M -ORDER OF POLYNOMIAL
ROOTR-RESULTANT VECTOR OF LENGTH M CONTAINING REAL ROOTS
OF THE POLYNOMIAL
ROOTI-RESULTANT VECTOR OF LENGTH M CONTAINING THE
CORRESPONDING IMAGINARY ROOTS OF THE POLYNOMIAL
IER -ERROR CODE WHERE
IER=0 NO ERROR
IER=1 M LESS THAN ONE
IER=2 M GREATER THAN 36
IER=3 UNABLE TO DETERMINE ROOT WITH 500 INTERATIONS
ON 5 STARTING VALUES
IER=4 HIGH ORDER COEFFICIENT IS ZERO
REMARKS
LIMITED TO 36TH ORDER POLYNOMIAL OR LESS.
FLOATING POINT OVERFLOW MAY OCCUR FOR HIGH ORDER
POLYNOMIALS BUT WILL NOT AFFECT THE ACCURACY OF THE RESULTS.
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
NONE
METHOD
NEWTON-RAPHSON ITERATIVE TECHNIQUE. THE FINAL ITERATIONS
ON EACH ROOT ARE PERFORMED USING THE ORIGINAL POLYNOMIAL
RATHER THAN THE REDUCED POLYNOMIAL TO AVOID ACCUMULATED
ERRORS IN THE REDUCED POLYNOMIAL.